> -----Original Message-----
> From: geoffrey.coram@analog.com [mailto:geoffrey.coram@analog.com]
> Sent: Tuesday, May 11, 2004 10:31 AM
> To: Kevin Cameron
> Cc: VerilogA Device Modeling Reflector; verilog-ams@eda.org
> Subject: Re: descriptions as attribute
>
> Kev -
> I'm not sure a `define would work well, if I'm trying to
> mix-and-match the range parentheses. Modifying an example
> you sent earlier:
>
>
> `define RL_PARM(nm,vl,ra,ds) (*desc=ds*) parameter real nm := vl from
ra;
> ...
> `RL_PARM(Vp, 1.0, [0:inf), "High level of triangular waveform")
>
> Now my parser gets confused by the ) after "inf", so then I have
> to define several macros for the various combos (), (], [), []
> (and one for no range, and maybe one for no description) ...
Yeah, never did like that range syntax, but you can do:
`define R0INF [0:inf)
`RL_PARM(Vp, 1.0, `R0INF, "High level of triangular waveform")
> I don't think this is a minor complain for compact modeling,
> where there are typically an order of magnitude more parameters
> than for other behavioral models.
>
> -Geoffrey
I don't disagree that it's sub-optimal, but I don't think it can
be fixed by this committee.
Kev.
Kevin Cameron, CPU Technology, CA 94588, Tel.: (925) 225 4862
>
>
>
> Kevin Cameron wrote:
> > That would make sense if the attribute applies to all items
> > declared e.g.:
> >
> > (*desc="resistance"*) parameter real res = 1 from (0:inf),
> > r2 = 5,
> > r4 = 20;
> >
> > As far as "ugly" goes: this is minor compared to other syntax
> > and semantics that have been introduced, and you can use
> > `define and `include to tidy it up if you have lots of them.
> >
> > Kev.
Received on Tue May 11 10:53:58 2004
This archive was generated by hypermail 2.1.8 : Tue May 11 2004 - 10:53:59 PDT