Electrical – spice: unknown parameter ($)

ltspicespice

This spice file

.include ntyp.md
.include ptyp.md

vvdd VDD GND_ 5
vgnd GND_ 0 0

vin IN GND_ pwl(0 0 100n 0 101n 5 200n 5 201n 0 300n 0 301n 5 400n 5)
.tran 1p 400n
.print tran v(IN) v(OUT)

M1 OUT IN GND_ GND_ EN l=5e-07 w=1.2e-06  $ (44 7.4 44.5 8.6)
M2 OUT IN VDD VDD EP l=5e-07 w=2.4e-06  $ (44 12.1 44.5 14.5)

gives the error unknown parameter ($) when I run it locally. I've tried this on AIM-spice and LTspice. However, when another person runs the same code on another computer it doesn't give this error. ntyp.md & ptype.md are located in the same folder as the spice file. I also tried an absolute path to no avail.

What am I doing wrong?

Best Answer

In LTspice, $ has a special significance which is not related to comments. The only availabel characters for comments are ; and * (it seems also #). The rest following the $ char in your code is not a valid SPICE syntax, so you could try to replace $ with one of the aforementioned allowed characters, to comment the rest.

One other thing: .plot in LTspice doesn't do what you want, so if you want traces to be automatically plotted, one way to do it is to run the simulation (no need to fully run it, in case it takes hours or so), plot the desired waveforms, then activate the waveform viewer by L-Click on it and then either choose File > Save, or click on the Save icon on the toolbar. This will create an additional .plt file, holding the plot settings. From now on, whenever you first simulate the schematic, or when you open up the waveform viewer, the saved traces will be displayed.