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