***** Parameters for Calculation of Diffusion Regions for 0.13u CMOS Process
> set_mode_diff geo
> set_hdout .2u
> set_hdin .3u
> use_four_sided_perimeter

***** Publically available BSIM4 0.13u CMOS and Bipolar models
.include '../../../SpiceModels/cmos_013_bsim4.mod'
.include '../../../SpiceModels/bipolar.mod'

***** Temperature
.temp 25

***** Parameters
.param vsupply=1.3
.global vdd gnd

***** DC Voltage Sources
Vsup vdd 0 vsupply
* Vin in 0 0.5 ac=1

***** Simulation Options
.options delmax=5p relv=1e-6 reli=1e-6 relmos=1e-6 method=gear

***** Simulation Parameters (.tran or .ac or .dc statements) 
.tran 10p 1u
* .dc Vin 0.0 'vsupply' 0.001
* .ac dec 10e3 100k 100Meg
* .noise v(out) Vin dec 10e3 100k 100Meg

***** Have operating point information sent to log file (simrun.log)
** .op

****** Digital Input Stimulus
*** Timing Statement:  > timing delay rise/fall_time period vlow vhigh
> timing 0.0n .2n [1/10e6] 0 vsupply
*** Digital Input:  > input nodename [set 0 1 1 0 1 ... R]
> input in [set 0 0 1 1 1 0 1 1 0 0 0 1 0 R]

****** Selectively Probe Signals
.probe in n0 n1 n2 out i(Vsup)
* .probe @m1[id] @m1[gm] @m1[gds] @m1[cgs] @m1[cgd] @m1[gmbs]
* .probe inoise_spectrum onoise_spectrum
