[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sym to verilog-ams
From: |
al davis |
Subject: |
Re: sym to verilog-ams |
Date: |
Mon, 4 Apr 2022 22:23:04 -0400 |
On Sun, 3 Apr 2022 13:14:57 +0200 (CEST)
karl@aspodata.se wrote:
> Can one have mult. identical modules or must a converter output
> just one ?
Officially, yes, but you need to provide some way to select which one
you want. This is commonly done to implement things like "binning" and
the "level" parameter.
One way to select is `ifdef . I won't discuss this one further because
it is familiar to everyone.
Another way is through a parameter, such as the "level" parameter that
Spice used to select different MOSFET models.
It would look something like this:
module nmos (d,g,s,b);
parameter level from [2:2];
.....
endmodule
module nmos (d,g,s,b);
parameter level from [12:13];
.....
endmodule
module nmos (d,g,s,b);
parameter level from [1:1];
.....
endmodule
The first one says that legal values for level are from 2 to 2,
inclusive. ..fancy way to say that only the number 2 is allowed.
That's according to the standard. Gnucap partially implements the
concept, with some hacks.
Another way, in the standard but not implemented in gnucap, is by
"attribute instance".
(* one *) module nmos (d,g,s,b);
....
endmodule
(* two *) .....
this example is probably wrong in details, but it expresses the idea.
Side note ... Attribute instance is a way to stash metadata like
colors, fonts, where is the label, that could be used in rendering a
schematic.
- gnucap-geda, sym file hndling (was Re: sym to verilog-ams), (continued)
Re: sym to verilog-ams, al davis, 2022/04/04
Re: sym to verilog-ams,
al davis <=
- Re: sym to verilog-ams, karl, 2022/04/05
- attributes, possible interface, Felix Salfelder, 2022/04/18
- Re: attributes, possible interface, al davis, 2022/04/18
- Re: attributes, possible interface, Felix Salfelder, 2022/04/19
- Re: attributes, possible interface, al davis, 2022/04/19
- Re: attributes, possible interface, Felix Salfelder, 2022/04/20
- Re: attributes, possible interface, correction, Felix Salfelder, 2022/04/20