Jump to content


  • Content Count

  • Joined

  • Last visited

  1. taog

    SystemC 2.3.0 with main()

    I've tried link against the static library libsystemc.a, I got error below: /home/taog/tools/systemc-2.3.1/lib-linux64//libsystemc.a(sc_main_main.o): In function `sc_elab_and_sim': /home/taog/tools_src/systemc-2.3.1a/objdir/src/sysc/kernel/../../../../src/sysc/kernel/sc_main_main.cpp:84: undefined reference to `sc_main' I need to pack a library based on SystemC, adding a empty sc_main in a library is weld.
  2. Hi all, in my opinion, TLM-2.0 defines the communication protocol between modules. Can I just use TLM-2.0 generic payload/b_transport without SystemC, just in a pure C++ enviroment??? When I compiled my C++ program which have included TLM2 headers, it give me some errors, like below: undefined reference to `sc_core::sc_port_base::add_static_event(sc_core::sc_method_process*, sc_core::sc_event const&) const' Must I link SystemC library to use TLM-2.0? i'm using SystemC-2.3.0
  3. Hi all, I'm not familiar with SystemC source code. I'm debugging a segment fault issue inside SystemC. The call stack is like below: #0 0x000000000048124e in sc_core::sc_inout<bool>::end_of_elaboration() () #1 0x0000000000473d8e in sc_core::sc_port_base::elaboration_done() () #2 0x0000000000474ab3 in sc_core::sc_port_registry::elaboration_done() () #3 0x00000000004e1e0c in sc_core::sc_simcontext::elaborate() () #4 0x00000000004e3d1d in sc_core::sc_simcontext::initialize(bool, bool) () #5 0x00000000004e3e04 in sc_core::sc_simcontext::initialize(bool) () #6 0x00000000004e3e26 in sc_core::sc_simcontext::simulate(sc_core::sc_time const&) () #7 0x00000000004e4022 in sc_core::sc_start(sc_core::sc_time const&, sc_core::sc_starvation_policy) () In src/sysc/communication/sc_port.cpp, I found void sc_port_base::elaboration_done() { assert( m_bind_info != 0 && m_bind_info->complete ); delete m_bind_info; m_bind_info = 0; sc_module* parent = static_cast<sc_module*>( get_parent_object() ); sc_object::hierarchy_scope scope( parent ); end_of_elaboration(); } // called by elaboration_done (does nothing) void sc_port_base::end_of_elaboration() {} Why we call end_of_elaboration() here and why we come to sc_core::sc_inout<bool>::end_of_elaboration()? Maybe the call stack is not correct.