KMLM List
View email archives for the history of this mailing list.
|
|
|
|
systemc-forum - wait() vs. notify()
|
Message Thread:
Previous |
Next
|
- To: "systemc-forum@xxxxxxxxxxxxxxxxx" <systemc-forum@xxxxxxxxxxxxxxxxx>
- From: "Bradley, Mike" <mike_bradley@xxxxxxxxxx>
- Date: Fri, 27 May 2011 12:03:46 +0000
- Send Email to systemc-forum@lists.systemc.org:
- Send new message
- Reply to this message
|
Hi,
I’m creating a model where I need to make an edge sensitive output interrupt. This is really a pulse of say, 2 clocks. In order to schedule the pulse, it
seems I have two choices:
·
Simply use a wait statement;
Irq.write(1);
Wait ( 2 * clock );
Irq.write(0);
·
Create an SC_METHOD sensitive to an event;
SC_METHOD(clearInterrupt);
sensitive << clearIntrEvent;
void clearInterrupt() {
irq.write(0);
}
…
Irq.write(1);
clearIntrEvent.notify( 2 *clock );
Question is: which style is preferable?
Which style would have better simulation performance?
Thanks for your help!
-Mike
|
|
|