TomH_vams
New Member
Offline
Posts: 1
USA
|
Some verilog-a compact models heavily use macros to define model & instance parameters. What is the purpose and benefit of this, compared to just using conventional parameter declarations?
Some examples from ASMHEMT 101.4, which defines nearly 40 such macros:
`define MPRnb(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def; `define MPRex(nam,def,uni,exc, des) (*units=uni, desc=des*) parameter real nam=def exclude exc; `define MPRcc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from[lwr:upr]; `define MPRoo(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from(lwr:upr); `define MPRco(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from[lwr:upr); `define MPRoc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from(lwr:upr]; `define MPRcz(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def from[ 0:inf); `define MPRoz(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def from( 0:inf); etc
and a few specific uses in ASMHEMT: `MPRco( tnom ,27.0 ,"deg C" ,-`P_CELSIUS0,inf ," Nominal Temperature in degree Celsius" ) `MPRcc( voff ,-2.0 ,"V" ,-100.0 ,5 ," Cut-off voltage" ) `MPRoo( kt1 ,0.0e-3 ,"" ,-inf ,inf ," Temperature Dependence for Voff" )
etc
I asked one of the original asmhemt developers about this, and he replied "the EDA publisher(s) wanted it".
I've seen same method used in PSP, MSIMCMG, and other compact models, so it's not simply a developer's preference.
What is advantage vs using simple parameter declarations?
Is it a convention that I'm simply unaware of? Where would I find the relevant style manual? (I'm not a CMC member)
|