Jump to content

kimjhun310

Members
  • Content Count

    4
  • Joined

  • Last visited

  1. kimjhun310

    Can I close sc_trace_file dynamically at any time?

    thank Alan for reply. Then, are there any way to turn on/off the trace during the simulation?
  2. Hello, Can I close sc_trace_file dynamically? Can I use sc_close_vcd_trace_file(wf) at any time after sc_trace and sc_create_vcd_trace_file(); I believe so but there is no error in compile time, but it make a Segmentation fault. //constructor . . SC_THREAD ( vcd_ctrl); . . // void vcd_ctrl() { while(1) { getcmd(command); if(command=="off") { sc_close_vcd_trace_file(g_sc_wf); } else if(command=="on") { wf = sc_create_vcd_trace_file("wave"); mod_a->trace(); mod_b->trace(); } } } >> Program received signal SIGSEGV, Segmentation fault. 0x00000019 in sc_get_curr_simcontext (this=0x84a7658, value_=...) at '/systemc/include/sysc/kernel/sc_simcontext.h:379 379 if( sc_curr_simcontext == 0 ) { Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.80.el6_3.6.i686 libgcc-4.4.6-4.el6.i686 libstdc++-4.4.6-4.el6.i686 (gdb) (gdb) where #0 0x00000019 in sc_get_curr_simcontext (this=0x84a7658, value_=...) at '/systemc/include/sysc/kernel/sc_simcontext.h:379 #1 sc_core::sc_signal<sc_dt::sc_logic>::write (this=0x84a7658, value_=...) at '/systemc/include/sysc/communication/sc_signal.h:690 #2 0x0835a73f in sc_core::sc_simcontext::simulate(sc_core::sc_time const&) () #3 0x0835b4e0 in sc_core::sc_start() () #4 0x08106454 in sc_main (argc=6, argv=0xffffbb14) at ./tb/sc_plamo.cpp:81 #5 0x0834d4b3 in sc_elab_and_sim () #6 0x0834d3c2 in main ()
  3. I'm using the follwing function. but there is a compile error in systemC 2.3. How to fix it? struct M: sc_module { sc_port<i_f, 0> p; // Multiport sc_event_or_list& all_events() { sc_event_or_list& or_list = p[0]->event() | p[0]->event(); for (int i = 1; i < p.size(); i++) or_list | p->event(); return or_list; } ... wait(all_events()); ... The compile error is "error: invalid initialization of non-const reference of type ?sc_core::sc_event_or_list&? from a temporary of type ?sc_core::sc_event_or_expr?" Thanks,
×