Jump to content

Search the Community

Showing results for tags 'notify'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Accellera Systems Initiative
    • Information
    • Announcements
    • In the News
  • SystemC
    • SystemC Language
    • SystemC AMS (Analog/Mixed-Signal)
    • SystemC TLM (Transaction-level Modeling)
    • SystemC Verification (UVM-SystemC, SCV, CRAVE, FC4SC)
    • SystemC CCI (Configuration, Control & Inspection)
    • SystemC Datatypes
  • UVM (Universal Verification Methodology)
    • UVM (IEEE 1800.2) - Methodology and BCL Forum
    • UVM SystemVerilog Discussions
    • UVM Simulator Specific Issues
    • UVM Commercial Announcements
    • UVM (Pre-IEEE) Methodology and BCL Forum
  • Portable Stimulus
    • Portable Stimulus Discussion
    • Portable Stimulus 2.0 Public Review Feedback
  • IP Security
    • SA-EDI Standard Discussion
    • IP Security Assurance Whitepaper Discussion
  • IP-XACT
    • IP-XACT Discussion
  • SystemRDL
    • SystemRDL Discussion
  • IEEE 1735/IP Encryption
    • IEEE 1735/IP Encryption Discussion
  • Commercial Announcements
    • Announcements

Categories

  • SystemC
  • UVM
  • UCIS
  • IEEE 1735/IP Encryption

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Biography


Location


Interests


Occupation


Company

Found 2 results

  1. 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++<<" @ "<<sc_time_stamp()<<std::endl; } } As per LRM 5.10.8, I would expect the following output, I am called @ 5 ns e1 @ 5 ns I am called @ 10 ns e2 @ 10 ns I am called @ 15 ns e3 @ 15 ns But, the actual output you get when you run is, I am called @ 5 ns e1 @ 5 ns e2 @ 8 ns I am called @ 10 ns e3 @ 10 ns e4 @ 13 ns I am called @ 15 ns e5 @ 15 ns e6 @ 18 ns This appeared bit strange to me and was just curious to know of what caused this behavior. Interestingly, this happens only when you position immediate notification in the middle of series of same event notifications. But, if you place the immediate notification at the very end, then the behavior is as per the expected output above. To add, event "e2" was triggered at 8 ns because we have e.notify(3,SC_NS) and e.notify(4,SC_NS) after immediate notify and the earliest time i.e e.notify(3,SC_NS) survived. Had there been e.notify(1,SC_NS), it prints "e2 @ 6ns" and so on. Appreciate any help. Thanks.
  2. Hallo, I have a SC_THREAD which has a dynamic synchronization. I use a sc_event_or_list as the wait-function argument. void notifyForGeneratedOutPix(void) { using namespace std; while (true) { sc_core::wait( m_outPixEvOrList ); //I'd like to do something like this: for(auto event : m_outPixEvOrList) { if(event.isNotified()) { cout << "@ " << setw(5) << sc_core::sc_time_stamp(); cout << " | delta cycle: " << setw(5) << sc_core::sc_delta_count(); cout << "Written values from "; this->dump(cout); cout << endl; cout << "value: "; dumpOutPixel(event); //map access with event as key } else continue; } } The events synchronize a method where I need to know which event is notified and has resumed the thread process. I haven't found a method or function to check an event if it is notified or not. The event class have this enumaration enum notify_t { NONE, DELTA, TIMED }; but I haven't found something to check that flag. Is their any way to find out if a event is notified or not? Thx *andre*
×
×
  • Create New...