* $Id$
* DO NOT EDIT. This file generated automagically.
* Created: Wed Jul 28 7:48:34 1999
* User: ryu
* Char: D-Flop Clock Enable Hold Time Characterization
* Data: "d"
* Enable: "ce"
* Clock: "clk"
* Q: "q"
* C: "xdff.mout"
* Trans: "hl"
*--- SETUP ---------------------------------------------------
.include '/home/ryu/src/autochar/autochar-1.5.3/tech/tsmc35/include/ttlh.sp'
.include 'dffce_2x.sp'
.include /home/ryu/src/autochar/autochar-1.5.3/tech/tsmc35/lib/autochar.sp
.options
+ prpts
+ rawpts
+ format
.param ihold = 0
.param setup_hold_scale = '1e-12'
.param hold = 'ihold*setup_hold_scale'
.param slewrate = '4.00002e-11'
.param slew_start = '0.1'
.param slew_end = '0.9'
*--- INPUTS --------------------------------------------------
vclk vclk 0 pulse (
+ '0'
+ 'vhigh'
+ '1ns+trise/2'
+ '0'
+ '0'
+ 'pwidth+trise/2+tfall/2'
+ 'period')
vd vd 0 pulse (
+ 'vhigh'
+ '0'
+ '1ns+trise+pwidth'
+ 'trise'
+ 'tfall'
+ '3*period'
+ '4*period')
vce vce 0 pulse (
+ 'vhigh'
+ '0'
+ '1ns+period+hold'
+ 'trise'
+ 'tfall'
+ '3*period'
+ '4*period')
*--- TEST CIRCUIT --------------------------------------------
xdbuf vd d ebuffer
xcebuf vce ce slewbuffer
xclkbuf vclk clk slewbuffer
xflop
+ q $ q:o
+ d $ d:i
+ ce $ ce:i
+ clk $ clk:i
+ diff_1 $ clk_n:i
+ dffce_2x
e1 diff_1 0 clk vdd -1
*--- LOADS ---------------------------------------------------
c0 q 0 100ff
*--- MEASURE -------------------------------------------------
.option autostop
.measure tran ihold param='ihold'
.measure tran hold param='hold'
* Measure hold time:
.measure tran hold_hl v(clk) val='vhigh/2' rise=2
+ targ=v(ce) val='vhigh/2' cross=1
* Measure clock slew rate:
.measure tran clkslew v(clk) val='0+0.1*vhigh' rise=2
+ targ=v(clk) val='0+0.9*vhigh' rise=2
* Measure internal criterion node:
.measure tran vcrit find v(xflop.xdff.mout)
+ when v(clk)='0.8*vhigh' rise=2
.measure tran optpass param='vcrit/vhigh'
*--- TRANSIENT -----------------------------------------------
* Measure final clock->q time:
.measure tran clk_q delay v(clk) val='vhigh/2' rise=2
+ targ=v(q) val='vhigh/2' fall=1
.trans 5ps '2*period'
*--- CONTROL -------------------------------------------------
.control
# find fail
modif loop=20 stop optpass le 0.8 ihold -= (0)600 prtbl
set fail = $ihold
# find pass
modif loop=20 stop 0.8 le optpass ihold += (0)600 prtbl
set pass = $ihold
set i = 0
set window = `expr $pass - $fail`
# Save measurements
set save_hold = $hold_hl
set save_clkslew = $clkslew
set save_clk_q = $clk_q
set save_vcrit = $vcrit
set save_optpass = $optpass
echo Iteration $i: Pass = $pass, Fail = $fail, Window = $window, hold = $save_hold
# Binary search
while ($window > 5)
set i = `expr $i + 1`
set sum = `expr $pass + $fail`
set midpoint = `expr $sum / 2`
modif loop=1 ihold = $midpoint prtbl
if ($optpass > 0.8 or $optpass eq 0.8)
set pass = $midpoint
# Save measurements
set save_hold = $hold_hl
set save_clkslew = $clkslew
set save_clk_q = $clk_q
set save_vcrit = $vcrit
set save_optpass = $optpass
else
set fail = $midpoint
end
set window = `expr $pass - $fail`
echo Iteration $i: Pass = $pass, Fail = $fail, Window = $window, hold = $save_hold
end
echo Final hold_hl = $save_hold
echo Final clkslew = $clkslew
echo Final clk_q = $clk_q
echo Final vcrit = $vcrit
echo Final optpass = $optpass
.endc
* Alter slewrate:
.alter
.param slewrate = '7.99998e-11'
.alter
.param slewrate = '1.2e-10'
.alter
.param slewrate = '1.600002e-10'
.alter
.param slewrate = '3.19998e-10'
.end
# |
Change |
User |
Description |
Committed |
|
#1
|
6489 |
robert_yu |
Saved here. |
|
|