Sei sulla pagina 1di 18

ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials -1-

T- Spice Pro is part of a complete integrated circuit design tool suite for layout,
verification and simulation offered by Tanner EDA. It includes:

• S- Edit: Schematic editor that can generate netlists directly usable in T-Spice.
• T- Spice: analog/ digital circuit simulator
• W- Edit ™: waveform viewer

In this tutorial a brief flow chart from schematic drawing to simulation will be given out. i

SEDIT Tutorial
To learn more about S-Edit, follow the tutorial that makes up the balance of this chapter.
Each section takes only a few minutes to complete.

Creating a New Design


In this section, you will create a new design: an inverter.
When you create a file for a new design, you typically include modules from schematic
libraries in your new file. In this exercise, you will use the Module > Symbol
Browser command to locate the correct modules and copy them into your design.

§ Use the File > Open command to open the supplied file G:\WIN32\TannerT\
Tutorial\schematic\schemex.sdb. This file contains some modules that you
can use to get started.

§ Use the Module > Open command to examine the module list for
schemex.sdb.

Click on the Files pull-down list to view a list of modules in the file. They are as
follows:

Module0 A blank module (no symbol or schematic).


P_4 A p-channel MOS transistor.
N_4 An n-channel MOS transistor.
Vdd A power supply for a global node named Vdd.

To copy a module from a source file to a destination file, the destination file and
module must be displayed.

§ Select Module0 in the module list and click OK.

§ Switch to Schematic mode if necessary.

§ Use the Module > Symbol Browser command to view a list of available
modules. You will see the following dialog:
ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials -2-

§ The file spice.sdb is a library containing modules for various SPICE primitives.
If it is not already loaded, click on Add Library to obtain a Windows file
browser. Navigate to the file G:\WIN32\Tanner EDA\Sedit\Library\spice
.sdb tspro\library directory and select the file spice.sdb.
Click on OK.

§ In the Symbol Browser dialog, select capacitor from the module list and click
on Place. S-Edit will copy the module capacitor in spice.sdb into
schemex.sdb.

§ Click on Close to close the Symbol Browser dialog box. The current file and
module will be schemex.sdb:Module0.

§ Use Module > Open to examine the module list for schemex.sdb. The list
will contain the module capacitor. The letter C next to the module’s name
means that the module has been changed (or added) since the file was last saved.

§ Use the File > Save As command to save the changes, specifying a drive,
directory, and new name for the file (for example, schemex1.sdb).

Creating a New Module


ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials -3-

In this subsection, you will begin the design by creating an inverter module.
§ Use the Module > New command to create a new module named Inv. The new
module is now the current module, as indicated in the Title Bar.

Creating a Schematic

In this subsection, you will instance modules and connect them by wire to create
a schematic.

§ If necessary, switch to Schematic mode.

§ Activate the Module Instance tool , then click with the DRAW button in the
Work Area. The resulting dialog box contains a list of available modules.
Highlight N_4 and click OK. Select this transistor and drag it to the lower half of
the Work Area (using the MOVE-EDIT button).

§ Instance module P_4 in the same way, but position it in the upper half of the
Work Area.

Both transistors are now visible in the schematic. The four open circles on the
ends of the transistors represent pins, at which other schematic objects can be
connected to the instances.

§ Drag the two transistors together so that the top pin of the NMOS transistor lies
over the bottom pin of the PMOS transistor. The open circles will disappear,
indicating that the transistors are connected. The schematic will look like this:
ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials -4-

§ Activate the Wire tool and draw wires to connect the transistors: PMOS gate to
NMOS gate, PMOS bulk to PMOS drain, and NMOS bulk to NMOS drain. The
Wire tool looks like this:

For each wire, click the DRAW mouse button to place the first vertex; move the
mouse and click the DRAW button again to place another vertex, and so on; click
the END mouse button to place the last vertex and finish the wire.

§ When you have drawn the wires, the schematic will look like this:
ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials -5-

§ There are four types of regular ports. Each has a different appearance for the sake
of design readability, but in function they are identical.

§ Activate the appropriate Port tool and add create the input and output nodes to
the schematic. To draw a port, click any mouse button over the desired port
location. In the resulting dialog box, name the port and click OK.

Position the input port on the left side of the schematic and the output port on the
right side.

§ Activate the Wire tool and connect these ports to the instances. When you have
finished, the schematic will look like this.
ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials -6-

