|
Notebooks by HAHAHAHA (HAx4)
|
5/30/2007
|
I found that Google Notebook is a nifty tool for side notes and self-edification. However, due to the constraint of copyrights, I have to keep a lion share of those materials I gleaned only to myself. The rest can be found at
http://www.google.com/notebook/user/15400019643567026119
|
Spice Notes (2)
|
5/26/2007
|
*) Example to get Y parameters and pi admittance parameters (use .net command) ...
.NET I(Vd) Vg
.AC LIN 9901 100MEG 10G
.PRINT AC y11(r) y11(i) y12(r) y12(i) y21(r) y21(i) y22(r) y22(i)
.PRINT yi_real = PAR('y11(r) + y12(r)') .PRINT yi_img = PAR('y11(i) + y12(i)')
.PRINT yr_real = PAR('-y12(r)') .PRINT yr_img = PAR('-y12(i)')
.PRINT yf_real = PAR('y21(r) - y12(r)') .PRINT yf_img = PAR('y21(i) - y12(i)')
.PRINT yo_real = PAR('y22(r) + y12(r)') .PRINT yo_img = PAR('y22(i) + y12(i)')
.PRINT yf_mag = PAR('sqrt( pow(y21(r) - y12(r), 2) + pow(y21(i) - y12(i),2))') .PRINT yf_phase = PAR('atan( (y21(i) - y12(i)) / (y21(r) - y12(r)))')
...
See also Ref[1], chapter 11,
*) Example to find bias point
.DC Vgg 0 3.5 0.001
.OP ALL
.MEAS DC Vgg WHEN I(RL) = 200u .MEAS DC Vgs FIND PAR('V(2) - V(3)') WHEN I(RL) = 200u .MEAS DC Vo FIND V(1) WHEN I(RL) = 200u
.PRINT Vds = PAR('V(1) - V(3)')
*) Example for finding small signal parameter ....
.DC Vgg 0 3.5 0.001
.OP
.MEAS Vgg WHEN I(RL) = 200u .MEAS Vgs FIND PAR('V(2) - V(3)') WHEN I(RL) = 200u
.PRINT derVo = DERIV('V(1)')
.PRINT derVi = DERIV('V(4)')
.PRINT Av = derVo / derVi ....
*) another example for small signal
...
.AC DEC 20 100 100G
.OP ALL
.MEAS DC Vgg WHEN I(RL) = 200u .MEAS DC Vgs FIND PAR('V(2) - V(3)') WHEN I(RL) = 200u .MEAS DC Vo FIND V(1) WHEN I(RL) = 200u
.PRINT AC VM(1)
.PRINT SMALL_GAIN = PAR('VM(1) / 0.01')
....
*) Use .PZ to get pole and zero
See Ref[1] for detail
*) Throw noise into ring oscillator ...
The ring oscillator has one peculiar characteristic: To make it start to work, a tad of noise should be put into the circuit. And the correspondent frequency will then be picked up and get oscillation. Otherwise the output is always flat.
One way to put noise into the circuit is as following by injecting a pulse through a current source:
Inoise 1 0 PUL 0 1m 1n 1n 1n 1n
In fact, I was totally astonished when I successfully got the oscillator to work the first time, after tinkering it up for two hours. SPICE at that second proselytized me into a hardcore disciple of science.
*) FFT example
.FFT V(IN) WINDOW=KAISER START=5m FORMAT=UNORM FMAX=4000
References: [1] HSPICE Simulation and Analysis User Guide, Version Y-2006.09, Synopsys, Inc, 09/2006
悲悼张馥宝老师辞世!
References: [1] 悼张馥宝先生, Sphere of Reason, 05/15/07
|
HAHAHAHA's Blotter
|
5/14/2007
|
Google Reader comes handy as a feed aggregator. From time to time, I would find articles that are worth revisiting. I have indexed them at the following link:
http://www.google.com/reader/shared/04498845648824531655
|
SPICE Notes (1)
|
5/13/2007
|
When I was a kid, the stereotype I had in my mind for being an EE was a nerd sitting in a room full of dusty PCBs and gigantic oscilloscopes, with iron in one hand and plier in the other. The air smells like rosin, mixed with the odor of sweat. Thanks to the initiative by a pioneer in 1968, EE's dirty hands were washed clean (to some extent). We owe it to ourselves to remember his name: Ron Rohrer at UC Berkeley 1968 (Ref[1])
The following is what I have picked up on my SPICE journey:
*) Different Flavors of SPICE (For the detailed history of SPICE, please refer to Ref[1]) ==== +) HSPICE, from Synopsys ==== +) LT SPICE (Sw CAD III), from Linear Technology (free download) ==== +) PSPICE, from ORCAD Inc (Now part of Cadence)
*) Save disk space SPICE may devour large amount of disk space, especially if transit analysis is conducted. To save space, ".option post probe" can be used. And only use .probe to get the signal of interest.
To clear up the files left by SPICE, a shell script here called spice_cleanup.csh could be used. (Tested under C Shell on SunOS 5.9, Goto Ref[2] for download.)
*) UltraEdit wordfile for SPICE A wordfile here is produced for syntax coloring SPICE file with UltraEdit. However, since SPICE is not like average programming language, a good many of its distinguished syntax can not be fully covered by UltraEdit. The wordfile.txt here only serves as a way to ease your eyes :-) (Goto Ref[2] for download.)
*) Setup Time Analysis
Use Bisection Optimization Model, see Ref[3] Chapter 2 for detail
*) Example to get equal rise and fall for a gate
...
.param P1=optrange(2.4u,1.2u,4.8u)
.model optmod opt itropt=30
.measure bestratio param='P1/1.2u'
.TRAN 1ps 16000ps SWEEP OPTIMIZE=optrange RESULTS=diff MODEL=optmod
.measure tpdr * rising propagation delay + TRIG V(COUT1) VAL='SUPPLY/2' FALL=1 + TARG v(_COUT2) VAL='SUPPLY/2' RISE=1 .measure tpdf * falling propagation delay + TRIG V(COUT1) VAL='SUPPLY/2' RISE=1 + TARG v(_COUT2) VAL='SUPPLY/2' FALL=1 .measure tpd param='(tpdr+tpdf)/2' goal=0 * average prop delay .measure diff param='tpdr-tpdf' goal = 0 ...
See also Ref[4], chapter 5
References: [1] Inside SPICE, Ron M. Kielkowski, McGraw-Hill, Inc. 1998 [2] HAx4 down the Rabbit Hole [3] HSPICE Applications Manual, Version Y-2006.09, Synopsys, Inc, 09/2006 [4] CMOS VLSI DESIGN, A Circuits and Systems Perspective (3rd Edition), NEIL H.E. WESTE and DAVID HARRIS, Pearson Education, Inc. 2005
|
HAx4 down the Rabbit Hole
|
5/12/2007
|
Yahoo has closed the loophole in its Briefcase service, which means my post two years ago is no longer valid (Ref[1]). However, Google Page Creator does offer an alternative to host files for free.
Thus I've finally decided to give Google Page Creator a shot despite all the idiosyncrasy it has ( Ref[2] ).
The address of the new site is:
http://rabbithole.hax4.googlepages.com/index.html
All the files previously hosted at Yahoo Briefcase have been migrated to this new site.
References: [1] HAHAHAHA's Briefcase, 04/03/2005 [2] Google Page Creator, 02/27/2006
|
May 8th, Dear John
|
5/10/2007
|
(May 8th, 1999) China's embassy in Belgrade, Yugoslavia was struck by NATO missiles. Lives were lost and a nation was humiliated.
7 years ago this month, I was young and zealous, venting my patriotism on the SJTU BBS.
Since then, my zealousness has waned over the years. I would like to think that I've got my emotion well under control. I was wrong.
This past May 8th: Roller coaster ride.
Just when I started to put everything back on track, it struck me head on, at the end of the day. My initial plan was torpedoed. My brain was completely in an auto-pilot mode for the last two hours. I have to write it down, knowing that my life will make a turn for difference from that point on. And Best Wishes to all the parties that were involved.
|
|
|
*)
Grand Opening
*)
Why HAHAHAHA
*)
Stay Foolish
*)
Rabbit Hole
*)
Blotter
*)
Notebook
*) Blotter
*) Notebook
*) Rabbit Hole
*) I Love Rei
*) TEXT2PNG
*) China Blog List
*) Bertrand
*) Bruin
*) Bulldog
*) Hua
*) Mas
*) Nimrod
*) Philewar
*) Rodent
*) Samuel
*) Tom
<< Home
|