Jump to content

ArjunMadhudi

Members
  • Content Count

    3
  • Joined

  • Last visited

About ArjunMadhudi

  • Rank
    Member

Recent Profile Visitors

68 profile views
  1. Hi David, Thanks for the reply. Yes, sc_event_queue is the solution for consecutive notify of same event. But, I intentionally did not use this feature. Not sure, if one would observe this scenario in the real world case, I was just curious to put an immediate notify in the middle of series of notifications and use an sc_event in this case. To provide enough clarity, my question was, when I have a timed notify after the immediate notify, i.e., e.notify(); e.notify(3,SC_NS); Thread2 would be triggered twice and it would print, e1 @ 5 ns e2 @ 8 ns But if you reverse the orde
  2. Hi, I have two threads, one thread (thread2) waits on event 'e' and other thread (thread1) notifies event 'e' at different time instances. Please find the below code, void thread1() { for(int i=0;i!=3;i++) { wait(5,SC_NS); e.notify(0,SC_NS); e.notify(3,SC_NS); e.notify(); e.notify(3,SC_NS); e.notify(4,SC_NS); std::cout<<"I am called @ "<<sc_time_stamp()<<endl; } } void thread2() { static int i=1; while(1) { wait(e); std::cout<<"e"<<i++<<" @ "<&
  3. I want my method/thread to be triggered only when both clk goes high and reset goes high. (i.e Func2 is triggered when sensitive to [clk.pos() and reset]). I tried doing below but received an error : target.h:44:33: error: no match for 'operator&' in '((target*)this)->target::clk.sc_core::sc_in<bool>::pos() & ((target*)this)->target::nreset' code: SC_METHOD(func2); sensitive<<(nreset&clk.pos()); dont_initialize();
×
×
  • Create New...