[sv-bc] 2008 loop example

From: Alsop, Thomas R <thomas.r.alsop_at_.....>
Date: Tue Feb 19 2008 - 15:20:46 PST
One of the enhancements requested in yesterday's conference call was
another example of unique/unique0/priority violation glitches and
flushing specifically dealing with loops.  I have taken the example I
already have, so I can reference its behavior, and expanded it for
loops.  The second example below does this.  I am attempting to simplify
this as much as possible to only address the added semantics involved
with the loop statement.  Let me know if this is too simplistic or if
anyone has issues with this before we vote on it.

 

The following is an example of a unique-if that is immune to zero-delay
glitches in the active region set:

 

always_comb begin

    not_a = !a;

end

 

always_comb begin : a1

   u1: unique if (a)

          z = a || b;

       else if (not_a)

          z = a || c;

end

 

In this example, unique-if u1 is checking for overlap in the two
conditional expressions.  When a and not_a are in a state of 0 and 1
respectively and a transitions to 1, this unique-if could be executed
while a and not_a are both true, so the violation check for uniqueness
will fail. Since this check is in the active region set, the failure is
not immediately reported. After the update to not_a, process a1 will be
rescheduled, which results in a flush of the original violation. The
violation check will now pass, and no violation will be reported.

 

Another example shows how looping constructs are likewise immune to
zero-delay glitches in the active region set:

 

always_comb begin

   for (int j = 0; j < 3; j++) 

      not_a[j] = !a[j];

end

 

always_comb begin : a1

   for (int j = 0; j < 3; j++) 

      unique if (a[j])

         z[j] = a[j] || b[j];

      else if (not_a[j])

         z[j] = a[j] || c[j];

end

 

This example is identical to the previous example but adds loop
statements.  Each loop iteration independently checks for a uniqueness
violation in the exact same manner as the previous example.  Any
iteration in the loop can report a uniqueness violation. If the process
a1 is rescheduled, all violations in the loop are flushed and the entire
loop is re-evaluated. 

 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Feb 19 15:21:31 2008

This archive was generated by hypermail 2.1.8 : Tue Feb 19 2008 - 15:21:51 PST