PWL Source
PWL Source
PWL Source
This tutorial is designed to introduce you to the tools we will use in ECE 746. It will introduce
you to the Cadence Environment, specifically Composer, Analog Artist and the Results
Browser.
The following typeface and color conventions will be used in this document:
· General Text: add cadence
· Commands / Menu Selections: add cadence
· Screen Output: add cadence
Problems with the tools? Wondering where SimWaves went? Check the FAQ at
http://www.ece.ncsu.edu/cadence/doc/cdsuser/
% mkdir Artist
% cd Artist
% icfb &
A few seconds later, you'll see CIW (Command Interpreter Window) and Library Manager
1
2
2. Create a Design Library:
3
Then the Library Manager will refresh as follows:
3. Create a Schematic:
4
A blank Schematic window will then appear.
We need to generate a schematic as shown below:
To generate a schematic like this, you will need to go through the following steps:
5
In the Library field, select NCSU_Analog_Parts
We will place the following instances in the Schematic Window from the
NCSU_Analog_Parts library as instructed below:
N_Transistor : nmos
P_Transistor : pmos
Supply_Nets : vdd , gnd
Voltage_Sources : vdc,vpulse
R_L_C : cap
Note: pay attention to the parameters specified in vdc, vpulse, and cap. These parameters are
very important in simulation
6
A. Place pmos instance:
7
C. Place gnd instance:
8
E. Place IN pin:
9
G. Place vdc instance
10
11
I. Place cap instance
J. Place wires
12
Your schematic should look like the one shown below.
13
4. Set up the Simulation Environment
From the Schematic Window menu, select Tools -> Analog Environment
A window will pop-up. This window is the Analog Artist Simulation Window.
A. Choose a Simulator
14
B. Choose Analysis
C. Add a Variable
15
D. Setup Output
When using Transient Analysis, the transient voltage will be saved automatically.
We can save the current through capacitor C0 in the schematic by doing the following:
After you click on the terminal, the Analog Artist Window should look like this:
16
5. Run Simulation
17
6. View Waveforms
The two curves (IN and OUT) will then be displayed in this window:
18
Press the Switch Axis Mode icon (circled in Red) on the left side of the Waveform Window
19
7. Use Calculator
We are going to use the calculator to plot both the current through the capacitor and the absolute
value of the capacitor current.
In Waveform Window, select Window -> Reset to clear the input and output plots from
the window.
In the Calculator Window, click on the it button (3rd column of buttons on the top).
In the Schematic Window, click on the lower terminal of the capacitor.
Returning to the Calculator Window, the text area at the top should like this:
20
In the Calculator Window, press the plot button to plot this waveform in the Waveform
Window.
In the Waveform Window, press the Add Subwindow button (bottom button on left).
In the Calculator Window, press the clear button (4th Column, top) to erase the text area,
press the abs button (last column, top), and press the it button.
In the Schematic Window, click on the lower terminal of the capacitor.
Returning to the Calculator Window, the text area at the top should like this:
In the Calculator Window, press the plot button to plot this waveform in the Waveform
Window.
21
Your Waveform Window should now look like this:
22
The Results Browser Window will then be displayed
A text window will then show the hspice netlist file for your circuit.
23
This is the end of the tutorial. On the last few pages we’ve added an extra section on using a
PWL (piece wise linear) voltage source instead of a pulse source, for your edification. Our
thanks go to Guorong Ma (gma2@unity.ncsu.edu) for writing the original version of this tutorial,
which we have edited to bring to you. If there are any questions, please email either one of us:
ravett@eos.ncsu.edu
mwbaker@eos.ncsu.edu
Thanks,
24
Appendix:
Assuming you have gone through the previous tutorial and have successfully built your
inverter, we will now show you how to use a PWL voltage source instead of the pulse source
that the tutorial source. A PWL voltage source is a source whose output voltage is dependant
on a list of time and voltage pairs that is set by the designer. This list defines what the output
voltage should be at the given times, with the voltage being linearly interpolated between
these points. This allows a designer to simulate things like digital input streams.
Then click on the delete button to remove it (the pencil eraser icon)
Now from the Schematic Window menu, select Add -> Instance…
The Component Browser should now pop up, like so:
25
In Component Browser, select Voltage_Sources and then vpwl.
The Add Instance Window should now look something like this:
26
While this option list looks very intimidating, we are really only concerned with a few of
these many options.
The most important parts of this list are the “Number of pairs of points”, which
specifies how many (time, voltage) pairs you will be defining for this source, and the “Time
X” and “Voltage X” entries where you actually define the point list.
In the Add Instance Window, fill in the “Number of pairs of points” entry box
with “10”.
When the Add Instance Window finishes updating itself, fill in the time and voltage boxes
with the following:
27
In the Schematic Window, add the source instance in the vacant spot left from where we
removed the pulse source.
In the Schematic Window, click the Check and Save button, and fix any errors it
highlights.
28
Now we need to test our new circuit to see the PWL source in action.
In Analog Artist Window, double-click on the entry highlighted below, which we set during
the tutorial.
In the window that pops up, change the transient analysis so that it runs for 30 ns, like shown
here:
29
Now, we can run the simulation just like we did in the tutorial. The plot in the Waveform
Window should look like this:
30