[sv-ec] occurrences of range in the 3.1 spec


Subject: [sv-ec] occurrences of range in the 3.1 spec
From: Francoise Martinolle (fm@cadence.com)
Date: Mon Jan 13 2003 - 14:55:47 PST


I had the action item to find out all the occurrences where range was used
in the 3.1 spec.
This was needed in order to determine if all occurrences could take the
alternative
short hand notation.

Range can be used for:
data types declarations:
   packed vector [range]
   enum [range]
   unpacked arrays [range]
in task prototype declarations ex: task func (int a[3:1] [3:1])

in assertions expression sequences
   expr_sequence ::= expression | range | [constant_expression] ...
                               | expression_sequence * range

Issue: In the assertion context, ranges use both the short hand notation
and the full
notation to specify different things. A range specified [min:max] specifies
that the
expression preceding the range can be repeated a minimum or maximum number
of times
while if the range is specified as [n], this means that the expression must
be repeated a defined number n of times. In that case, we cannot use the
short hand notation interchangeably with the full notation.

in port type declaration, net declaration, variable declaration, trireg,
local param, param and specparam declarations can include a range.

name of instance, name of udp_instance can include a range (array
of instances)
escaped array identifier and simple arrayed identifier can also include a
range:

escaped_arrayed_identifier ::= escaped_identifier [range]

I also found in the spec a derivation rule for "range_expression" and
constant_range_expression
range_expression ::= expression | msb:lsb | base_expression +:
width_constant_expression | base_expression -:width_constant_expression
The range_expression is used in :
specify_input_terminal_descriptor, specify_output_terminal_descriptor,
net_concatenation_value, variable_concatenation_value, primary, net_lvalue,
variable_lvalue

I don't think we can use the short hand notation for the range expression
because it would not be
able to distinguish it from a bit select.



This archive was generated by hypermail 2b28 : Mon Jan 13 2003 - 14:56:53 PST