Schematic.doc Example : CMOS Inverter Schematic Step 1: Open a new schematic window Note : Before you begin with going through this example, be sure that you have the Library Manager open. 1.1. In the Library Manager: Click File | New | Cellview. A small new window called "Create New File" appears. 1.2. There are four main fields in the Create New File window : • Library Name Choose your working directory in the Library field and your library name "tutorial" in this example. • Cell Name Type "inverter" in the Cell Name field for which you will draw the schematic. • Tool 1 You select a design-editing tool to enter your design. The tool depends on the hierarchy level of your design. Only three of these tools will be used for all the examples. Composer Schematic : Schematic editor Composer Symbol : Symbol editor Virtuoso Layout : Layout editor Since we will draw a schematic, we choose "Composer Schematic". Choosing Composer Schematic automatically converts the View Name to schematic. View Name The View Name indicates the level of the design hierarchy. You can determine that you are going to draw either a symbol or a schematic or a layout in this field just by typing the corresponding view name. (You can skip this step, as the selected tool automatically updates the view name.) 3. Now, click on "OK" to close this window. The schematic editor window pops up automatically. Step 2: Add components Note: At this point, you should have an empty schematic editor window open. 2.1. The first thing to do is to add and place components that will be used in the schematic. The components we need for a schematic of an inverter are the following: • • PMOS : p-type MOSFET NMOS : n-type MOSFET 2 • • VDD : Power supply voltage GND : Ground line To add components, click on Add -> Instance… in the Schematic Editor window, as shown below. ( Add --> Instance ) 2.2. “Add Instance” window pops up. To find the cell you want, browse the library, find the technology name (e.g. tsmc18), cell name (e.g. nmos), and view name (e.g. symbol). 2.3. Pick a MOS transistor from the cell list. Say you selected the library "TSMC25". There may be some folders under this library. Each of them is named depending on the components they include. Go to the appropriate directory and pick up the NMOS transistor by clicking once on "nmos", which is a model for a three terminal ntype MOSFET. Now you see a bright NMOS transistor symbol attached to the mouse pointer in the schematic window. Click at a location in the schematic window you want to put this transistor. The same procedure can be applied to select and place the PMOS transistor. In the images below the yellow transistor is "to be placed" and the blue transistors are already “placed". 3 Note: Always make sure the differences between the PMOS symbol and the NMOS symbol: • • There is a tiny circle at the gate terminal of PMOS transistors. The arrow points from the source to the gate in the PMOS symbol, while it points from the gate to the source in the NMOS symbol. 2.4. To move a component: Choose Edit -> Move, then use mouse (mid-button) to move the component. Press ESC to quit the move mode. Step 3: Place supply voltage components (VDD/GND) 3.1. The steps to add a VDD component are the same as in adding transistors to the schematic. • Choose Add -> Instance • Put the components "VDD" and "GND" in your schematic. 3.2. At this point, we have all the necessary components placed. 4 Press ESC key to escape the operation you are doing. Also don’t forget to save the schematic constantly whatever you have done. Step 4: Wire components (making connections) 4.1. After all the components are placed, they should be connected according to the function they realize. To connect the components, choose Add -> Wire (narrow) 4.2. Connect VDD to the source terminal of the PMOS transistor. Every component has tiny red squares on its terminals where you can do the wiring. Connecting any two nets in the schematic is done by first clicking at one of the nets and then at the other one. During these steps, you will always see the message appearing in the bottommost field of the schematic window. Point at the starting point for the router Point at ending point for the router As long as you are in the wiring mode, you will be prompted about the next step you have to do, as described above. Press ESC on the keyboard, to leave the wiring mode. You will be in the wiring mode until you press ESC or choose another command from the menu. 4.3. The remaining steps are summarized below. In the wiring mode, 5 • • • Click on the drain terminal of PMOS. Click on the drain terminal of NMOS. Click on the gate terminal of PMOS. Click on the gate terminal of NMOS. Click on the GND node. Click on the source terminal of NMOS. 4.4. Your schematic should look like the schematic shown in the image below. Press ESC key to leave the wiring mode. Step 5: Edit properties of components The components you select and place from the library always come with a set of default parameters or properties. You can (and usually should) modify component properties according to your design specifications. Here are the steps to edit component properties in the schematic window. 5.1. Select the PMOS transistor by clicking on it. The selected component should be highlighted by a bright rectangle (box) around it. 6 5.2. Choose Edit Properties Object. A larger window with many editable fields appears which is called the Edit Object Properties window. 5.3. Edit the properties by clicking on the corresponding field. You may change the values for Width or Length depending on your design specifications. Usually, you will change only the Width value, which stands for the channel width (W). The default values for these properties are the smallest available values, which are determined by the current technology. 7 To edit the channel width of the transistor, click on the Width field. Then enter a new value which is either a result of your calculations or just an initial value to see how the performance changes depending on this variable. While changing a parameter, you have to pay attention to the unit you use. For example, if you set the channel width to 0.25um, you may enter 250n (nanometers). 5.4. Click OK after editing the properties in the Edit Object Properties Window. The most important parameters (type, dimensions) always appear in the schematic window nearby the corresponding transistor. Step 6: Place the Input/Output Pins 8 You must place I/O pins in your schematic to identify the inputs and the outputs. A pin can be an input or an output or an input-output (bi-directional) or a switch pin. We will only use an input pin and an output pin in our inverter schematic. 6.1. Click Add on the menu and then select Pin on the pull-down menu. 6.2. The Add Pins window appears. 6.3. Enter the name of your input pin in the Pin Names field. The input name in this example is "Inp" (the pin names can be arbitrary). Make sure that the Direction option is set to Input indicating that the current pin is an input pin. Now you see an input pin attached to your mouse in the schematic window. You can enter multiple pins of the same direction one after another by entering pin names one by other in the Pin Names field separated by space. In this case, each time you place a pin, the next one will appear until you have placed all the pins. 6.4. Move the mouse cursor on the schematic window to place pin. Since the input is the gate terminals of both transistors, it is more convenient to put this pin in front of the common node of these terminals. 9 6.5. Place the output pin Go back to the Add Pin window to pick up an output pin. Change the pin direction to Output. Enter the output pin name, which is "Outp" in our example. Then place the output pin in the schematic window near the common drain node. At this point, you are finished placing the pins. Press ESC on the keyboard to close the Add Pin window. 6.6. Connect the pins to wires. The wiring procedure is the same as described in the previous steps and is summarized below: Click on Add on the menu and then select Wire (narrow). You are now in the wiring mode again. • • Click on the input pin to start wiring, draw the wire to the common wire connecting to the gate terminals of PMOS and NMOS. Then click on the output pin and connect it to the common wire connecting to the drain terminals of PMOS and NMOS. 10 • Press ESC to close the wiring mode. At the end of this step, your schematic should look like the following: Step 7: Check and Save 7.1. Click Design on the menu banner and then select Check and Save. During this tutorial, you may save your design by selecting Save on the Design menu. It is strongly advised that you save your designs frequently. 7.2. Check the message field in the CIW window to see the error and the warning messages. You can see the message in the screen-shot above indicating that there is no error in our schematic. If this weren’t the case, the errors would have been listed in this window. Check the message field every time you save a design. 11 Example: Creating a Symbol Step 1: If you have closed the schematic window, open an existing schematic. Otherwise, go to Step 2. 1.1. Select your library by clicking on it in the library column of the Library Manager. The cells in the library will appear in the cell column. 1.2. Select your cell by clicking on it in the cell column of the Library Manager. The existing cellviews of your cell will appear in the view section. At this point, there should be only the "schematic" view appearing in the "view" column. 1.3. Select your cellview by clicking on it in the view column of the Library Manager. The name of the selected view will appear in the small cell window. 1.4. In the Library Manager Window, select Open from the File menu: ( File -> Open ) The schematic of the design will pop-up. Step 2: Create cellview (If your schematic window is open, start from here.) 2.1. From the Design menu, select Create Cellview and then From Cellview: ( Design -> Create Cellview -> From Cellview ) 12 The following window will pop up. 2.2. Check the view names and click OK Before clicking OK, make sure that the To view name is symbol. Step 3: Locate the pins 3.1 After clicking OK in the Cellview From Cellview window, the Symbol Generation Options window pops up: In this window you can edit your pin attributes and locations, you will see the default pin specifications: input pin as the left pin and output pin as the right pin of the symbol. You can change your pin locations simply by putting the pin name in the corresponding pin location field. 3.2 After the pin specifications are done, press OK. A new window will appear, showing your new symbol. This is the symbolic representation of your schematic. The default shape of the symbol icon is a rectangle, with the pins located as defined during the previous step in Symbol Generation Options pop-up window. The small red squares indicate the connection points for each corresponding pin. The red rectangle surrounding the whole symbol determines the clickable area to select the symbol when used in a schematic. 13 Step 4: Create a new symbol 4.1 If you are not satisfied with the symbol properties, then you can create a new symbol simply by editing the existing one. You can do the following operations on your symbol: • • • • Deleting/replacing some existing parts Adding new geometric shapes Changing the locations for pins and instance name Adding new labels The following is an example for a manually created inverter symbol, which was obtained by editing the symbol above. Step 5: Check and Save 5.1. To check and save the symbol, Design -> Check and Save 14 While editing the symbol, you can use only Save, which does not check anything. At this point, checking a symbol means comparing the symbol view with the corresponding schematic view, by matching all of the pin names. This occurs only when you click on Check and Save. 15