Part 5 - Schematic Simulation


Cadence Tutorial
Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7 | Part 8 | Part 9

Overview

In this module you will perform DC and Transient analyses of your inverter using the testbench circuit.

Starting the Analog Environment.

From the Virtuoso window, select Launch->ADE L. You will see this window appear. Setup your simulation environment:
  • Select Setup->Simulator/Direcotry/Host.... Select spectre from Simulator drop-down list.
  • Select Setup->Design.... Select inv_test from the Cell View list.
  • Select Setup->Model Libraries.... Under the "Global Model Files", choose ami06N.m, ami06P.m files under ~/ncsu-cdk-1.6.0.beta/models/spectre/nom/ folder.



This is the main simulation tool in Cadence. It allows you to perform a wide variety of simulations useing several different types of modeling tools. Right now we'll be using Spectre which is a solver similar to Spice. Later on, we may use some other types of solvers which will be faster for very complex circuits.

Setting up the DC simulation


Select Setup->Design, and verify that the correct cell is selected.
Select Setup->Simulator/Host/Directory and make sure Spectre is selected as the simulator.
Select Setup->Model Libraries....
Select Analyses->Choose

This will bring up a dialog with various analyses that you can perform. Select dc and make sure Enabled is selected. Under the sweep variable, select component parameter. Click select component and returning to the schematic window, click on the DC voltage source at the input of the inverter. A new window should open asking which parameter you want to sweep. Select DC Voltage. Back in the Analyses window, enter the start and stop values to be 0 and 5 volts, set the sweep type to linear and enter that you want 50 points.

Select Outputs->To Be Plotted->Select on Schematic.

Click on the nets that you would like to plot. Select the nets that include the input and output of the inverter. (Note that if you select nets in the schematic, voltage information will be simulated. If you select the small red square pin, the current information will be recorded.)

Running the DC simulation

Click the green play button to run the simulation. Click the plot button to plot the results.
You will see the DC response of circuit. The input voltage is plotted on the x-axis and the output voltage is plotted on the y-axis. You will notice that the response is not quite symmetric. This is due to the fact that the n and p devices have different characteristics. Recall that we made both devices the minimum size in our schematic. We could now go back and adjust these sizes to get better performance. Since the transistors are parametrized cells, we could even hold the voltage constant and sweep the size of one of the transistors to determine the optimal size.



You can save your plot by selecting File->Save as image. Please use white background here as we do not want to waste toner.

Setting up a Transient Simulation


Now we will edit our testbench schematic to do a transient analysis of the inverter circuit. In this case we will use a pulse generator as the input. We can measure the output as we adjust the frequency or the load.

Return to your schematic and check whether the 'vdc' DC source driving the input of the inverter is a 'vpulse' source (if not, change the 'vdc' to 'vpulse' of the input of the inverter). Note that the DC source connected to the VDD of the inverter is still 'vdc'. Set V1 and V2 to 0 and 5 volts respectively and set the pulsewidth and period to 1ns and 2ns respectively. Note that when entering values into cadence, you enter the prefix but not the units (type '1n', not '1ns') This will give us a 5 volt square wave at 500MHz. Check and Save your file.

Running the Transient Simulation


Open analog environment (you may still need to set up the Host, Library first) and select Analyses->Choose

Select tran and set the stop time to 10ns. We will observe the device over multiple periods to ensure that it behaves consistently.

Now select the outputs to plot as you did before. Run the simulation. You should see this:



Now, go back and adjust the load capacitor or the pulse frequency and see what happens to your waveform. What is the fastest you can drive this circuit?