1 CPSC330 Digital Logic Design Peiyi Zhao Chapman University 2009 Design Inverter (NOT logic) using...
-
Upload
tamara-wills -
Category
Documents
-
view
222 -
download
3
Transcript of 1 CPSC330 Digital Logic Design Peiyi Zhao Chapman University 2009 Design Inverter (NOT logic) using...
1
CPSC330 Digital Logic Design
Peiyi ZhaoChapman University
2009
Design Inverter (NOT logic)using Layout Editor: Magic
• CMOS transistor layers and model
• Basic layout
• Magic layout tool tutorial(with NOT gate as an example)
3
• MOS transistor is a sandwich of several layers of conducting and insulation materials.
Red : gate Green: n+ type Brown: p+ type
4
5
Red : gate Green: n type(negative
type)
n typen type
drain
source
6
Red : gate Green: n type(negative
type)
n typen type
drain
source
NMOS Transistor is ON when applying positive voltage on its gate, attracting negative charges to accumulate between two n type area
Transistor is OFF when applying ‘O’ voltage on its gate
+5 v
0 v
Gate+5 v
NMOS 门 gate 上加 电源电压后,吸引了负电荷堆积在source ,drain 两极间,使该 两极间产生通道, NMOS 就导通了
• NMOS: input on gate= 1, NMOS on
• = 0, NMOS off
• PMOS : opposite to NMOS (note:a small circle o on symbol)
input on gate =0, PMOS on
=1, PMOS off
Inverter 反相器
input
PMOS
Input=1,NMOS on, PMOS off
output =0
Ground
Supply voltage
Output has a path to ground through NMOS
output
PMOS
Input=0,NMOS on, PMOS off
output =1
Output has a path to Supply voltage through PMOS
input output
0 1
1 0
Truth table:it shows the design is inverter
NAND 与非门
Ground
PMOS
Supply voltage
Input 1
Input 2
Input 1 Input 2
NMOS
PMOS
Input 1
Input 2
If input1=1, input2=1, both NMOS are ON, output has path to ground. So output=0
output
output
If input1=0, or
input2=0, both NMOS are OFF, but one PMOS will be ON. output has path to Supply voltage,so output=1
NMOS
PMOS
Input 2
Ground
Supply Voltage
0 0 1
0 1 1
1 0 1
1 1 0 Out=In1 NAND In2
Input1 Input2 Output
Truth table: shows it is exactly NAND logic
Dual design: 举例 :NOR 与或门 :NMOS 并联时 ,PMOS 对偶的部分 串联 DDual Design: PMOS in serial, NMOS in Parallel;
Ground
PMOS
Supply voltage
Input 1
Input 2
Input 1Input 2
output
If input1=0, or
input2=0, both NMOS are OFF, but one PMOS will be ON. output has path to Supply voltage,so output=1
NMOS
PMOSSupply Voltage
0 0 1
0 1 0
1 0 0
1 1 0 Out=In1 NOR In2
Input1 Input2 Output
Truth table: shows it is exactly NOR logic
11
Side View Top view , turn clockwise 90
12
Side View Top view , turn clockwise 90
• Stick Diagram:• Red: poly• Green:Diffusion(n type or p-type):• Blue:metal
14
Basic Unix commands• cd my_directory (go to the directory)• ls my_directory (list)• cp (copy)• pwd : present working directory• mv my_file my_another_directory (move file)• mv old_file_name new_file_name (rename)• rm file_name (remove file)• find . –name “myExample.txt” –print• grep text files• mkdir myDirectory (create new directory)• passwd: change passwd• chmod 711 ~: change permission• Tip:do not use ftp to transfer files, since ftp does not have encryption of your
password; use ssh instead. • Good link:
http://userwww.sfsu.edu/~necrc/files/server%20connection%20tutorials/Basic_Unix_Commands.pdf by Hamid Mahmoodi
15
Magic layout tool
• Developed by UC Berkeley
• Being used in Stanford, MIT, USC,etc
16
In command line, typemkdir tutorialcd tutorial
Type in command line:magic tutorialOne graphic window will pop out(Note: you have one text window, one graphic window respectively now, your cursor should point to the graphic window always). Next time, if you already have tutorial.mag file, do not include .mag in above command;
In text window, type colon ”:” to invoke command::grid 1
If you type colon, you must enter command and carriage before doing anything else.
Shape of cursor: when you press SPACE, 4 shapes toggles: cross, arrow, square, hand. Currently we are using cross shape for position rectangular area for a layer. If you unintentionally press the SPAC, and the cursor shape is not cross, then press SPACE as many times as needed till the cross appears.
Left click of the mouse button on the window to determine the lower left corner of the layer area, move cursor and right click for the upper right corner. A box will appear.
17
1. First paint p+ type (brown color), with width 4 units:paint pdiff
2. Paint gate which is polysilicon (red), with width: 2, on top of p+ type
:paint poly
3.Similarly paint n+ type(green)
:paint ndiff
Width:4 units
• Connect the gates(red)
18
19
Paint : metal (blue color)
:paint m1
Paint : metal to p+ (pdiffution ) contact:paint pdc
Paint :metal to n+ (ndiffution ) contact:paint ndc
If white dots appear, those are errors. Box white dot area, type :drc why (design rule check)You will get error message
20
• Add more metal(for supply voltage) :paint m1
Tip: frequently save your design, type:save
• Paint gate(poly) to metal contact(purple):paint polycontact
21
22
Inverter Layout: Final View
• Paint nwell (diagonal lines):paint nw
23
• Inverter Layout: another way : poly is vertical• Paint gate(poly) to metal contact(purple)
:paint polycontact
N+: paint ndiff or :paint green
P+: paint pdiff or :paint brown
Gate, poly: paint poly or red
p-contact: paint pdcontact
n-contact :paint ndiff
metal: paint m1
Psubstrate-contact :paint pwc
Nwell-contact: paint nwc
24
• Label names: move cursor to point of the layer you want to add label,left click then right click at the same position, then type:label myLabel
for example,
• :label in:label out:label Vdd:label gnd
out
in
NAND: what is missing
25
26
Once you finish your design, type:save
You will find a file named tutorial.mag in your directory.To open this magic file, type:magic tutorial (not :magic tutorial.mag)
Finally type cd .. will bring you up one level to your home directory. Suppose you will
design a NAND, first create directory by type mkdir NAND cd NAND magic NAND it will open a new magic layout window.
27
Other commands:• select area short key: a• undo short key: u• delete• view short key:v, V• zoom short key:z,Z• 5: the key on the right panel on the key board, center the area your box positioned.
Other key nearby with arrow can be used to move the layout.• save• quit (to exit)• drc whyTips• After you are familiar with the layers, you can use shortcut keys and colors, like : pai
red is the same as : paint poly• You should point your cursor to the layout window when you type your command in
the text window.• . dot is to repeat the previous command (compare in Unix: use up, down, left, right
arrow )• moving: select an area, type ‘a’, move that part using 4 arrows(up, down, left, right)
on the right most part on the key board. • copy: select an area, move your cure to another point, press ‘c’ in your keyboard• paint: draw a box, if you want to paint metal, move your cursor to metal that in already
in your layout, and press middle button
28
• Links: • Magic brief overview
http://vlsi.ece.iit.edu/scells/ece429/MAGIC1x.html
• Step by Step layout example of an inverter:http://www.ece.umd.edu/~newcomb/vlsi/magic_tut/Magic_x3.doc
• Magic inverter tutorial http://vlsi.ece.iit.edu/scells/magic/