Re: descriptions as attribute

From: Geoffrey.Coram <Geoffrey.Coram@analog.com>
Date: Tue May 11 2004 - 10:30:45 PDT

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) ...

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

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:30:52 2004

This archive was generated by hypermail 2.1.8 : Tue May 11 2004 - 10:30:53 PDT