Presentation is loading. Please wait.

Presentation is loading. Please wait.

CPSC330 Digital Logic Design Peiyi Zhao Chapman University 2009

Similar presentations


Presentation on theme: "CPSC330 Digital Logic Design Peiyi Zhao Chapman University 2009"— Presentation transcript:

1 CPSC330 Digital Logic Design Peiyi Zhao Chapman University 2009
Design Inverter (NOT logic) using Layout Editor: Magic

2 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) source drain n type n type

6 Gate +5 v Red : gate Green: n type(negative type) source drain n type n type NMOS 门gate上加 电源电压后,吸引了负电荷堆积在source ,drain 两极间,使该 两极间产生通道,NMOS 就导通了 +5 v NMOS Transistor is ON when applying positive voltage on its gate, attracting negative charges to accumulate between two n type area 0 v Transistor is OFF when applying ‘O’ voltage on its gate 6

7 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

8 Inverter 反相器 input output 1 Input=1, NMOS on, PMOS off
Supply voltage PMOS Output has a path to Supply voltage through PMOS output output =0 input output =1 PMOS Ground Output has a path to ground through NMOS input output 1 Truth table:it shows the design is inverter

9 NAND 与非门 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 If input1=1, input2=1, both NMOS are ON, output has path to ground. So output=0 Supply voltage PMOS PMOS Supply Voltage PMOS Input 1 Input 2 Input 2 output Input 1 output Input 1 Input 2 Input 2 NMOS NMOS Ground Ground Input Input Output 1 Out=In1 NAND In2 Truth table: shows it is exactly NAND logic

10 Dual design: 举例:NOR与或门:NMOS 并联时,PMOS对偶的部分 串联DDual Design: PMOS in serial, NMOS in Parallel;
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 Supply voltage Supply Voltage PMOS PMOS Input 1 Input 2 output NMOS Input 1 Input 2 Input Input2 Output 1 Out=In1 NOR In2 Ground Truth table: shows it is exactly NOR logic

11 Side View Top view , turn clockwise 90

12 Side View Top view , turn clockwise 90

13 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: by Hamid Mahmoodi

15 Magic layout tool Developed by UC Berkeley
Being used in Stanford, MIT, USC,etc

16 In command line, type mkdir tutorial cd tutorial Type in command line: magic tutorial One 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

18 Connect the gates(red)

19 Paint : metal (blue color) :paint m1
Paint : metal to p+ (pdiffution ) contact :paint pdc Paint :metal to n+ (ndiffution ) contact :paint ndc Paint : metal (blue color) :paint m1 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

21 Paint gate(poly) to metal contact(purple) :paint polycontact

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 Nwell-contact: paint nwc P+: paint pdiff or :paint brown p-contact: paint pdcontact Gate, poly: paint poly or red n-contact :paint ndiff N+: paint ndiff or :paint green metal: paint m1 Psubstrate-contact :paint pwc

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 in out

25 NAND: what is missing

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 why Tips 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 Step by Step layout example of an inverter: Magic inverter tutorial


Download ppt "CPSC330 Digital Logic Design Peiyi Zhao Chapman University 2009"

Similar presentations


Ads by Google