ISSUE 226

Number 226
Category errata
Synopsis Illegal to assign mintypmax expression to parameter?
State lrmdraft
Class errata-discuss
Arrival-DateDec 23 2002
Originator "Brad Pierce" <Brad.Pierce@synopsys.com>
Release 2001b
Environment
Description
According to the V2K BNF, the following module is illegal --

module m_illegal ;
parameter p = 1:2:3;
endmodule

and the following module is legal --

module m_legal ;
parameter p = (1:2:3);
endmodule

Was that the intent? Tools seem to be just as happy with
m_illegal as with m_legal.

If m_illegal is indeed illegal, how about adding an example?

Likewise, according to the BNF, the following parameter assignments
are illegal

#(.p(1:2:3))
#(1:2:3)

and the following are legal

#(.p((1:2:3))
#((1:2:3))

but the tools seem to be just as happy with the illegal versions.

-- Brad


Fix
In A.2.4

REPLACE

param_assignment ::=
parameter_identifier '='
constant_expression

WITH

param_assignment ::=
parameter_identifier '='
constant_mintypmax_expression

and in Syntax 12-2 and A.4.1

REPLACE

ordered_parameter_assignment ::= expression
named_parameter_assignment ::=
'.' parameter_identifer
'(' [ expression ] ')'

WITH

ordered_parameter_assignment ::= mintypmax_expression
named_parameter_assignment ::=
'.' parameter_identifer
'(' [ mintypmax_expression ] ')'

Audit-Trail
From: Shalom.Bresticker@motorola.com
To: etf-bugs@boyd.com
Cc:
Subject: Re: errata/226: PROPOSAL - Illegal to assign mintypmax expression
to parameter?
Date: Mon, 23 Jun 2003 08:37:52 +0300 (IDT)

I do not accept that explanation.

Historically, specparams were only allowed in specify blocks.
Only in 1364-2001 were they allowed also outside of specify blocks.

Parameters were always allowed min:typ:max expressions.
The only question is about the parentheses.
As already pointed out, even the 1364-1995 tools allow them without parentheses
in certain situations.

Shalom


> Keep the existing behaviour. Section 3.11.3 describe the difference between
parameters and specify parameters and it states that specify parameters is a
special type of parameter intended only for providing timing and delay values.
Specparams allow the use of mintypmax_expression but parameter declarations
does not. Table 8 in section 3.11.3 is clearly stating that parameters may not
be assigned specparams so it is ok that they are declared differently.

> Parameters may be assigned constant_expressions which include constant_primary and
constant_primary include (constant_mintypmax_expression), hence example
m_legal is OK but m_illegal is not.
>
> Add the following line in the last example in section 3.11.1:
> parameter p = (1:2:3); //parenthesis required since constant_mintypmax_expression is not allowed.

> http://boydtechinc.com/cgi-bin/issueproposal.pl?cmd=view&pr=226

--
Shalom Bresticker Shalom.Bresticker@motorola.com
Design & Reuse Methodology Tel: +972 9 9522268
Motorola Semiconductor Israel, Ltd. Fax: +972 9 9522890
POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 441478


Analyzed by etf@boyd.com on Mon Aug 25 03:46:14 2003
This is just to delete old proposal.


From: Shalom.Bresticker@motorola.com
To: Brad.Pierce@synopsys.com
Cc: etf-bugs@boyd.com
Subject: Re: errata/226: PROPOSAL - Illegal to assign mintypmax expression
to parameter?
Date: Sat, 20 Sep 2003 22:35:21 +0300 (IDT)

I oppose the proposal.

We have already concluded that the BNF is faulty and does not correctly
describe the tool behaviors, which allow the so-called illegal cases.

Similarly, the statement that
"Specparams allow the use of mintypmax_expression but parameter declarations do
not" is not correct.

At the Aug. 11 ETF meeting, we rejected an identical proposal.

Shalom


> APPEND the following line to the examples at the end
> of 3.11.1
>
> parameter p = (1:2:3); //parenthesis required since constant_mintypmax_expression is not allowed
>
> Answer to original question: The behavior is correct as described. Section 3.11.3 describes the difference between parameters and specify parameters and it states that a specify parameter is a special type of parameter intended only for providing timing and delay values. Specparams allow the use of mintypmax_expression but parameter declarations do not. Table 8 in section 3.11.3 is clearly stating that parameters may not be assigned specparams, so it is OK that they are declared differently.
> Parameters may be assigned constant_expressions, which include constant_primary and constant_primary, which includes (constant_mintypmax_expression), hence example m_legal is OK but m_illegal is not.

--
Shalom Bresticker Shalom.Bresticker@motorola.com
Design & Reuse Methodology Tel: +972 9 9522268
Motorola Semiconductor Israel, Ltd. Fax: +972 9 9522890
POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 441478



From: "Brad Pierce" <Brad.Pierce@synopsys.com>
To: <etf-bugs@boyd.com>
Cc:
Subject: RE: errata/226: PROPOSAL - Illegal to assign mintypmax expression to parameter?
Date: Sun, 21 Sep 2003 08:54:34 -0700

Shalom,

You are completely right. Thank you for pointing out my mistake,
because I seem to have lost my memory of that ETF meeting. I'm glad
there are meeting minutes (and Shalom), because, according to the
meeting minutes I have an action item to correct the BNF!

Thanks again,

-- Brad

Date: Fri, 3 Oct 2003 22:41:43 -0700
From: Brad.Pierce@synopsys.com
To: etf-bugs@boyd.com
Subject: errata/226: PROPOSAL - Illegal to assign mintypmax expression to parameter?

Precedence: bulk

In A.2.4

REPLACE

param_assignment ::=
parameter_identifier '='
constant_expression

WITH

param_assignment ::=
parameter_identifier '='
constant_mintypmax_expression

and in Syntax 12-2 and A.4.1

REPLACE

ordered_parameter_assignment ::= expression
named_parameter_assignment ::=
'.' parameter_identifer
'(' [ expression ] ')'

WITH

ordered_parameter_assignment ::= mintypmax_expression
named_parameter_assignment ::=
'.' parameter_identifer
'(' [ mintypmax_expression ] ')'


http://boydtechinc.com/cgi-bin/issueproposal.pl?cmd=view&pr=226

Date: Sat, 4 Oct 2003 11:26:35 -0700
From: Brad Pierce <Brad.Pierce@synopsys.com>
To: Shalom Bresticker <Shalom.Bresticker@motorola.com>
Subject: RE: errata/226: PROPOSAL - Illegal to assign mintypmax expression to parameter?

When the proposal mechanism is working again, I will update
this to also replace in A.2.4

defparm_assignment ::=
hierarchical_parameter_identifier '='
constant_expression

with

defparm_assignment ::=
hierarchical_parameter_identifier '='
constant_mintypmax_expression

October 6, 2003:

Discussed in ETF.
Opposition to extension of defparam statement.
Unmodified proposal (no defparams) was passed.
Brad will file a new issue for the defparam change (#493).


Unformatted


Hosted by Boyd Technology