009_Source_from_waveform : Source from simulation waveform
Minimum Versions: SmartSpice 4.6.5.R
The first input deck is run and and then you can extract a waveform as a result of the simulation and use this waveform to make a source with the same waveform characteristics. This is very useful when you want to break a circuit up into stages and simulate each stage seperately before doing the full circuit.
The results show the output of the first simulation where the waveform v(3) is used to create a "waveform.DAT" file.
This "waveform.DAT" file can then be used as an input PWL waveform for another simulation. The first stimulus input deck shows how you can use the previously simulated waveform as a stimulus to another circuit. The second stimulus input deck shows how you can use the same stimulus waveform in another different circuit. The results show the output of the second simulation where the original waveform is used to stimulate another circuit.
ex1_sim.in
DEMO EXAMPLE 1: INPUT FILE * * VIN 1 0 DC 0 SIN(0 0.1 5MEG) AC 1 VCC 8 0 DC 10 VEE 9 0 DC -12 RS1 1 2 1K RS2 5 0 1K RC1 3 8 10K RC2 4 8 10K RBIAS 7 8 20K CLOAD 3 4 5PF Q1 3 2 6 QNL Q2 4 5 6 QNL Q3 6 7 9 QNL Q4 7 7 9 QNL .MODEL QNL NPN(BF=80 RB=100 CCS=2PF TF=0.3NS TR=6NS CJE=3PF CJC=2PF + VA=50) * .OPTION MEASRAW=0 post keepopinfo .OP current 20ns .TRAN 5NS 1500NS * .option post=2 .save tran V(3) *.DC VIN -0.25 0.25 0.025 *.AC DEC 10 10KHZ 10GHZ *.PRINT TRAN V(3) V(4) *.PRINT DC V(1) V(3) V(4) *.PRINT AC VM(3) VP(3) *.ST QNL(BF) 80 100 10 .OPTIONS ACCT RELTOL=0.001 NOMOD .control run batchprint makepwl waveform.DAT tran1.v(3) tran1.time .endc .END
R_waveform_test.in
* Source driven from simulation waveform ***************************************** V1 NET1 GND PWLFILE waveform.DAT R1 NET2 GND 3.3K R2 NET1 NET2 1K *.SAVE I(R1) .save all(i) all(v) .TRAN 0.01p 2u .END
RC_waveform_test.in
* Source driven from simulation waveform ***************************************** V1 NET1 GND PWLFILE waveform.DAT C1 NET1 NET2 1pF R1 NET2 GND 3.3K *.SAVE I(R1) .save all(i) all(v) **.TRAN 0.01p 2u .TRAN 5ns 1500n .END