Sie sind auf Seite 1von 4

COLLEGE OF ENGINEERING

EESB423 VLSI DESIGN


LTSPICE Guidelines
This guideline provides the techniques to create subcircuits and testbenches. In this guideline, an
inverter circuit is used as an example.
STEP 1: ENTER DESIGN
a) Enter your schematic as shown in the figure below. Label all terminals. Make sure:
- to assign transistor models NMOSA and PMOSA to the transistor components,
- set the transistor size accordingly (from your calculation),
- label the in, out, vdd and gnd terminals as 1, 2, 3 and 4,

CMOS inverter
b) Save your design as cmosnot.asc

STEP 2: CREATE LIBRARY


a) From the schematic, click View on the menu bar. Then, click on Spice Netlist.

b) A pop-up window will appear showing the netlist of the circuit. You can then close this
window. [You need to perform this step so that the software can auto-generate the netlist file
cmosnot.net]
c) Using LTspice, open the netlist file cmosnot.net

d) Add two lines to the netlist.


.subckt cmosnot 1 2 3 4

subcircuit name

.ends cmosnot

<= add this line at the beginning of the netlist

the order of the nodes will be used for the pin netlist order on the
symbol

<= add this line to the end of the netlist

e) Save the file as cmosnot.lib

You may need to change the directory based on the PC you are currently running the LTSpice.
2

STEP 3: DRAW SYMBOL


a) Go back to your schematic design cmosnot.asc and click on Hierarchy > Create a New
Symbol.
b) Draw the symbol for cmosnot, as shown below. Use the draw commands to draw the lines
and circle.

c) Place the pins. Select Edit > Add Pin/Port. A Pin/Port Property Dialog will appear. Follow
the same order as in the netlist. Node 1 for input (you can label as A), node 2 for output (you
can label as Y), node 3 for vdd and node 4 for gnd.

d) Open the Symbol Attribute Editor to enter some information by selecting Edit > Attributes >
Edit Attributes. Then,
- Select Cell in the Symbol Type drop-down box,
- Select Prefix, type X (X implies the cell is a subcircuit),
- In the Value field, type the name of the subcircuit, that is cmosnot,

e) Save the symbol as cmosnot.asy at folder lib\sym\tsmc


3

Need to create this subfolder first.

STEP 4: CREATE TESTBENCH


a) Open a new schematic file.
b) Add component cmosnot from the tsmc library.

c) Add voltage supplies to power up the circuit and to supply signals to the circuit. Set your
supplies properly (based on the type of analysis that you want to carry out.)
d) Label all appropriate nodes.
e) Add cmosnot library to the testbench circuit by selecting Edit > Spice Directive. An Edit Text
window will appear. Type .lib L:\LTSPICE IV\cmosnot.lib. The path points to the library
(netlist) file that you have created in Step 2.
You may need to change the directory based on the
PC you are currently running the LTSpice.

The completed testbench schematic


f) You can then run the simulations that you need to perform (dc sweep, transient analysis, etc).
4

Das könnte Ihnen auch gefallen