SV-CC team, 
Please find below a suggested addition to the LRM.  Our intent is to
prevent 
users from making erroneous, though perhaps natural, assumptions about 
certain type equivalences.  Please let me know if you think this might
be helpful. 
Thanks, 
Ralph 
--------------------------------- 
1. Request 
Please add the following remarks to Annex E.6.4 as a stand-alone
paragraph, 
following the remark about DPI unsigned types: 
"Note that input mode arguments of type 'byte unsigned' and 'shortint
unsigned' 
are not equivalent to bit[7:0] or bit[15:0], respectively, since the
former are 
passed as C types 'unsigned char' and 'unsigned short' and the latter
are passed 
as C 'unsigned int' (i.e., svBitVec32).  A similar lack of equivalence
applies 
to passing such parameters by reference for output and inout modes." 
2. Rationale 
This warns users who might otherwise assume that these bit vectors and
integral types 
are equivalent. 
3. Background 
a. unsigned byte = C unsigned char and unsigned shortint = C unsigned
short (E.6.4). 
b. input mode packed bit arrays <= 32 bits are passed as svBitVec32
(E.7.7). 
c. svBitVec32 = C unsigned int (svdpi.h, F.1). 
d. bit vectors default to unsigned (3.3.3). 
--------------- 
Ralph Duncan 
Staff Engineer 
Mentor Graphics 
San Jose, CA 
408-487-7414 
Received on Thu Mar 18 13:38:00 2004
This archive was generated by hypermail 2.1.8 : Thu Mar 18 2004 - 13:38:11 PST