Re: Generate & defparams in Vlog-2001.


Subject: Re: Generate & defparams in Vlog-2001.
From: Krishna Garlapati (krishna@synplicity.com)
Date: Thu Aug 09 2001 - 13:35:48 PDT


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



This archive was generated by hypermail 2b28 : Thu Aug 09 2001 - 13:51:16 PDT