* $Id$
* DO NOT EDIT. This file generated automagically.
* Created: Wed Jul 28 7:48:31 1999
* User: ryu
* Char: D-Flop Clock Enable Setup Time Characterization
* Data: "d"
* Enable: "ce"
* Clock: "clk"
* Q: "q"
* C: "xdff.mout"
* Trans: "lh"
*--- 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 isetup = 0
.param setup_hold_scale = '1e-12'
.param setup = 'isetup*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 (
+ '0'
+ 'vhigh'
+ '1ns+trise+pwidth'
+ 'trise'
+ 'tfall'
+ '3*period'
+ '4*period')
vce vce 0 pulse (
+ 'vhigh'
+ '0'
+ '1ns+trise+pwidth/2'
+ 'trise'
+ 'tfall'
+ 'period-trise-pwidth/2-setup'
+ '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 setup time:
.measure tran isetup param='isetup'
.measure tran setup param='setup'
.measure tran setup_lh delay v(ce) val='vhigh/2' cross=2
+ targ=v(clk) val='vhigh/2' rise=2
* 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='(vhigh-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' rise=1
.trans 5ps '2*period'
*--- CONTROL -------------------------------------------------
.control
# find fail
modif loop=20 stop optpass le 0.8 isetup -= (0)600 prtbl
set fail = $isetup
# find pass
modif loop=20 stop 0.8 le optpass isetup += (0)600 prtbl
set pass = $isetup
set i = 0
set window = `expr $pass - $fail`
# Save measurements
set save_setup = $setup_lh
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, Setup = $save_setup, Criterion = $save_optpass
# Binary search
while ($window > 5)
set i = `expr $i + 1`
set sum = `expr $pass + $fail`
set midpoint = `expr $sum / 2`
modif loop=1 isetup = $midpoint prtbl
if ($optpass > 0.8 or $optpass eq 0.8)
set pass = $midpoint
# Save measurements
set save_setup = $setup_lh
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, Setup = $save_setup, Criterion = $save_optpass
end
echo Final setup_lh = $save_setup
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. |
|
|