I don't see any reason why they couldn't be treated in DPI just as ordinary struct members are -- i.e., struct members without the rand and randc qualifiers. The C side wouldn't be able to detect the qualifiers, of course -- but then the client could always use VPI if they need that particular info. To my mind, the rand and randc qualifiers simply connect the struct members with the built-in functions such as randomize() (and the mode setting functions). Conceptually, one can look at randomize() as a function that does some calculations and then sets the values of certain data values. Since any other function can do the same thing, I don't think that DPI should handle these struct members any differently. Clarification: Does a declaration with rand and randc qualifiers have to appear only inside a class declaration? If so, is there any limitation on how DPI handles objects declared inside classes? Regards, Jim --------------------------------------------------------- James H. Vellenga 978-262-6381 Engineering Director (FAX) 978-262-6636 Cadence Design Systems, Inc. vellenga@cadence.com 270 Billerica Rd Chelmsford, MA 01824-4179 "We all work with partial information." ---------------------------------------------------------- ]-----Original Message----- ]From: owner-sv-cc@eda.org [mailto:owner-sv-cc@eda.org] On ]Behalf Of Warmke, Doug ]Sent: Wednesday, November 29, 2006 2:47 PM ]To: sv-cc@eda.org ]Subject: [sv-cc] Question on "rand" qualifer on struct elements ] ]Hello SV-CC, ] ]I have a nice DPI question for everyone to ponder. ] ]In SV, it is possible to declare struct elements ]as "rand" or "randc": ] ]struct { ] int I; ] rand int J; ] randc int K; ]} S; ] ]Should structs with these element datatype qualifiers ]be allowed as DPI arguments? ] ]Are there any other similar qualifiers we should watch ]out for? ] ]Thanks, ]Doug ] ]Received on Tue Dec 5 08:46:12 2006
This archive was generated by hypermail 2.1.8 : Tue Dec 05 2006 - 08:46:37 PST