Skip Nav
Home » Forums » SystemC Forum

Icon - KMLM List KMLM List

View email archives for the history of this mailing list.

List Home All Archives Dates Threads Authors Subjects
systemc-forum - Re: [Systemc-forum] Weird behaviour with locally declared signal Message Thread: Previous | Next
  • To: Sven Heithecker <heithecker@xxxxxxxxxxxxxxxx>
  • From: Martin Janssen <Martin.Janssen@xxxxxxxxxxxx>
  • Date: Fri, 26 Apr 2002 12:10:13 +0200
  • Cc: systemc-forum@xxxxxxxxxxxxxxxxxxx
Send Email to systemc-forum@osci.kavi.com:
Send new message
Reply to this message
Hi Sven,

This is indeed a bug in SystemC (no unregistering of requested updates
when a primitive channel --signal-- is destructed).
Thanks for reporting and for providing a testcase.

Martin
-oo-


Sven Heithecker wrote:

Am Donnerstag, 25. April 2002 09:54 schrieb Martin Janssen:


Please send a (small if possible) testcase and please also provide
the information on SystemC version, compiler, and OS you are using.


Ok, first I have to admit that I had used that signal (sorry) - but I only assigned a value to it, no more usage (reading that signal, binding to a port, ...) otherwise. Here is the test case:


#include "systemc.h"

SC_MODULE(mod)
 {
  public:
  SC_CTOR(mod)
   {
    // The following two statements are complete useless, but they IMHO really
    // dont look harmful at all.
    // However, this causes a crash. Removing the assignemt removes the crash.
    sc_signal<bool> bogus_signal;
    bogus_signal = true;
   }
 };

int sc_main(int argc, char **argv)
 {
  mod dut("dut");
  sc_start(10);
  return(EXIT_SUCCESS);
 }

And this is the resulting stack trace:

#0  0x0 in ?? ()
#1  0x8092129 in sc_prim_channel::perform_update (this=0xbffff214)
#2  0x80904a1 in sc_prim_channel_registry::perform_update (this=0x80d5008)
#3  0x80534af in sc_simcontext::initialize (this=0x80d4d60, no_crunch=true)
#4  0x80536e9 in sc_simcontext::simulate (this=0x80d4d60,duration=@0xbffff304)
#5  0x805482a in sc_start (duration=@0xbffff304)
#6  0x808b816 in sc_start (duration=10)
#7  0x8049763 in sc_main (argc=1, argv=0xbffff444)
#8  0x804a4db in main (argc=1, argv=0xbffff444)
#9  0x40089c5f in __libc_start_main () from /lib/libc.so.6

I am using SystemC V2.0 with the gcc 2.95.3 under linux (kernel 2.4.8).

Regards, Sven







By Date: Previous | Next Current Thread By Thread: Previous | Next


  Mail converted by the most-excellent MHonArc 2.6.10