[sv-cc] concatenations and structure/array constructors

From: Francoise Martinolle <fm@cadence.com>
Date: Thu Feb 03 2005 - 07:12:42 PST

I looked at the information model we have for concatenations and
structure/array constructors.
We represent such expressions as a vpiConcatOp which has operands which can
be traversed.
VPI does not have the possibility today to exactly represent how a
structure/array constructor
was written by the user (for example providing the key, index or default
key).
This is fine as long as the expression returned is equivalent to the
expression in the original source.
Note that this would not be acceptable if VPI were to represent information
after analysis as the structure/array
constructors are evaluated in the context of the assignment to a lvalue and
the type/layout of the lvalue
must be known in order to do this. But this is not an issue today,
as the VPI standard model is not certified for supporting pre elaboration
access. There are plenty of other
issues of this sort which would need to be fixed in order to support VPI pre
elaboration.
 
In any case, the latest development of errata #254 differentiates
syntactically a regular verilog concatenation of
bits from a structure or array constructor. The latter will have the curly
brace { preceded with a quote ' . For example:
'{1:1, default: 0}
Additionally the terminology has changed and call these "assignment
patterns".
 
I think that the only VPI change which is currently required to be
consistent with the language
is to add a new vpiOpType constant vpiAssignPatternOp.
Having a different optype will also facilitate future enhancements of VPI to
support pre elaboration: for ex,
access of the assignment pattern expression so that we can provide the
associations between the keys and the
expression values associated with the keys.
 
 
If the proposal of 254 is passed, I recomment to add a new vpiOptype value:
vpiAssignPattern.
This is consistent with the reasoning of the BC committee who feels that we
need to differentiate the
two language constructs.
 
Francoise
       '
Received on Thu Feb 3 07:12:48 2005

This archive was generated by hypermail 2.1.8 : Thu Feb 03 2005 - 07:13:07 PST