# How to write subcircuits netlists in Spice with multiplicity factors?

I am trying to port a behavioral device model from Cadence Spectre to Spice. In Spectre it is very easy to instantiate multiple parallel instances of a subcircuit automatically - one just calls the subcircuit - an it works for any subcircuit - with an M factor. I have seen that Spice has this functionality for some components - e.g. capacitors, but I could not find anywhere any documentation on how to do it for my on subcircuits. Does anyone know if it is is possible in Spice and how to enable multiplicity in subcircuits?

That m is nothing but a convenient shortcut to adding several subcircuits/symbols in parallel. Internally, that's how the circuit is expanded/flattened. If your simulator doesn't have this option, then about the only alternative is to simply add, possibly ad nauseam, several subcircuits and connect them all in parallel. I don't know if m can be a float (as opposed to an int), but if so, then, obviously, you'll have to restrict yourself to a fixed number of subcircuits.
• It's possible that m is a reserved keyword. In LTspice it isn't, since both m, and n (which denotes the series multiplier for some elements), can be valid variables, and so they are not restricted. If you think this is the answer to your question, mark it down so that others, in the future, searching for similar problems, will see this answer with an accepted answer. – a concerned citizen Aug 10 at 9:42