Re: Attribute questions

From: Steven Sharp (sharp@cadence.com)
Date: Mon Nov 15 1999 - 18:23:27 PST


Here are answers to James' questions about attributes. I don't know if
these need clarification in the spec.

> > What constraints are placed on the constant_expression assigned to an
> > attribute? Are only constants allowed as primaries in the expression?
> > What about parameters? What about specparams? What about the values
> > of other attributes?

The constraints are pretty much the same as any other constant expression.
The expression must consist of literal constants and parameters. It happens
that specparams work for the OVI attributes in XL and NC, but this is probably
an oversight in type-checking. There is no way to access the value of an
attribute in any expression, including these. There is no syntax defined to
indicate what object's attribute value you wanted, for starters.
 
> > Presumably it is perfectly legal to use what are otherwise reserved words
> > as attribute names, since they are in a different name space.

Reserved words are not legal identifiers in any context. The point of having
reserved words is to avoid context sensitive lexical analysis.

> >
> > Also, is it legal for the same attribute to be specified more than once
> > in a single attribute instance? For example,
> > (* attra=1, attra=0, attra=2 *)
> > Is this legal? Does this assign the value 2 to attra? Is this tool-
> > dependent, so that the tool might actually see all three specifications?

No, it is not legal. These are declarations, not assignment statements.
This was more obvious with the OVI syntax, since the declaration included
the word "const" and a type.

I don't see any of the questions that were mentioned about other places
where attributes might be useful. I did determine that OVI attributes
can be attached to UDP declarations or instantiations. They cannot be
attached to parameters or specparams. Were there any other places that
seemed useful?



This archive was generated by hypermail 2.1.4 : Mon Jul 08 2002 - 12:53:31 PDT and
sponsored by Boyd Technology, Inc.