[sv-bc] Mantis 1209: clarify that parameters can be arrays

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Mon Aug 21 2006 - 06:46:23 PDT
  

This is a draft proposal for Mantis 1209, to clarify that parameters can
be aggregates, and in particular arrays. This is one of many cases where
the BNF allows a certain construct, but the LRM does not describe it,
and it is not obvious to some readers (like me) that it is allowed
unless explicitly pointed out. The purpose of the draft is to elicit
comments in order to improve the final proposal.

 

A parameter can also be declared as an aggregate type, such as an
unpacked array or an unpacked struct. An aggregate parameter must be
assigned to or overridden as a whole; individual members of a parameter
aggregate may not be assigned or overridden separately. However, an
individual member of a parameter aggregate may be used in an expression.
For example, 

parameter logic [31:0] P1 [3:0] = '{ 1, 2, 3, 4 } ; // array parameter
declaration

if ( P1[2] [7:0] ) ... // use part-select of individual element of the
array

 

Thanks,

Shalom

Shalom Bresticker

Intel Jerusalem LAD DA

+972 2 589-6852

+972 54 721-1033

I don't represent Intel 

 



image001.gif
Received on Mon Aug 21 06:46:53 2006

This archive was generated by hypermail 2.1.8 : Mon Aug 21 2006 - 06:47:16 PDT