#include "systemc.h" #define ASSERT(x) \ { errnum++; \ if (!(x)) \ { \ cerr << "ASSERT : " #x "\n"; \ exit (errnum); \ } \ } using namespace std; struct hard : sc_module { sc_in i; sc_out o; SC_HAS_PROCESS(hard); hard(sc_module_name) { } }; int sc_main (int argc, char ** argv) { sc_signal s[5]; hard a("a"); hard b("b"); a.i (s[0]); a.o (s[1]); b.i (s[5]); // Wrong array index. This BUG should be detected. b.o (s[2]); sc_initialize (); sc_start (1); cerr << "Test KO.\n"; return 0; }