Creating a Global Symbol

In this subsection, you will create a global symbol representing Ground and add
it to the design.

§ Select Module > New and name the module Gnd. Click OK.

§ Switch to Symbol mode.


The Global Port tool is different in function from the other four Port tools.
Global ports only exist in Symbol mode.

§ Activate the Global Port tool and place a global port at the origin (0,0). Name this
global port Gnd. The coordinate origin will be marked by cross hairs. If the
coordinate origin is not displayed, use the command View > Origin.

§ Using the Line and Polygon tools, draw the symbol for ground. To draw a line or
polygon, click the DRAW button to place the first vertex; move the pointer and
click the DRAW button to place the next vertex, and so on; finally, click the
END button to place the last vertex. Leave the schematic page (the part of the
module viewable in Schematic mode) empty. When you have finished drawing
the Ground symbol, it will look like this:
ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials -7-

Using Global Symbols in a Schematic

In this subsection, you will complete the inverter schematic.

§ Open the module Inv.


§ Activate the Global Instance tool and click on the node which should beconnected
to ground.

Both the module representing Vdd and Gnd should appear in the resulting dialog
box. If not, the global symbols were created incorrectly.

§ Click the module Gnd to highlight it, and click OK.


The ground symbol appears on the node, which is automatically named Gnd (the
name of the global port on the symbol).

§ Using the Global Instance tool, place the Vdd symbol on the node representing
Vdd.

When you have placed both the Gnd and Vdd symbols, the schematic will look
like this:
ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials -8-

§ Place the capacitor between Gnd and Out, set the capacitor value to be 1pf.

Creating a Symbol

In this subsection, you will create a symbol for the inverter.


§ Switch to Symbol mode.

§ Using lines, an all- angle polygon, and ports, draw the inverter symbol shown
above, except for the circle.

§ Activate the Circle tool. Hold the DRAW button at the circle’s center, drag the
circumference to the desired radius, and release the DRAW button.

§ Use the Port tools to place input and output ports on the symbol. Make sure the
names and types of the ports (Input, Output, Bidirectional, or Other) correspond
exactly to the ports in Schematic mode. When you have finished drawing the
module symbol, it should look like this:
ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials -9-

Working with Properties


In this section, you will examine and manip ulate properties, which determine how
devices in your design are represented when it is exported to a netlist file.

§ Use the Module > Open command to open module N_4. Switch to Symbol
mode (see figure below).

All of the text objects in this symbol are properties. On the right side of the symbol
are several transistor parameters: PD, AD, W, L,and so on. When you create a
property, you can choose whether to show or hide its name, value, or name and value
when the module is instanced. In the originating module, S-Edit will enclose hidden
properties or property elements by square brackets, and they will be invisible in
instances of the module. Both L and W are without brackets, so they are visible in
instances.

Output Properties

Above the symbol is a property named SPICE OUTPUT. An output property defines
how instances of this transistor will appear in a SPICE- format file. The value of this
ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials - 10 -

property (or any other property) obeys a special syntax. The SPICE OUTPUT string
is: M${Instance} %{D} %{G} %{S} %{B} NMOS W=${W} L=${L}
AS=${AS} AD=${AD} PS=${PS} PD=${PD}
The table below shows the output results of the various parts of the SPICE
OUTPUT string.

Properties in Instances

Properties appear in instances of this module.

§ Use Module > Open to open the module Inv. Switch to Schematic mode.
§ Select the N_4 module instance and use the Edit > Edit Object command to
edit the instance’s properties (see figure below).
ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials - 11 -

§ The value of a property in its instanced module (the originating module) is its
default value. When the Default switch next to a property is on, the property will
take its value from the symbol page of the instanced module. You can also
override the values assigned in the symbol for this instance—if you do, S-Edit
will clear the Default check box for you.

For this instance, the property named L represents the length of the transistor and
the property named W represents the width of the transistor. The default values
for these properties are 2u and 22u, respectively. Now, change the width and
length for this instance only.

If necessary, scroll down until the properties L and W are visible. Change the
value of L from 2u to 5u. Change the value of W from 22u to 8u. Click OK.
Since L and W are visible, the changed values appear on the schematic.

§ Make a similar change to the PMOS transistor. Change the length and width of
the P_4 instance to 5u and 12u, respectively.

