[sv-cc] General idea for DPI qualifiers

From: Ralph Duncan <RDuncan_at_.....>
Date: Mon Dec 18 2006 - 15:00:17 PST
Analogy: One often votes on local measures to grant tax relief to worthy recipients: the aged, war veterans,
the disabled.  Each individual proposal seems reasonable but over time this creates a patchwork of exceptions 
and special-cases that's as complicated as medieval guild laws.

Relevance: Having DPI ignore any simulator-specific bits for rand semantics is sensible but it's all the better if 
we can handle it as part of a clear stmt of general principle, rather than as a special case.
The general idea might be: 'If a datatype that DPI otherwise processes is associated with a qualifier or pragma that
involves semantics present in SV but not C, then DPI accepts formal and actual arguments of such a datatype 
when they are legally visible but with these restrictions:  the DPI interface does not provide the associated SV semantics 
for the C realm, no extra bits used by the simulator for those semantics are passed to C, and no values for such bits
are written when the data passes from C to SV.'
<At least that's a general principle, though we could allude to the 'rand' case as an example.  Is the principle viable?>

The rand business has exposed several areas that involve exceptions, special-casing or questions about legality:
1. A DPI import can be used anywhere a native TF can be (except when it can't be, e.g. as a class method).
2. Some kinds of data with rand/randc qualifiers could appear as DPI formals; how to handle such formals.
3. How to handle DPI actuals associated with rand qualifiers when they are paired with DPI formals that lack qualifiers.
4. Whether rand/randc qualifiers can appear outside classes or have any meaning if they do.
 
Any case where we can respond with a general principle, rather than a special-case would seem helpful to the language.
Similarly, resolving any contradiction between text stmt and BNF in favor of language consistency, is probably a plus.
Informal plan: Over the holidays, I hope to recheck the mail on the 4 areas, propose something like the general principle
above for discussion and, ultimately, ask others to coordinate on their related Mantis items.
Ralph
Received on Mon Dec 18 14:59:54 2006

This archive was generated by hypermail 2.1.8 : Mon Dec 18 2006 - 15:01:01 PST