VLSI Design Course 2000 CAD Tools Magic/IRSIM/SPICE簡介

advertisement
CAD Tools
Magic/IRSIM/SPICE簡介
Presenter:黃世緯 助教
Rm 322
10/18/2000
VLSI Design Course 2000
Outline
• Introduction
• Magic – Layout Editor
• IRSIM – Logic-level simulator for MOS
circuits
• SPICE – Transistor-level simulator for
MOS circuits
VLSI Design Course 2000
Introduction
Design Circuits
A
B
Circuit-level
Simulator
SPICE
Layout Tools
Magic
extract
Logic-level
Simulator
IRSIM
C
verification C=A?
B=A?
VLSI Design Course 2000
Magic – Layout Editor
VLSI Design Course 2000
What is Magic?
• A color painting tool?
– Quite a bit about the nature of VLSI circuit
layout
• Additional operations
– Built-in Design-Rule-Check (DRC)
– Built-in Hierarchical circuit extractor
– Some useful functions such as routing
tools
VLSI Design Course 2000
How to Get Help?
• Manual
– Hard copies
– Electronic files
• postscript files available on
http://video.ee.ntu.edu.tw/~vlsi_design/homework/cad_to
ols/magic.htm
• On WS:
– ~d8921030/magic_tutorial (tutorial files)
– ~d8921030/magic_tutcells (example files for tutorial)
• On-line help
– >> :help subject
VLSI Design Course 2000
Running Magic
• 在 Linux 中的 magic 及 irsim, 均需要將CAD_HOME
環境變數設到 /home/cad 目錄下, 也就是, 如果用的是
C Shell (csh, tcsh), 要加入下列兩行到 $HOME/.cshrc
中
setenv CAD_HOME /home/cad
set path=($path $CAD_HOME/bin)
• 在 Linux中執行
>> magic –dX11 –T tsmc0p8_spdm filename
VLSI Design Course 2000
The Box & the Cursor
• Used to select
things on the
color display
Mouse right button
Mouse left button
VLSI Design Course 2000
Invoking Commands
• Invoking Commands
– Type “:”(colon) or “;”(semi-colon) to invoke
command
– Use macro
• E.g. ‘u’ means “:undo”
VLSI Design Course 2000
Magic Commands (1)
• Basic Painting
– :paint layers (color)
– :erase layers
• “ ^D ” (erase all layers underneath the cursor)
– Use Mouse
• Select or box what U would like to paint
• Move to the color (layer) U would like to paint
• Press middle button (or press left & right
together if U use 2-button mouse)
VLSI Design Course 2000
Magic Commands (2)
• If I mistake to take action…
– :undo
• Same as ‘u’
– :redo
• Same as ‘U’
VLSI Design Course 2000
Magic Commands (3)
• Selection
– Move over the portion and type ‘s’
– Select more
• Type ‘S’
– Select area ‘a’ / select more area ‘A’
– Clear out the selection
• ‘C’ or “:select clear”
VLSI Design Course 2000
Magic Commands (4)
• Operations on the Selection
– :delete d
– :move q(l), w(d), e(u), r(r)
– :stretch Q, W, E, R
– :copy c
– :upsidedown (vertically flip)
– :sideway (horizontally flip)
– :clockwise
VLSI Design Course 2000
Magic Commands (5)
• Label
– :label
– Erase a label
• Select it and delete it
– Erase all labels
• :erase labels
– Labeling conventions
• Vdd! GND!
(important!!)
VLSI Design Course 2000
Magic Commands (6)
• Save to files
– :writeall
– :save name
• Magic file format : *.mag
• Leaving Magic
– :quit
VLSI Design Course 2000
Magic Commands (7)
• Utility Commands
– :grid [spacing]
– :zoom z / Z (zoom in/out)
• Advanced Wiring
– :array xsize ysize
• Cell Hierarchy
– Expanding
• x (expand)
• X (overview)
• Design Rule Checking
– :drc why
– :drc find
VLSI Design Course 2000
IRSIM – Logic-level simulator for
MOS circuits
VLSI Design Course 2000
Function of IRSIM
• Logic-level simulation (based on RC model)
• Display simulation waveform
• Differences from SPICE
– IRSIM is an event-driven logic-level simulator for
MOS transistor circuits.
– SPICE is a circuit analysis tool for simulation of
electrical circuits in steady-state, transient, and
frequency domains.
VLSI Design Course 2000
IRSIM EXAMPLE
#1 Download magic file (ex or4.mag) and extract as
.ext file.
:load or4
:extract
#2 Convert .ext file to .sim file.
ccsun> ext2sim or4.sim or4.ext
#3 Construct command file for IRSIM.
ccsun> vim or4.cmd
VLSI Design Course 2000
COMMAND FILE EXAMPLE
h V dd!
l GND!
vector IN PU T a b c d
clock V dd! 1 1 1 1 1 1 1 1
V IN PU T 0000 0001 0010 0011 0100 0101 0110 0111
R1
clock V dd! 1 1 1 1 1 1 1 1
V IN PU T 1000 1001 1010 1011 1100 1101 1110 1111
R1
ana a b c d z
此行去掉,改加在run irsim之後,
見下頁
VLSI Design Course 2000
TRY IRSIM
#4Trythis.cmdfilewithIRSIM
ccsun>irsimtsmc08.prmor4.sim-or4.cmd
#5runanalyzewindow
irsim>anaabcdz
#6Analyzer windowwithsimulationresultswill popup.
VLSI Design Course 2000
ANALYZE WINDOW
VLSI Design Course 2000
SPICE – Transistor-level simulator
for MOS circuits
VLSI Design Course 2000
Magic to Spice
• Convert magic extracted files to spice
net files
ext2spice name.sp name.ext
VLSI Design Course 2000
SPICE
*~~~~
.lib'tsm
c08.m
odel' TT
.op
.optionpost captab
.global vddvss
VLSI Design Course 2000
SPICE Circuit
Vdd
5
Vout
Vin
1
2
1
Vss
0
VLSI Design Course 2000
SPICE
** Circuit Description **
Vin 1 0 DC +1.5V
VDD vdd 0 DC +1.5V
VSS vss 0 DC 0V
M1 2 1 5 5 PCH L=1um W=1um
M2 2 1 0 0 NCH L=1um W=1um
* drain gate source substrate
VLSI Design Course 2000
SPICE
** Analysis Requests **
.DC Vin 0 1.5 5mV
** Output Requests **
.plot DC V(2)
.probe
.end
VLSI Design Course 2000
Download