HIS APPENDIX
C.1
C.2
C.3
C.4
C.4.1
voltage = 5.5;
temp = 0;
Corner = "FF";
Vtn = 0.63;
Vtp = 0.89;
};
Process worst{
voltage = 4.5;
temp = 125;
Corner = "SS";
Vtn = 0.71;
Vtp = 0.92;
};
// define measurement percentages for std_cell measurements
Signal std_cell {
unit = REL;
Vh=1.0 1.0;
Vl=0.0 0.0;
Vth=0.5 0.5;
Vsh=0.8 0.8;
Vsl=0.2 0.2;
tsmax=2.0n;
};
// Define special measurements for 6710
// (using 30/70 delay measurement)
Signal std_cell_6710 {
unit = REL;
Vh=1.0 1.0;
Vl=0.0 0.0;
Vth=0.3 0.7 0.7 0.3;
Vsh=0.8 0.8;
Vsl=0.2 0.2;
tsmax=2.0n;
};
Signal VDD5.0V {
unit = ABS;
Vh=5.0 5.0;
Vl=0.0 0.0;
Vth=2.5 2.5;
Vsh=2.0 2.0;
Vsl=0.5 0.5;
tsmax=2.0n;
};
// Set some parameters for how the simulation will proceed
Simulation std_cell{
transient = 0.1n 80n 10p;
dc = 0.1 4.5 0.1;
bisec = 6.0n 6.0n 100p;
resistance = 10MEG;
};
// Default indices for the look up tables
Index DEFAULT_INDEX{
Slew = 0.100n 0.30n 0.7n 1.0n 2.0n;
Load = 0.025p 0.05p 0.1p 0.3p 0.6p;
};
// Indices for cells that are named with Xn where
262
263
};
// Define derating coeficients for margins
// 1.0 means no margins.
Margin m0 {
setup = 1.0 0.0 ;
hold = 1.0 0.0 ;
release = 1.0 0.0 ;
removal = 1.0 0.0 ;
recovery = 1.0 0.0 ;
width = 1.0 0.0 ;
delay = 1.0 0.0 ;
power = 1.0 0.0 ;
cap = 1.0 0.0 ;
} ;
Nominal
delay =
power =
cap
=
} ;
n0 {
0.5 0.5 ;
0.5 0.5 ;
0.5 0.5 ;
set process(typical,best,worst){
simulation = std_cell;
signal = std_cell_6710;
margin = m0;
nominal = n0;
};
set index(typical,best,worst){
Group(X1) = X1;
Group(X2) = X2;
Group(X4) = X4;
Group(X8) = X8;
Group(Pad_Pins) = IO5x5;
Group(Core_Pins) = X4;
Group(Clk_Slew) = Clk_Slew;
};
set signal(typical,best,worst){
Group(POWR) = VDD5.0V;
};
C.4.2
264
; The following are strings that you should set, or at least understand, before
; you load this file and run these functions...
;
; set the lists of values for output load (in F), and input slope (in s),
; and set the vdd in volts. Note that the loadlist and sloplist need to
; be lists of strings, and if you have a single-digit exponent, it needs to
; have a 0 in front (i.e. "3.2e-09"). These lists can have as many values
; in them as you like. This example has two values in each list so it will
; generate a 4x4 array of results. The loadlist will be the horizontal
; axis of the output array, and the sloplist will be the vertical.
;
loadlist = list( "6.75e-15" "5.4e-14" "1.08e-13" "2.16e-13" "4.32e-13")
slopelist = list("1e-10" "8e-10" "1.6e-09" "3.2e-09" "6e-09")
;
; define the template type youre using in your .lib file.
; This is in the lu_table_template section of the .lib file. In this example
; were generating a 4x4 matrix so Ill assume its called lu4x4, but
; this can be whatever you define in your .lib header
tabletype = "lu5x5"
;
; set the vdd, and the stop time for the transient analysis
; time_unit is the time unit in the .lib file (i.e. 1ns)
vdd = 5.0
trans_stop_time = "50n"
time_unit = 1e-9
;
;
; The name of the input pulse (input net) to the DUT, and the
; output net from the DUT that youre trying to measure, also the
; names for the variables that will be set for load capacitance and
; input slope.
; test_sch_name is the name of the schematic that holds your test.
; This is the schematic whose config view you want to simulate.
;
inNode = "in"
outNode = "out"
loadvarname = "load"
slopevarname = "slope"
test_sch_name = "test_setup"
cadencedir = "/home/elb/IC_CAD/cadence"
; your cadence directory
;
; Things below this line should be set based on the previous data.
; You shouldnt have to modify anything below here... But, you might
; want to look to make sure.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; update these dir names to reflect where your simulations will be
; If youve set the previous values, you shouldnt have to change this.
;
desdir = strcat("/simulation/" test_sch_name); your simulation directory
OFdir = strcat( cadencedir desdir )
; where the output files go
265
; make floating point versions of the load and slope lists. That is, convert
; the strings in the lists to floating point numbers. The reason we had the
; strings in the first place was so that we could use them to generate
; the directory names of the parametric result directories, but we also
; need them as numbers instead of strings for the input to the parametric
; simulation.
loadlistF = list()
slopelistF = list()
foreach(load loadlist loadlistF = append1(loadlistF atof(load)))
foreach(slope slopelist slopelistF = append1(slopelistF atof(slope)))
; construct some other values. These numbers are in terms of a
; percentage of vdd.
ten = vdd * 0.1
ninety = vdd * 0.9
thirty = vdd * 0.3
seventy = vdd * 0.7
;
; This procedure runs the parametric test with the values given earlier.
; The optional stop_time argument is a string that defines the
; stop time of the transient analysis. I.e. "50n" for 50 ns.
; This function needs to be called before you can print the
; table results in an output file.
(procedure run_test( @optional (stop_time trans_stop_time))
;
; define which simulator youre using, the design and results dir,
; and path to the transistor models
;
simulator( spectreS )
design(strcat( resdir strcat("/netlist/" test_sch_name ".c")))
resultsDir( resdir )
path( "/uusoc/facility/cad_common/local/class/5710/spectre"
"/uusoc/facility/cad_common/NCSU/CDK1.3/local/models/spectre/nom" )
; make sure to set initial values of the design variables and temp.
; These will be reset in the parametric simulation so its not really
; important what the values are...
desVar( slopevarname 500p )
desVar( loadvarname .05p )
temp( 27 )
; set up the transient analysis
analysis(tran ?stop stop_time )
; set up the parametric analysis based on the load and slope lists
; defined at the top of this file. Make sure to use the versions of the
; lists that have floating point numbers, not strings.
paramAnalysis(loadvarname ?values loadlistF
paramAnalysis(slopevarname ?values slopelistF))
266
; run the simulation, and select the transient analysis as the results you
; want to look at.
paramRun()
selectResult( tran )
; note that the plotting will only pop up a new window if youre running
; this script inside the analog environment, not if youre running
; ocean from the command line.
save(v strcat("/" inNode) strcat("/" outNode))
plot(getData(strcat("/" inNode)) getData(strcat("/" outNode)))
) ; procedure run_test
;
; define a couple of helper procedures to make printing easier.
;
; Take a list of floating point numbers and print them out as
; "1, 2, 3, 4"
; in the file pointed to by OF
(procedure fprint_flist(OF list)
(fprintf OF "\"")
(foreach element list
(fprintf OF "%g" element)
(if (not (equal element (car (last list))))
(fprintf OF ", ")))
(fprintf OF "\" ")
) ; procedure fprint_flist
; The "main" procedure which prints all four of the result tables based on the
; parametric simulation.
; filename is the name of the file that the results can go into. You can use this
; to make sure that you know which results are where. For example, the results
; from simulating the A->Y path in a nand gate can be called "nand_a_to_y" or
; something like that.
; If you dont give this procedure a gatetype paramater it will assume negative_unate.
; The choices for gatetype are neg and pos.
(procedure fprint_results(filename @optional (gatetype neg))
; open the output file for writing
OF = (outfile (strcat OFdir "/" filename))
; print each of the four tables in the output file
(fprint_table OF cellrise gatetype)
(fprint_table OF rise gatetype)
(fprint_table OF cellfall gatetype)
267
268
say which type of edge. So, 1 rising is the first rising edge
in the waveform.
For example, to find at which time the first rising edge of
the input waveform reaches 10% of vdd use the following:
var = cross( v1 ten 1 rising )
269
) ; foreach slope
) ; procedure fprintf_table
;
; A "do it all" function that runs the simulation and then generates the results
(procedure run_all(filename @optional (gatetype neg)(stop_time trans_stop_time))
(run_test stop_time)
(fprint_results filename gatetype)
) ; procedure run_all
C.4.3
SOC Encounter
C.4.4
BuildGates Synthesis
C.5
C.5.1
dc shell Synthesis
C.5.2
C.5.3
270