samyakjaroli

Members
  • Content count

    4
  • Joined

  • Last visited

About samyakjaroli

  • Rank
    Member

Profile Information

  • Gender
    Male
  • Location
    Mumbai, India
  1. I am trying a convert a string to a bit vector but unable to do so. Aim is to directly store the string as bit vector into Memory. Part of code: //<required libs declared> //..// string line; sc_bv<32> Mem[256]; //..// case 1: { i=1; ifstream mem_1("../mem_1.txt"); if (mem_1){ while (getline(mem_1,line)){ Mem= line; i++ ; } mem_1.close(); } else { cout << "mem_1 not found "; } break; } Where mem_1.txt contains binary: eg. 00100000000001000000000000000000 00000000010000110010100000100100 00000000011000000011000000100111 Error: /usr/local/systemc-2.3.0/include/sysc/datatypes/bit/sc_bv.h:192:15: note: sc_dt::sc_bv<W>& sc_dt::sc_bv<W>::operator=(sc_dt::int64) [with int W = 32, sc_dt::int64 = long long int] /usr/local/systemc-2.3.0/include/sysc/datatypes/bit/sc_bv.h:192:15: note: no known conversion for argument 1 from ‘std::string {aka std::basic_string<char>}’ to ‘long long int’ Thanks in advance. -- Samyak
  2. Hey Alan, Could you please tell why is it necessary to put, export CXX=g++ I successfully installed systemc-2.3.0 on Ubuntu 12.04 (64bit) without export CXX. In my case it is working perfectly fine. P.S. - Compilation : g++ -I/usr/local/systemc-2.3.0/include/ -L/usr/local/systemc-2.3.0/lib-linux64/ -o test hello.cpp -lsystemc regards, Samyak
  3. Hi, I have a query regarding sc_trace. Is it possible to have directly get all the signals and ports dumped into the VCD file. I am trying something like this in sc_main: Top top1("top1"); sc_trace_file *tf = sc_create_vcd_trace_file("waveforms"); sc_simcontext *context = sc_get_curr_simcontext(); sc_object *optr = context->first_object(); while(optr) { if (std::string(optr->kind()) == "sc_signal") optr->trace(tf); optr = context->next_object(); } With this I am not getting anything into the waveforms.vcd. Could anyone please suggest the correct way to do the above. Thanks for the help. -- Samyak Jaroli Student, India
  4. I am curious to know, what would happen if we do not specify the sensitivity of a void function inside the constructor. sc_module(my_module){ //port definition void do_void() { // function definition } sc_ctor(my_module){ // some initialization sc_method(do_void) // nothing mentioned in sensitivity } };