§ When you change the values of a property in an instance, the changes affect that
instance only. To change the property value for all instances of a module, you
must edit the property directly in the instanced, or originating, module. Open the
module, switch to Symbol mode, select the property whose value is to be
changed, and use the Edit > Edit Object command to change the value. When
you have changed the value of a property in the instanced module, the value
changes for that property in all instances of that module except those in which the
Default switch has been turned off for the property. You can show or hide
properties in the symbol for this instance.

§ Select the N_4 module instance and use the Edit > Edit Object command.
Scroll down until the SPICE OUTPUT property for this instance is visible. The
property’s viewing parameter is set to None, meaning that the property is not
ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials - 12 -

visible in the schematic. Click All to show the SPICE OUTPUT property’s
name and value. Click OK.

The SPICE OUTPUT property now appears—with node names and property
values substituted for the %{…} and ${…} strings—above the transistor in the
schematic. Only this particular instance shows the SPICE OUTPUT property;
other instances of the N_4 module are unaffected.

Exporting a Netlist

In this section, you will export a SPICE-format file describing the inverter circuit. Before
you export a SPICE- format file, you must define the primitive devices in your design.
Primitive devices are basic circuit elements such as resistors, capacitors, and transistors
for which there exist no further subcircuit descriptions in SPICE. You define a primitive
device when you create a SPICE OUTPUT property for it. S-Edit treats all modules
with SPICE OUTPUT properties as primitives. The library symbols contained in the file
spice.sdb already have such output properties, so you do not need to create them.

§ Open the module inv.


§ Use the File > Export command. In the resulting dialog box, enter the name of
the SPICE file to be exported in the Output file name field. The default value
for this field is the name of the module being exported (inv).

§ If you plan to simulate the SPICE file with T-Spice, turn on the Suppress
.END in SPICE output switch.

When this option is switched off, S-Edit writes an .END command at the end of
the SPICE file. Without the .END command, the resulting file can be included in
other SPICE files.

§ Click OK to export the file.

The finished SPICE file resides in the same directory as schemex.sdb, and
looks something like this:
---------------------------------------------------------------------------------------------------
* SPICE netlist written by S-Edit Win32 7.00
* Written on Sep 17, 2001 at 22:32:13

* Waveform probing commands


.probe
.options probefilename="F:\TA\ece755\SEDIT\ Invorg.dat"
+ probesdbfile="F:\TA\ece755\SEDIT\schemex.sdb"
+ probetopmodule="Inv"

* Main circuit: Inv


ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials - 13 -

C1 Out Gnd 1pF


MN_4_1 Out A Gnd Gnd nmos W=8u L=5u AS=66p AD=66p PS=24u PD=24u
M1 Out A Vdd Vdd pmos L=5u W=12u AD=66p PD=24u AS=66p PS=24u
* End of main circuit: Inv
---------------------------------------------------------------------------------------------------
You can now simulate this circuit using T-Spice. A file called inv.sp has been
included in the directory. It contains commands to run a simulation of this circuit
and requires the file inv.sp (the exported file). To run a simulation using T-
Spice, click on the T-Spice button in the Command toolbar: You can also use the
Probe tool to examine the electrical properties of an object, node, or module
instance.

Use T- Spice For Simulation

Add transient analysis command

§ Open inv.sp. File > Open inv.sp

§ Click the Insert Command icon ( ) in the T- Spice command toolbar. Or


Edit > Insert Command. Or Ctrl+M

§ Select Analysis and click the Transient button to open the transient analysis
dialog.

§ In modes , select Powerup simulation.

§ In maximum time step , type 5n .

§ In simulation length , type 500n . Use default values for the other fields.

§ Click Insert command . The SPICE statement .tran/ powerup 5n 500n


method= bdf will appear in the inv. sp file.

Add a print command

§ Click the Insert Command icon.

§ Select Output and click Transient results to open the Print transient
analysis results dialog.

§ In Node name, type out and A . Use default values for the other fields.
ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials - 14 -

§ Click Add and then click Insert command. The SPICE statement .print tran
v(A) v(Out) will appear in the inv. sp file.

Include a Model File

§ Click the Insert Command icon.

§ Select Files and click Include to open the Include file dialog.

Use Browse to locate model file ml2_ 125. md. This file is located at
<G:\WIN32\TannerT\models\ml2_125.md >. The modelfile with its path
will appear in Include file.

Add bias voltage

§ Click the Insert Command icon.

