What is the difference between .MACRO
and .SUBCKT
in SPICE simulators, such as HSPICE?
Electronic – Difference between .MACRO and .SUBCKT in SPICE
spice
Related Topic
- Electronic – .SUBCKT command in SPICE
- VerilogIn and Spice out in Cadence or Synopsys
- Subckt design in SPICE
- Electronic – Turning a Subcircuit block into a Transfer Function for faster simulation in SPICE
- Electronic – LTSpice error with V() function, … when referencing net within a subckt (V(subCktName.NetName))
- Electronic – Can a spice library contain different component types
Best Answer
A .SUBCKT model is generally used to model a circuit by its building blocks of actual devices so that it can be instantiated over and over by a top level wrapper.
A .MACRO model, uses some functional blocks for certain elements (such as substituting a non-linear functional model for an op-amp) in order to speed up simulation time at the possible cost of accuracy loss. *
*See 'SPICE Book', A. Vladimerscu.
**Macro is used in a slightly different manner in HSPICE manuals. In the HSPICE manual, they refer to the macro as the callable higher level object to be instantiated. e.g. INV would be an instantiable macro cell block (providing only block, node names, and parameters), while one (or more) level(s) lower would contain the sub-circuit device modeling.
It's also possible for the macro to be provided by a vendor to provide behavioral modelling without divulging the internal sub-circuit designs.