[sv-bc] $ assignment with parameter

From: Surya Pratik Saha <spsaha_at_.....>
Date: Mon Jan 16 2006 - 01:24:43 PST
Hi,
As per IEEE 1800 BNF, $ can be assigned to a parameter at the time of
declaration. When parameter is overridden, $ can not be passed.
This is the rule:

parameter_declaration ::=
parameter data_type_or_implicit list_of_param_assignments

list_of_param_assignments ::= param_assignment { , param_assignment }

param_assignment ::=
parameter_identifier { unpacked_dimension } = constant_param_expression
// from A.2.4

constant_param_expression ::=
constant_mintypmax_expression | data_type | $

And the instance rule is as:
module_instantiation ::=
module_identifier [ parameter_value_assignment ] hierarchical_instance { ,
hierarchical_instance } ;
list_of_parameter_assignments ::=
ordered_parameter_assignment { , ordered_parameter_assignment }
| named_parameter_assignment { , named_parameter_assignment }
ordered_parameter_assignment ::= param_expression
named_parameter_assignment ::= . parameter_identifier ( [ param_expression ] )
param_expression ::= mintypmax_expression | data_type

So param_expression is missing $. But in page 68 (section 6.3.2.1), there is an
e.g.

quiet_time_checker #(0, $) quiet_any (clk,1,enables);

Which is by BNF is illegeal.

I have few more questions:
- Can we not assign $ to a parameter by defparam?
- How do we assign $ for parameter array?
Is the following line valid?
parameter p[2:0] = $;

Regards
Surya.
Received on Mon Jan 16 01:19:09 2006

This archive was generated by hypermail 2.1.8 : Mon Jan 16 2006 - 01:21:05 PST