The suspend description from LRM:
"The suspend() function allows a process to suspend either its own execution
or that of another process. If the process to be suspended is not blocked
waiting on some other condition, such as an event, wait expression, or a
delay, then the process shall be suspended at some unspecified time in the
current time step."
"If the process to be suspended is not blocked waiting on some other
condition, such as an event, wait expression, or a delay .. " - suggest that
only process which is not blocked can be suspended. If it would be true then
it will be imposible to suspend another process.
IMHO this description should be cleared
module top;
process p2;
process::state pstate;
initial begin
#10;
p2.suspend(); //try to suspend p2 which is waiting on #delay
//LRM suggest that this would not happened because p2 is not running
#100;
pstate=p2.status;
$display($time, "from 1st process",pstate.name);
p2.resume;
end
initial
begin
p2 = process::self();
pstate=p2.status;
$display($time, "from 2nd process",pstate.name);
#20;
$display($time, "wait 100 and finish");
#100;
end
endmodule
DANiel
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu Mar 25 23:33:28 2010
This archive was generated by hypermail 2.1.8 : Thu Mar 25 2010 - 23:33:46 PDT