Jump to content


  • Content Count

  • Joined

  • Last visited

  1. Edward1110

    event vs software call

    Eyck, Thank you for your answer. I read the Doulos tutorial, and built a TLM model for a simple RISC-V processor. I still didn't quite see the difference. In systemc, builder uses the functions under tlm_generic_payload class to bind different modules, in systemverilog, builder uses a top module to bind the port of each module together, which for me doesn't seem too different. There is no event-based or conditional trigger between modules in systemverilog. As to the event within the module, systemc does that too (for example, in the first example code from Doulos, they use for loop to generate data, or you may use other conditional statements or fstream object, which are also events). So where does I get wrong? Thank you very much!
  2. Edward1110

    event vs software call

    I'm learning systemc now, my systemc book says, Transaction-level modelling: avoid events as much as possible: use intermodule software call. I am not clear with the concept of event and intermodule software call. Does events means event-based, is it the conventional approach we used for hardware modelling, like in systemverilog? Why do transaction level modelling use software call instead of event? Thank you very much!
  3. Edward1110

    error: ‘sc_port’ was not declared in this scope

    Dear Ameya, Thank you for your answer I don't know how to run systemc code on codeblcok, so I didn't get the console output, but I am trying to work it out. I used my pc.cpp file this time, which I put into attachment I tried you command g++ -I. -I$SYSTEMC_HOME/include -L. -L$SYSTEMC_HOME/lib-linux64 -Wl,-rpath=$SYSTEMC_HOME/lib-linux64 -std=c++11 -o hello pc.cpp -lsystemc -lm/home/usr/local/systemc-2.3.2/lib-linux64/libsystemc.so The output is /usr/bin/ld: cannot find -lm/home/usr/local/systemc-2.3.2/lib-linux64/libsystemc.so collect2: error: ld returned 1 exit status But I tried this command g++ -I. -I$SYSTEMC_HOME/include -L. -L$SYSTEMC_HOME/lib-linux64 -Wl,-rpath=$SYSTEMC_HOME/lib-linux64 -std=c++11 -o hello pc.cpp -lsystemc -lm /tmp/ccfTt0wt.o: In function `__static_initialization_and_destruction_0(int, int)': pc.cpp:(.text+0xd60): undefined reference to `sc_core::sc_api_version_2_3_2_cxx201103L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_2_cxx201103L(sc_core::sc_writer_policy)' collect2: error: ld returned 1 exit status and there is still no output file. pc.cpp
  4. Hi all, I just installed systemc on my new computer with ubuntu. And I tried to run the code I wrote before which work perfectly fine on my other computer with Ubuntu. But I got the error: ''jump_addr' was not declared in this scope for all my ports and arguments with 'sc_bv' and 'sc_lv' type. Anyone knows what is going on, am I missing some thing in my system? export SYSTEMC_HOME=/usr/local/systemc-2.3.2/ g++ -I. -I$SYSTEMC_HOME/include -L. -L$SYSTEMC_HOME/lib-linux64 -Wl,-rpath=$SYSTEMC_HOME/lib-linux64 -o hello pc.h -lsystemc -lm that is the command I used I tried to run several different code, all of them doesn't work, I also tried to install different versions of systemc but the problem still exist. anyway I put one of the codes in the attachment regards, Edward pc.h