4
\$\begingroup\$

What is the difference between .MACRO and .SUBCKT in SPICE simulators, such as HSPICE?

\$\endgroup\$
5
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.