Qucs / ADMS

ADMS is a code generator for the Verilog-AMS language
GNU General Public License v3.0
94 stars 31 forks source link

Allow for multiple attribute instances #107

Closed ngwood closed 2 years ago

ngwood commented 2 years ago

Version 2.3.0 of the Verilog-AMS Language Reference Manual introduced multiple attribute instances; e.g.,

(* desc = "length", units = "meters", type = "model" *)

and

(* desc = "length", units = "meters" *) (* type = "model" *)

are concidered equivalent.

Currently, ADMS can only handle the former. This commit also allows for the latter to be used.

This is a very useful addition, given that the CMC standard macros for defining parameters and output variables contain attribute instances; e.g., a CMC compliant macro definition for a real model parameter with no bounds would be as follows.

`define MPRnb(nam, def, uni, des)\
(* units = uni, desc = des *) parameter real nam = def

Additional attributes can now be prepended; e.g.,

(* my_attr *) `MPRnb(l, 0.0, "meters", "length");