RE: [sv-cc] Proposal for DPI rand/randc handling

From: Warmke, Doug <doug_warmke_at_.....>
Date: Wed Jan 17 2007 - 11:23:27 PST
Ralph,
 
Thanks for the proposal.  It looks good.
 
One suggestion I would like to make is that it should be made clearer
that when C passes data to SV, and the SV variable is "qualified" (e.g.
with rand),
any current qualification state on the SV object will be left untouched.
 
Right now the proposal says the state is "ignored", but I could see
latitude
for some implementations to possibly "zero out" or otherwise set
the state bits during the value assignment
 
For example, an SV struct may have a field declared with "randc int".
Any random state associated with that int should be unaffected by the
value transfer from C to SV.  Only the value is affected.
 
This matches native SV semantics when performing a native SV assignment
from an unqualified int to that qualified int.
 
No big deal, but in the interest of clarity, I think this would be a
good
improvement on the proposal.
 
Regards,
Doug
 


________________________________

	From: owner-sv-cc@server.eda.org
[mailto:owner-sv-cc@server.eda.org] On Behalf Of Ralph Duncan
	Sent: Wednesday, January 17, 2007 11:05 AM
	To: sv-cc@server.eda.org
	Subject: [sv-cc] Proposal for DPI rand/randc handling
	
	

	There is a proposal for DPI handling of rand or randc qualifiers
with structs/unions; 
	This is Mantis item 1716, which: 

	. Documents our consensus to allow these qualifiers, while
ignoring their semantics 
	  and delivering structs/unions with the usual C-compatible
layout. 

	. Suggests changes for two sections (F.5 Semantic constraints
and F.6.4. Basic types). 

	1. General principle: 
	It treats our handling as a particular case of argument
'coercion,' a topic that was already 
	present in F.5.  We say that in such cases, the SV compiler can
coerce an actual 
	argument by stripping out any extra bits a simulator uses to
represent certain kinds 
	of qualifiers (see new paragraph in proposal). 

	2. Specific note for DPI users: 
	It adds a brief note in F.6.4, saying that formal and actual
arguments with rand/randc 
	qualifiers are legal but that the qualifiers are essentially
ignored and any relevant 
	argument coercion is done (cross-references F.5 changes for
coercion basics). 

	Thanks for any time you spend on this matter, 
	Ralph 


	-- 
	This message has been scanned for viruses and 
	dangerous content by MailScanner <http://www.mailscanner.info/>
, and is 
	believed to be clean. 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Jan 17 11:23:52 2007

This archive was generated by hypermail 2.1.8 : Wed Jan 17 2007 - 11:23:56 PST