I'm migrating from LTSpice to KiCad's ngspice support. There are a few libraries for LTSpice for simulating digital functions such as
74HCT_v.lib (log-in required).
The models in that library have three parameters for each subcircuit, such as:
* 2-input NAND gate
* tpd 25n/9n/7n 12n
* tr 19n/7n/6n 7n
.SUBCKT 74HCT00 A B Y VCC VGND vcc1={vcc} speed1={speed} tripdt1={tripdt}
.param td1=1e-9*(12-3-3)*4.0/({vcc1}-0.5)*{speed1}
*
XIN1 A Ai VCC VGND 74HCT_IN_1 vcc2={vcc1} speed2={speed1} tripdt2={tripdt1}
XIN2 B Bi VCC VGND 74HCT_IN_1 vcc2={vcc1} speed2={speed1} tripdt2={tripdt1}
* tripdt=1n
A1 Ai Bi 0 0 0 Yi 0 0 AND tripdt={tripdt1} td={td1}
*
XOUT Yi Y VCC VGND 74HCT_OUT_1X vcc2={vcc1} speed2={speed1} tripdt2={tripdt1}
.ends
In LTSpice you set the actuals for each of these parameters by right-clicking on the symbol and adding:
VCC=3.3 SPEED=1.0 TRIPDT=1e-9 to the SpiceLine field.
How do you pass these parameters in from a KiCad (6.0.6) schematic? Adding .param lines to the schematic doesn't work. Adding them as a custom simulation setting after launching the simulation from the KiCad schematic doesn't work.
Any ideas?