John,
Yes, that is correct. Essentially, reset() changes the effective sensitivity of the process, and consequently the modified effective sensitivity for suspend().
IMO this is the most intuitive behavior. In the scenario below, the process does not run after two triggerings of effective sensitivity. Why? Because it is suspended, so that's not a surprise. After the second reset(), it is waiting for an event - now if resume() comes and makes the process immediately start executing, it would be a surprise that the process runs w/o the event having triggered. It is more natural that the suspension gets lifted by the resume() and the process runs when the event triggers.
Thanks,
-Bishnupriya
________________________________
From: john.aynsley@doulos.com [mailto:john.aynsley@doulos.com]
Sent: Tuesday, September 21, 2010 12:47 AM
To: Bishnupriya Bhattacharya
Cc: P1666 Technical WG
Subject: RE: suspend and reset
Bisnupriya,
Let me check that I have understood you correctly, because it was not quite the answer I expected.
Consider the following sequence:
- A process is suspended while it has certain dynamic sensitivity.
- While suspended, a notification occurs on its dynamic sensitivity
- The process is then reset while still suspended
- It comes to rest on a wait(10, SC_NS)
- The time-out occurs, but the process is still suspended
- It is reset again, still suspended
- It comes to rest on a wait(ev)
- The process is the target of a resume() call, but the event ev has not been notified
You are saying that the process will NOT run? Effectively, each call to reset() wipes the slate clean?
Thanks,
John A
-----Bishnupriya Bhattacharya <bpriya@cadence.com> wrote: -----
To: "john.aynsley@doulos.com" <john.aynsley@doulos.com>, "systemc-p1666-technical@eda.org" <systemc-p1666-technical@eda.org>
From: Bishnupriya Bhattacharya <bpriya@cadence.com>
Date: 09/20/2010 07:22AM
Subject: RE: suspend and reset
John,
A very good test case.
Yes, the call to resume() would have to track the different effective sensitivites, such that when the resume() call does happen, it will only trigger the process with the latest effective sensntivity, and the previous effective sensitivites will have no effect on the process triggering.
It would be fantastic if all the corner case sitn. that you have come up with so far could be provided as part of a test suite for the process control constructs - it would be extremely valuable.
Thanks,
-Bishnupriya
________________________________
From: john.aynsley@doulos.com [mailto:john.aynsley@doulos.com]
Sent: Friday, September 17, 2010 6:23 PM
To: Bishnupriya Bhattacharya; systemc-p1666-technical@eda.org
Subject: suspend and reset
Bisnupriya, All,
More corner cases...
Suppose a process is reset while it is suspended, or even the more extreme case where a process is reset several times while suspended and each time comes to rest at at different wait call with a different dynamic sensitivity list. What happens on the call to resume? Is the implementation obliged to track whether the process would have been resumed (while in fact suspended) through all the changes to the dynamic sensitivity?
e.g.
void my_thread () {
if (state)
wait (something);
else
wait (something_else)
for (;;) {
wait (...);
...
}
...
handle.suspend();
...
handle.reset();
...
handle.reset();
...
handle.resume();
John A
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Tue Sep 21 01:36:25 2010
This archive was generated by hypermail 2.1.8 : Tue Sep 21 2010 - 01:36:32 PDT