Re: [sv-bc] illegal priority if

From: Adam Krolnik <krolnik_at_.....>
Date: Thu Jan 12 2006 - 13:29:05 PST
Hi all;

Mac wrote:
>Another possibility is:

>if (!$onehot({a,b,c}) ) begin  // note that is a, b or c is unknown, this will not trigger
>	$display($stime,,"Unique If Violation!! More than one term of {a,b,c} is true");
>	$stop;
>end 
>else if (a) begin
>  ....

I would humbly suggest something like this:

assert property ($onehot($a, $b, $c)) // using the default clock, and default reset
  else $error("Unique If Violation for {a,b,c} = ", a, b, c);
if (a) begin
....

This would prevent false failures due to skew in the signals or simulation artifacts.



-- 
    Adam Krolnik
    ZSP Verification Mgr.
    LSI Logic Corp.
    Plano TX. 75074
    Co-author "Assertion-Based Design"
Received on Thu Jan 12 13:29:18 2006

This archive was generated by hypermail 2.1.8 : Thu Jan 12 2006 - 13:29:52 PST