Re: Generate & defparams in Vlog-2001.


Subject: Re: Generate & defparams in Vlog-2001.
From: Michael McNamara (mac@verisity.com)
Date: Thu Aug 09 2001 - 15:28:57 PDT


Krishna Garlapati writes:
> Precedence: bulk
>
>
>
>
> Stefen Boyd wrote:
>
> > looks like you're going to have to get used to seeing
> > additional scope before instances (just like with other
> > declarations inside a named block)... what's new is that
> > you will have named blocks that create scope for modules
> > and are indexed.
>
> Additional scope before instance is not the issue. As
> long as the "." separates names, I guess we are okay.
> The issue is the LRM says, it expects simple_identifiers
> in the defparam. Here is the grammar
> from LRM 2001:D6.
>
>
> parameter_identifier ::= identifier
>
> identifier ::= simple_identifier
> | escaped identifier
>
> simple_identifier : [a-zA-Z_] {[a-zA-Z0-9_$]}
>
> For a usage like :
>
> defparam somename[0].myflop = 1;
>
>
> I don't see any mention of '[' or ']' being
> a part of identifier. The usage is legal
> but inconsistent with the grammar.
>
> I think this is an error in the LRM and
> may be a special sub-section is required for
> defining defparams, or any usage where hierarchy
> reference is legal.
>
> For that matter even in the 1995 standard the
> grammar never mentioned of a usage like
>
> defparam one.two.three = 1;
>
> to be valid. All it talks about is an plain vanilla
> identifier. I think it should be replaced with
> hierarchical_identifier.
>
> Can any kind soul can point this out if I missed it.
>
> Thanks,
>
> --
> - Krishna.
> Synplicity Inc.
> (408)215-6152
>
>

You are correct; defparams appear to be incorrectly defined in the
1364-2001 BNF to accept only simple_identifier as the target.

In the 1987 VERILOG 1.1a manual, defparam's accept any lvalue as the
target, which encompasses one.two.three and so on.

It seems the creativity of 1364-2001 tried to unify parameter and
defparam to both take a list_of_param_assignements, which was wrong.

*sigh*

-mac



This archive was generated by hypermail 2b28 : Thu Aug 09 2001 - 15:45:40 PDT