Warning, /frameworks/syntax-highlighting/autotests/input/highlight.sp is written in an unsupported language. File is not indexed.
0001 * Current Mode PWM Average Model 0002 * 0003 .Subckt PWM-CM nA nC nP nVCtrl nD Params: Lsw=100uH Fsw=100kHz DCMax=0.95 DCMin=0.05 RISense=1 Slope=100m 0004 * 0005 * Input Resistor on Control Pin 0006 RVCtrl nVCtrl 0 1Meg 0007 * 0008 * ON Duty Cycle 0009 EDuty nD 0 Value={V(nDPC)*V(nCx,nP)/(V(nA,nP)-V(nCx,nP)+1u)} ; EDuty 0010 * 0011 .EndS PWM-CM 0012 0013 ** Includes 0014 .include some_model.mod 0015 .include models/test/BC550.mod 0016 0017 0018 ** Comments 0019 * General SPICE. 0020 ; PSpice 0021 $ ngspice 0022 .param ... ; PSpice 0023 .param ... $ ngspice 0024 0025 ** Parameters 0026 .param TESTPARAM = '2 * 1.5V' 0027 .param TESTPARAM = "2 * 1.5V" 0028 .param TESTPARAM = { 2 * 1.5V } 0029 .param TESTPARAM = [ 2 * 1.5V ] 0030 .param TESTPARAM = ( 2 * 1.5V ) 0031 0032 .four 1Meg v(input) 0033 0034 Vinput input 0 SIN(500mV 1V 1k) 0035 vinput input 0 sin(500mV 1V 1k) 0036 0037 * Input Sources 0038 EXP(0 2V 1ms 2ms 3ms 1 2) 0039 exp(0 2V 1ms 2ms 3ms 1 2) 0040 * lx is also a function 0041 Lx node1 node2 200mH 0042 0043 ** Sub-Circuit 0044 * Call 0045 X1 inv ninv out v+ v- LM324 0046 x1 inv ninv out v+ v- lm324 0047 0048 .end