RE: [sv-ec] Minutes from today's meeting -EXT 7


Subject: RE: [sv-ec] Minutes from today's meeting -EXT 7
From: Jay Lawrence (lawrence@cadence.com)
Date: Fri Nov 21 2003 - 08:00:06 PST


I disagree with the following "trick".

>
>
> * It is stated that one can make normal verilog code execute
> in the reactive region by performing this trick.
>
> program trick;
> assign s_detect = ! s_detect;
> endprogram
>
> always @(posedge clk)
> begin
> @(s_detect);
> // Switched to reactive region now!
> ... // use .triggered, or other reactive region only things...
> end
>
>

Note that code never "executes in the reactive region". All code
Executes in the Active region. The other regions are just places to
schedule FUTURE processes so that a partial order between there
execution can be maintained.

In the case above (if the s_detect was visible at all per Arturo's
comment), this always block would:

1) Wait on posedge of clk.
2) When posedge clk happened it would be placed in the InActive region
3) The InActive would eventually be promoted to the Active region
4) The block would wait on s_detect
5) Eventually the "reactive region" would be promoted to the Active
region
6) The program block would run, modifying s_detect
7) The always block would be scheduled in the Inactive region
8) Eventually this Inactive region would be promoted to Active
9) The always block would run again

Note that step 9 happens in the same simulation time as step 6 so my
understanding is that .triggered would still be true on any event that
changed in this time.

Jay



This archive was generated by hypermail 2b28 : Fri Nov 21 2003 - 08:01:02 PST