Search the Community
Showing results for tags 'sc_stop'.
-
Hi All, I have built a simulator which uses system C library. Its a network simulator and i am planning to run some traces. Well earlier when i was running my own generated traffic i was specifying the simulation time in cycles and used to achieve results. Now when i am running traces, i am not sure how much time will be enough. i want to ask that is there any way to stop the simulation at any part of the code apart from main(). If yes then how?? I will like to stop the simulation as soon as i am finished processing the last line of my trace file OR i don't receive any more packets in the receiving module designed in my network simulator in a certain time. Well to be honest i am a novice in system C. I took an introductory class and started building this as it ensured parallel processing. Thank You Regards Biplab
-
Hi All: I got a given SystemC code running without end_of_simulation called. And I know "end_of_simulation" won't be called if sc_stop is not called. I debug into the code and see following situation. Code looks like void thread_a() //it is a sc thread { while(xxx) { wait(sc_time(x,SC_NS)); break 1 cout<<"xxxxx"<<endl; break 2 ---logics---- } sc_stop; } The last time I was stopped at breakpoint 1, then I did step next. Then instead of stopping at breakpoint 2 , I stopped at sc_main after sc_start. So it looks like the entire thread is stopped by others? What else than "sc_stop" can terminate the thread? Since my code in "end_of_simulation" is not triggered, I am sure that there is no other sc_stop in my programme that calling sc_stop. So what can be the backend hand doing that? Thanks a lot for all your help
- 5 replies
-
- end_of_simulation
- sc_stop
-
(and 1 more)
Tagged with: