Listing 3: Simple Differential Pair Circuit—Version 2

* set options
 .opt nopage
 .width in=72
 .width out=80

* analysis control
 .dc vin -0.15 0.15 0.001
 .tf v(out2) vin
 .ac dec 10 1 10ghz
 .tran 5ns 2500ns 0 0.5ns

* current and voltage sources
iee 3 vee 1m
vin input 0 0 sin(0 0.3 5meg) ac 1
vcc vcc 0 5
vee vee 0 -5

* circuit elements
rb1 1 input 1
rb2 2 0 1
rl1 out1 vcc 5k
rl2 out2 vcc 5k

q1 out1 1 3 bjt
q2 out2 2 3 bjt

* models
 .model bjt npn(bf=80 rb=100 ccs=2pf
+   tf=0.3ns tr=6ns cje=3pf cjc=2pf
+   va=50)

* keep SPICE happy
 .end