Quantcast
Channel: SystemC Language Forum RSS Feed
Viewing all articles
Browse latest Browse all 595

multiple event notifications

$
0
0

Hello All,

 

Following is the rule in LRM of systemC:

An earlier notification will always override one scheduled to occur later, and an immediate notification is always earlier than any delta-cycle delayed or timed notification.

 

There is an example:

   Process_A {my_event.notify();}

   Process_B {my_event.notify(SC_ZERO_TIME);}

   Process_C {wait(my_event);}

 

 

Now two cases of execution are shown below:

    If process A executes first, then the event is triggered immediately, causing process C to be executed in the same delta-cycle. Then, process B is executed, and since the event was triggered immediately, there is no     conflict and the second notification is accepted, causing process C to be executed again in the next delta-cycle.

 

   If, however, process B executes first, then the delta-cycle delayed notification is scheduled first. Then, process A executes and the immediate notification overrides the delta-cycle delayed notification, causing process   C to be executed only once, in the current delta-cycle.

 

So which is right one and how???

 

Regards

Amit Kumar


Viewing all articles
Browse latest Browse all 595

Trending Articles