It would be useful to know if DPI formals with legal, active rand qualifiers are restricted to structs or can occur with many data types. Here's an attempt to demonstrate that DPI can see many types with rand qualifiers. 1. SV classes can have data members that are 'random variables,' that are qualified with the rand or randc qualifier and that are integral type variables or are arrays and structs composed of integrals, etc. (LRM 13.3, esp. the bulleted list). Section examples include: rand byte data [] = {1,2,3,4}; rand bit [7:0] len; 2. SV classes can have methods that are native SV tasks and functions (7.1 and 7.6). 3. Anywhere a native task or function can be declared, a DPI import can be declared (26.1.1). 4. Therefore, it looks like an SV class can contain a DPI import and the import can have formals with rand qualifiers from a variety of data types that are integral types or based on them (as long as DPI supports them when the rand qualifier isn't present). If the above logic is flawed, is based on obsolete LRM sections or is overlooking some relevant LRM pronouncement, please broadcast that information. OTOH, if this is correct, then it would be helpful to hear of any rand type, other than structs, that is also posing problems. RalphReceived on Thu Dec 14 09:46:52 2006
This archive was generated by hypermail 2.1.8 : Thu Dec 14 2006 - 09:47:12 PST