** .OPTIONS
.OPTION POST // will show all nets
.OPTION POST PROBE // will only show the nets which declared in .PROBE
.OPTION POSTOP=<N> // will show down to the N hierachy level from top, .OPTION POST will override this option
** Switching between Two Voltage Sources Connected to the Same Node
You can use the HSPICE voltage controlled voltage source (E-element) to
design a behavioral switch by creating a netlist as follows:
.option post
Vin1 in1 0 pwl ...
$ source 1
Vin2 in2 0 pwl ...
$ source 2
Ein in 0 vol='v(in1)*v(ctrl) + v(in2)*(1-v(ctrl))'
$ behavioral switch
vctrl ctrl 0 pwl 0 1 49n 1 50n 0
$ control voltage
.tran 1n 100n
.end
//In this example, the v(ctrl) value is 1 initially so that v(in)=v(in1). At
//50 ns, the control voltage changes to 0 and v(in)=v(in2).
** output waveform for cscope
.option post_version=2001
** post sim
.option posttop=2 // look for first 2 level signals from top
.option sim_la // use RC reduction in post sim
.option altcc altchk // when use .ALTER, reduce netlist process check time
** measure simulated output data without re-run simulation
hspice -i xx.tr0 -meas <meas_file> // reuse the simulated data to measure instead of re-run sim
** auto stop
.option autostop // stop sim as long as last measurement is completed
** don't print mode data
.option nomod
** sim with case sensitive (for the case netlist converted from RTL)
hspice -case -d -i input.sp -o output.lis -mt 10