Jump to content


  • Content Count

  • Joined

  • Last visited

  1. I've fixed the issue. In short, it is my code's problem (the delete is not at the correct place; besides, there are memory leaks) Be very careful when using pointer type as signal/port. when sc_start evaluating whether there are activities pending, it is actually comparing m_cur_val and m_new_val. In my case, the first time assigning eventSubject = new Event(...), say the address is 0x1234 then it is released by "delete event;" Now: m_cur_val is pointing to "0x1234" with value 0xfeeefeee (because it is released) Now comes to "eventSubject = new Event(...)", the memory is allocated at "0x
  2. After Signal/Port binding, when signal changed, the sensitive list will cause SC_METHOD registered method to run. When I'm implementing the SystemC version, I met this warning W571. To be honest, I think this warning is correct because there is no activity. But Why there is no activity where I thought there should be is the question. The problem happens when call sc_start() the second time; I suspect that the binding between signal/port is not handing well. SC_MODULE ( MyClass ) { SC_CTOR(MyClass) { SC_METHOD(eventListener); dont_initialize();
  3. Thanks Philipp, I never know the concept of "co-routine" before, now I know it is an alternative of thread during concurrent programmig.
  4. Hi Guys, It is my first day to read SystemC tutorial, forgive me if the questions are silly. I debugged following code in Visual Studio 2008 (64 bit) by setting break point at the start of do_test1 and do_test2, to my suprise, the code is running in the same thread of the sc_main function. I didn't debug in Linux environment. However, by searching the source code, I found the "pthread.h" was included by some SystemC library source code. Question 1: In Windows, will the SC_THREAD create a real thread? Or it is always in the same thread of sc_main? If this is the case, m
  • Create New...