Readme.txt presents process of design and simulation of a 2-input CMOS NAND gate using esim and sky130 technology.The specifications of the design can be found here.
--------------------------------------------------------------------------------------------------------------------------------------------->>Table Of Contents
(1)Circuit Details
(2)Tools
(3)Circuit Design
(4)Circuit Simulation
(5)Observation
(6)Contributor
(7)Acknowledgement
--------------------------------------------------------------------------------------------------------------------------------------------->>Circuit Details
Logic gates perform basic logical functions and are the elemental building blocks of digital integrated circuits.Most logic gates take an input of two binary values, and output one value of a 1 or 0. NAND circuit is one of the important logic gates.CMOS is the combination of PMOS and NMOS. Figure 1 shows the realization of a 2 input CMOS NAND gate. It consists of two series NMOS transistors between Vout and GND and two parallel PMOS transistors between Vout and Vdd i.e. at 5V. If both inputs Va and Vb are low i.e. at 0V, both of the NMOS transistors will be OFF and both of the PMOS transistors will be ON. Hence, the output Vout will be high i.e. 5V. If any one of the inputs is high i.e at 5V and the other input is low i.e at 0V, one of the NMOS transistors will be ON and one among the two parallel PMOS transistors will be ON, creating a path from Vout to Vdd. Hence, the output Vout will be high i.e. at 5V. If both inputs are high i.e. 5V, both of the NMOS transistors will be ON and both of the PMOS transistors will be OFF. Hence, the output will be low i.e at 0V. When any of the inputs are low, then the output is pulled high through the parallel PMOS transistors. When all of the inputs are high, then the output is pulled low through the series NMOS transistors. If we apply 2 different clock signals as the inputs of NAND gate Va and Vb, then the output of the NAND gate is shown in Figure 2 where Va, Vb are inputs and Vout is output.
----------------------------------------------------------------------------------------------------------------------------------------------
>>Tools
The tools used for circuit design and simulations are:
(1)eSim
(1.1)Steps to download and install esim
(1.1.1) Download the latest eSim release for Windows OS from the link: https://esim.fossee.in/downloads .
(1.1.2) Locate the installer file in the folder where your downloaded files are kept.
(1.1.3)Double click on the file.
(1.1.4) If a pop-up window appears asking ”Do you want to allow the following program from an unknown publisher to make changes to this computer?”,click YES.
(1.1.5)Then in the ”License Agreement” window, select the I Agree option.
(1.1.6). Click Next when the program asks for you to ”Choose Install Location”.We have taken care to auto-select the destination folder path.
(1.1.7)In the next window that appears, select Install.
(1.1.8)A progress bar will appear; once it reaches 100%, ”Installation Complete” message will be shown at the top of the eSim setup window. Click on Close. eSim shortcut icon will be on your Desktop.
(2)SkyWater SKY130 PDK
(2.1)Steps to download
(2.1.1)Download using this link and unzip: https://static.fossee.in/esim/installation-files/sky130_fd_pr.zip
(3)ngspice
It is already installed with esim.
The schematics for 2-input CMOS NAND gate was designed in eSim and simulated in ngspice.
---------------------------------------------------------------------------------------------------------------------------------------------->>Circuit Design
-->Steps:
(1)Design the crcuit in esim
(2)Genreate the netlist in esim
(3)Open the workspace folder where esim projects are saved. Open the "2-input_CMOS_NAND_gate" folder.
(4)Copy the .cir.out file and save in the sky_fd_pr folder downloaded earlier as .cir file.
(5)Open with notepad and add the path .lib "models/sky130.lib.spice" tt at the top.
(6)Replace with CMOSP, mos_p with sky130_fd_pr__pfet_01v8 and CMOSN, mos_n with sky130_fd_pr__nfet_01v8.
(7) To replace inductor, capacitor, resistor do it this way for example: L1 out gnd 1m by x1 out gnd mid 0 sky130_fd_pr__ind_03_90.
Note: For more details go to the cells folder in sky_fd_pr. Open the specific component folder which you want to use. Then open the test folder and check the SPICE file. The SPICE file is an example of implementation of that component. You will get to know how to use the component in your ckt.
---------------------------------------------------------------------------------------------------------------------------------------------->>Circuit Simulation
-->Steps:
(1)Right click on .cir file.
(2)Click on Open With
(3)Browse for the ngspice.
(4)If ngspice not present scroll down click on More Apps.
(5)Go to the FOSSEE folder search for Ngspice. Run it
---------------------------------------------------------------------------------------------------------------------------------------------->>Observation
It was observed that the output waveform matches with reference to the truth table of NAND gate for different combination of inputs.
---------------------------------------------------------------------------------------------------------------------------------------------->>Contributor
-Soham Sen, B.Tech (Electronics and Communication Engineering), Amity University Kolkata - sohamsen25420001@gmail.com
----------------------------------------------------------------------------------------------------------------------------------------------