2020年9月22日星期二

HSpice notes

 ** .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

 

 

calibre hcell file format

 ***** calibre hcell file format *****
i.e.
//layout name    || cdl source name
ABC          DEF        //one to many
ABC          GHI        //one to many
UVW          XYZ        //many to one
RST          XYZ        //many to one
LMN          PQK        //one to one
JFQ          KPT        //one to one

output a shape/net to gds format

 ***** output a shape/net to gds format *****
DRC CHECK MAP "rule_check" GDSII "layer number" "datatype" "filename"
i.e.
Grow_Metal1 { @ Grow metal1 by 0.1u
        SIZE metal1 BY 0.1
    }
DRC CHECK MAP Grow_Metal1 GDSII 21 0 "./mask/grown_m1.gds"

i.e.
LAYER metal metal1 metal2 metal3 // define layer set "metal"
Plot_RESET { @ Output all metal shapes beloging to RESET net
        NET metal RESET
    }
DRC CHECK MAP Plot_RESET GDSII 1 0 "./plots/RESET.gds"