Re: [sv-ec] Proposal uploaded for 1313 (coverpoint and bins expression resolution)

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Thu May 11 2006 - 06:43:08 PDT
Swapnajit Chakraborti wrote:
> Hi Gord,
> 
> In general, does Verilog/SysV LRM states anywhere
> that there should be a warning if the rhs of a
> variable assignment is out of range of lhs?

No - Verilog automatically truncates.

The reason for the special behavior here (and why it might be
reasonable to specify values rather than leave it be "implementation
defined behavior), is that for coverpoint bins ranges you are
really describing a range in values in a "wider" domain that either
the coverpoint expression or the bins expression.  This came up
in the original email thread; you might want to look at some of
the examples in the email thread starting at:
    http://www.eda.org/sv-ec/hm/2819.html

A simple example is the issue is that for a bins range of 0..8
related to a coverpoint expression of 3 bits, you really do not want
this to silently become a range of 0..1.

Gord.


> I believe this behavior is mostly implementation
> defined. 
> So, while I agree with the proposal regarding the
> way the type is determined for bin value
> expression, generation of warning may not be
> absolutely necessary.
> 
> Thx,
> Swapnajit. 
> 
> 
>>-----Original Message-----
>>From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On 
>>Behalf Of Gordon Vreugdenhil
>>Sent: Tuesday, May 09, 2006 8:27 PM
>>To: SV_EC List
>>Subject: [sv-ec] Proposal uploaded for 1313 (coverpoint and 
>>bins expression resolution)
>>
>>I've uploaded a proposal for Mantis 1313 ("No definition for 
>>coverpoint and bin expression type rules").
>>
>>http://www.eda.org/svdb/bug_view_page.php?bug_id=0001313
>>
>>Note that part of what the proposal effectively says that if a 
>>bins value is outside the representable range of the 
>>coverpoint expression then a warning is generated and the 
>>value used for the expression is implementation defined.  I 
>>could set up rules for what the expression should be in such 
>>cases but I don't feel too strongly about codifying that.  If 
>>the consesnsus is that we should codify that part as well, I 
>>can add something about that.
>>
>>Gord.
>>--
>>--------------------------------------------------------------------
>>Gordon Vreugdenhil                                503-685-0808
>>Model Technology (Mentor Graphics)                gordonv@model.com
> 
>>

-- 
--------------------------------------------------------------------
Gordon Vreugdenhil                                503-685-0808
Model Technology (Mentor Graphics)                gordonv@model.com
Received on Thu May 11 06:43:07 2006

This archive was generated by hypermail 2.1.8 : Thu May 11 2006 - 06:43:16 PDT