RE: [sv-bc] enumerated variable used with an equality operator

From: Brad Pierce <Brad.Pierce@synopsys.com>
Date: Fri Mar 21 2014 - 15:08:01 PDT
In http://www.eda.org/svdb/view.php?id=4811 I proposed using the deferred immediate assertions mechanism to support subtype of singular types using the inside operator and typedef. For example,

    typedef integer T inside {[0:N-1]};

This clause would yield no change in type(T), $left(T), $bits(T) and so on, nor in type(v), $left(v), $bits(v) and so on for a data object v declared with T. The clause just adds another assertion-like requirement to be checked, similar to unique-case-inside.

Whenever 1) a data object or struct or union member of this subtype is read, 2) an index expression is evaluated for an associative array declared that uses this subtype as its index type, 3) a static cast to this subtype is returned, or 4) a function with this subtype as its return type is evaluated, it should be checked that the value satisfies the condition in the declaration. If not, the violation should be reported similarly as for

    unique case (v) inside
      [0:N-1] : ...
    endcase

and the result value should be as if there had been an out-of-bounds array read, that is, the default initialization value for the underlying type. As with unique-case violations, these checks should be immune to false violation reports due to zero-delay glitches in the active region set.

Replying to http://www.eda.org/sv-bc/hm/11541.html .

-- Brad



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Mar 21 15:08:18 2014

This archive was generated by hypermail 2.1.8 : Fri Mar 21 2014 - 15:08:26 PDT