RE: [sv-bc] $ assignment with parameter

From: francoise martinolle <fm_at_.....>
Date: Mon Jan 16 2006 - 08:07:31 PST
 
I found 2 notes in annex A.10 related to the use of the $.The last note (22)
is in conflict with the fact 
that a parameter can be assigned the value $.
These notes are:
20) It shall be legal to use the $ primary in an open_value_range of the
form [ expression : $ ] or
[ $ : expression ].
22) The $ primary shall be legal only in a select for a queue variable or in
an open_value_range.


Assuming we allow overriding integer parameters with the value $ like in the
example that Surya brought up,
What is the resulting value of operators with a $ operand?

Ex:
Assume that max_quiet overriden value is $, is it legal to write:

parameter min_quiet = max_quiet - 4; 
and what is the value of min_quiet? Is it $?
Basically I think we need to specify the value of $ used as an operand to
any built
integer operators.

Francoise
    '

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Surya
Pratik Saha
Sent: Monday, January 16, 2006 4:25 AM
To: sv-bc@eda.org
Subject: [sv-bc] $ assignment with parameter

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 08:07:41 2006

This archive was generated by hypermail 2.1.8 : Mon Jan 16 2006 - 08:08:12 PST