Re: [sv-cc] Value change callbacks with variable indexes -- and (not) for automatic variables

From: Charlie Dawson <chas_at_.....>
Date: Thu Nov 08 2007 - 13:26:44 PST
Hi All,

And just for the record, I was part of the PTF discussion and thru
some memory jogging, agree that this what we discussed and intentionally
decided.  Sorry, my memory was not very good on this.

   -Chas


Jim Vellenga wrote:
> Abi, Chuck, et alii,
> 
> At Charles's suggestion, I checked with a member of the now-defunct PLI 
> Task Force, David Roberts.  He recalled a long-ago but vigorous 
> discussion of what a cbValueChange callback should be sensitive to.  
> The task force's decision was to be consistent with the sensitivity of 
> event control expressions and $monitor() arguments.  One can poke 
> around the LRM for statements about what that means, but in short:
> 
> "... when you put a callback on a[i] you should get a callback when 
> ever the value pointed at by a[i] changes.  This can happen because the 
> value in the object index by "i" changes
>    reg a[3:0];
> 
>    i = 0;
>      put cb on a[i].
>    now update the value of a[0].  a[0] = 1;
>        a[i] just went from an X to 1.
> 
> the callback should fire when "i" changes if and only if the value that 
> a[i] now points is different then what it was from the last time the 
> callback fired.
> 
> ...
> 
> And yes we have to handle the case when the index goes out of range.  
> For that case the value is "X"; this behavior is defined by the Verilog 
> HDL language."
> 
> So at this point I'm thinking of simplifying our description of what is 
> and is not supported by referring to what event control statements and 
> $monitor() arguments can handle and are sensitive to.
> 
> Incidentally, one side effect of this is that we can probably exclude 
> automatic variables and their subelements as value change arguments, 
> since the $monitor() system task does not allow them (Draft 4, 13.3.2).
> 
> I don't know yet if they can be used as event control expressions, 
> though.
> 
> Regards, 
> Jim V.
> 
> --------------------------------------------------------- 
> James H. Vellenga                            978-262-6381 
> Software Architect                     (FAX) 978-262-6636 
> Cadence Design Systems, Inc.         vellenga@cadence.com 
> 270 Billerica Rd
> Chelmsford, MA 01824-4179
> "We all work with partial information." 
> ---------------------------------------------------------- 
> 


-- 
Charles Dawson
Senior Engineering Manager
NC-Verilog Team
Cadence Design Systems, Inc.
270 Billerica Road
Chelmsford, MA  01824
(978) 262 - 6273
chas@cadence.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Nov 8 13:27:18 2007

This archive was generated by hypermail 2.1.8 : Thu Nov 08 2007 - 13:27:37 PST