Subject: [sv-ec] Re: Clarification for Section 15.8
From: Arturo Salz (Arturo.Salz@synopsys.com)
Date: Mon Mar 17 2003 - 11:45:10 PST
Stefen,
BTW, the tool ensures the synchronization happens.
A short example is fine. What you have below seems too long.
In general, there's a misconception regarding the region execution.
Once ANY region is to be executed then that region becomes the
active region. The difference is not where things execute, but into
which region different statements are scheduled to execute:
blocking assignments are scheduled into the Active region
#0's are scheduled into the Inactive region
NBA's are scheduled into the NBA region
0-skew clocking sampling are scheduled into the Observe region
program-block statements are scheduled into the Reactive region
Therefore, labeling different statements with region names is very
misleading and confusing. We need to find a better way to describe
these conditions. Perhaps this should go in the scheduling semantics
section?
Arturo
----- Original Message -----
From: Stefen Boyd
To: Arturo Salz
Cc: sv-ec@eda.org
Sent: Monday, March 17, 2003 4:26 AM
Subject: Clarification for Section 15.8
Arturo,
Since I don't think I'm going to be able to write
unambiguous sentences and those that exist in this
section don't seem to completely clarify what happens
when calling blocking tasks, I'll write up an example
for this section. Everyone can make sure I haven't
made any silly syntax errors, and you can make sure
the comments correctly reflect the region of the
event queue when these statements are evaluated.
This should clarify the meaning of
"requires explicit synchronization upon return from the task"
which doesn't make it clear to me if it's the tool
that ensures the synchronization happens, or the user.
Thanks,
Stefen
===================================================
This examples demonstrates which statements
will be evaluated in the active region vs
the reactive region when calling module tasks
from the program:
module top;
reg clk = 0;
always #10 clk = ~clk;
prog p1(clk);
mod m1(clk);
endmodule
module mod(input clk);
reg a,b,c,d;
task t1;
begin
a = 1'b1; // REactive
@(posedge clk);
b <= 1'b1; // active
end
endtask
task t2;
begin
c = 1'b1; // active
@(posedge clk);
d <= 1'b1; // active
end
endtask
task t3;
begin
c = 1'b1; // active
@(posedge clk);
d = 1'b1; // active
end
endtask
endmodule
program prog(input clk);
reg w,x,y;
initial begin
@(posedge clk);
w = 1'b1; // REactive
m1.t1;
m1.t2;
x = 1'b1; // active
m1.t3;
@(posedge clk);
y = 1'b1; // REactive
end
endprogram
This archive was generated by hypermail 2b28 : Mon Mar 17 2003 - 11:48:40 PST