§ Select Voltage source and click the Constant button to open the Constant
source dialog.

§ In voltage source name, type V1.

§ In positive terminal , type Vdd .

§ In DC value , type 5 . Leave the rest blank.

§ Click Insert command . The SPICE statement Vdd Vdd GND 5 will appear
in the inv.sp file.

Add Input voltage Source

§ . Click the Insert Command icon.

§ Select Voltage source and click the Pulse button to open the Pulse source
dialog.
ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials - 15 -

§ In voltage source name, type V2.

§ Filling the rise time etc as the above figure

§ Click Insert command . The SPICE statement V2 A GND PULSE (0 5 0 10n


10n 100n 200n) will appear in the inv.sp file.

Now the inv.sp file looks like:


------------------------------------------------------------------------------------------------------------
.include "G:\WIN32\ TannerT\models\ml2_125.md"
* SPICE netlist written by S-Edit Win32 7.00
* Written on Sep 17, 2001 at 21:55:29

* Waveform probing commands


.probe
.options probefilename="schemex.dat"
+ probesdbfile="F:\TA\ece755\SEDIT\schemex.sdb"
+ probetopmodule="Inv"

* Main circuit: Inv


C1 Out Gnd 1pF
MN_4_1 Out A Gnd Gnd nmos W=8u L=5u AS=66p AD=66p PS=24u PD=24u
M1 Out A Vdd Vdd pmos L=5u W=12u AD=66p PD=24u AS=66p PS=24u
V1 Vdd Gnd 5V
ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials - 16 -

V2 A GND PULSE (0 5 0 10n 10n 100n 200n)


* End of main circuit: Inv

.print tran v(A) v(Out)


.tran/powerup 5n 500n method=bdf
------------------------------------------------------------------------------------------------------------

Run a Simulation
§ Use File > Save to save the file.

§ Click the Run Simulation button ( ) in the T- Spice simulation toolbar.

§ In the Run Simulation dialog, click Start Simulation.

§ T- Spice will open a new window displaying the simulation results. It looks like

Parameter Sweeps
In a parameter sweep , a specified parameter is held or initialized at a given value, all
analyses requested by the input file are performed, and the results are recorded. Then the
parameter is incremented by a set amount, and the same analyses are repeated. The cycle
continues as the parameter is incremented through a defined range of values. Parameter
values may be swept linearly —in identical increments, typically through a limited
range— or logarithmically —in exponential increments, typically through a range
ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials - 17 -

spanning multiple orders of magnitude. You can also specify a sweep over a list of
values. Parameter sweeping is performed by using the sweep option with one of the
following commands (all page references are to the T- Spice User Guide and
Reference ):
.ac
.dc
.step
.tran

Modify the inv.sp file to be:


------------------------------------------------------------------------------------------------------------
.include "G:\WIN32\ TannerT\models\ml2_125.md"
* SPICE netlist written by S-Edit Win32 7.00
* Written on Sep 17, 2001 at 23:14:16
* Waveform probing commands
.probe
.options probefilename="F:\TA\ece755\SEDIT\ Inv2.dat"
+ probesdbfile="F:\TA\ece755\SEDIT\schemex.sdb"
+ probetopmodule="Inv"

* Main circuit: Inv


C1 Out Gnd Cap
MN_4_1 Out A Gnd Gnd nmos W=8u L=5u AS=66p AD=66p PS=24u PD=24u
M2 Out A Vdd Vdd pmos L=5u W=12u AD=66p PD=24u AS=66p PS=24u
V1 Vdd Gnd 5V
V2 A GND PULSE (0 5 0 10n 10n 100n 200n)
* End of main circuit: Inv
.param Cap 0.2pf
.step Cap 0.1pf 2pf 0.1pf
.print tran v(A) v(Out)
.tran/powerup 5n 500n method=bdf

In this example, instead of keeping the load capacitor in the inverter subcircuit constant,
the capacitor is defined as a variable cap and T- Spice sweeps it over a range of 0.1pF
to 2pF . The .param statement sets a nominal value for cap and the .step command
sweeps cap linearly from 0.1pF to 2pF in increments of 0.1pF .
ECE755 VLSI System Fall 2001 Design Tanner Tools Tutorials - 18 -

i
If you have any problems about the tutorial, please contact Qian Zhang by email
qianz@cae.wisc.edu

Potrebbero piacerti anche