17
EMT 251 EMT 251 SPICE NETLIST SPICE NETLIST

EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

Embed Size (px)

Citation preview

Page 1: EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

EMT 251EMT 251

SPICE NETLISTSPICE NETLIST

Page 2: EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

IntroductionIntroduction SPICE (Simulation with Integrated Circuits Emphasis)SPICE (Simulation with Integrated Circuits Emphasis) General purpose circuit simulator which widely used in General purpose circuit simulator which widely used in

microelectronics industrymicroelectronics industry Developed at University of California BerkeleyDeveloped at University of California Berkeley Many variants e.g. HSPICE, PSPICE etc.Many variants e.g. HSPICE, PSPICE etc. Uses a simple netlist format for data inputUses a simple netlist format for data input Most manufacturers provide SPICE models as an Most manufacturers provide SPICE models as an

essential for CAD toolessential for CAD tool Knowledge of various device parameters are essential Knowledge of various device parameters are essential

for performing detailed circuit simulations and for for performing detailed circuit simulations and for optimizing designoptimizing design

Page 3: EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

Cont…Cont…

SPICE had three built-in MOSFET models:SPICE had three built-in MOSFET models: Level 1 (MOS1) >> described by square-law current-Level 1 (MOS1) >> described by square-law current-

voltage characteristicsvoltage characteristics Level 2 (MOS2) >> detailed analytical MOSFET Level 2 (MOS2) >> detailed analytical MOSFET

modelmodel Level 3 (MOS3) >> semi-empirical modelLevel 3 (MOS3) >> semi-empirical model

Recently, BSIM3 (Berkeley Short-Channel Recently, BSIM3 (Berkeley Short-Channel IGFET Model) ver. has been added to allow IGFET Model) ver. has been added to allow more accurate characterization of sub-micron more accurate characterization of sub-micron MOSFET characteristicsMOSFET characteristics

Page 4: EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

SPICE Netlist Flow ChartSPICE Netlist Flow Chart

Page 5: EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

AdvantagesAdvantages

Improved memory utilisationImproved memory utilisation Improved convergence for numerical Improved convergence for numerical

algorithmsalgorithms Improved accuracyImproved accuracy Improved execution speedImproved execution speedCan be used for mixed mode simulationCan be used for mixed mode simulation

Page 6: EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

Basic ConceptBasic Concept

Circuits for SPICE simulation are Circuits for SPICE simulation are described:described:The elements of the circuit (voltage, current, The elements of the circuit (voltage, current,

resistors, capacitors, transistors etc.)resistors, capacitors, transistors etc.)A list of the nets/nodes (can be assigned A list of the nets/nodes (can be assigned

names or numbers depending on the specific names or numbers depending on the specific software used)software used)

Example:Example:

circuit’s elementlist of nodes

Page 7: EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

Element Line DescriptionsElement Line Descriptions Voltage SourceVoltage Source

Vxx +node -node DC valueVxx +node -node DC value

Current SourceCurrent SourceVxx +node -node DC valueVxx +node -node DC value

ResistorResistorRxx node1 node2 valueRxx node1 node2 value

CapacitorCapacitorCxx node1 node2 valueCxx node1 node2 value

DiodeDiodeDxx +node -node model_name <area> plus other optional parametersDxx +node -node model_name <area> plus other optional parameters

Bipolar TransistorBipolar TransistorQxx collector base emitter <bulk> model_name <area> plus other optional parametersQxx collector base emitter <bulk> model_name <area> plus other optional parameters

MOS TransistorMOS TransistorMxx drain gate source bulk model_name <L=value> <W=value> <AD=value> <AS=value> Mxx drain gate source bulk model_name <L=value> <W=value> <AD=value> <AS=value> plus other optional parametersplus other optional parameters

Note: parameters in Note: parameters in <><> are optional and not required for simulation. are optional and not required for simulation.

Page 8: EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

Analysis DescriptionsAnalysis Descriptions SPICE can perform a variety of types of analysis on a circuit:SPICE can perform a variety of types of analysis on a circuit:

Transient AnalysisTransient Analysis

.TRAN TSTEP TSTOP <TSTART> <TMAX>.TRAN TSTEP TSTOP <TSTART> <TMAX>

TSTEPTSTEP is the time step used between analysis points, and the is the time step used between analysis points, and the smaller the value is, the more resolution you will get in your smaller the value is, the more resolution you will get in your simulation. A typical value is 1nsec.simulation. A typical value is 1nsec.

TSTOPTSTOP is the time when you want your transient analysis to is the time when you want your transient analysis to stop. This value will depend on the frequency of your input stop. This value will depend on the frequency of your input signal(s) and the time it takes for your circuit to produce its final signal(s) and the time it takes for your circuit to produce its final output.output.

TSTARTTSTART is used if you want the analysis to start at some time is used if you want the analysis to start at some time other than Time=0.other than Time=0.

TMAX TMAX is used to set the largest step time that will be used. This is used to set the largest step time that will be used. This parameter is typically not needed.parameter is typically not needed.

Page 9: EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

Cont..Cont..

DC AnalysisDC Analysis Use a DC analysis if you want to view the response of the Use a DC analysis if you want to view the response of the

circuit when a source (voltage or current) sweeps between circuit when a source (voltage or current) sweeps between two DC values. The command and parameters are:two DC values. The command and parameters are:

.DC Source_name START STOP STEP.DC Source_name START STOP STEP

Source_name is the name of the source that will be swept.Source_name is the name of the source that will be swept. START and STOP are the beginning and ending values of START and STOP are the beginning and ending values of

the sweep.the sweep. STEP is the increment value used during the sweep.STEP is the increment value used during the sweep.

Page 10: EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

Cont..Cont..

AC AnalysisAC AnalysisTo sweep all AC sources across a range of To sweep all AC sources across a range of

frequencies, use the .AC command.frequencies, use the .AC command.

.AC Lin/Dec/Oct N FSTART FSTOP.AC Lin/Dec/Oct N FSTART FSTOP

FSTART and FSTOP are the beginning and ending FSTART and FSTOP are the beginning and ending frequencies of the AC analysis.frequencies of the AC analysis.

Select either Lin, Dec, or Oct for a linear, decade, Select either Lin, Dec, or Oct for a linear, decade, or octave scaled sweep with N points analyzed.or octave scaled sweep with N points analyzed.

Page 11: EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

SPICE UnitsSPICE UnitsThe default units for SPICE are volts, amps, ohms, farads, henries, The default units for SPICE are volts, amps, ohms, farads, henries, watts etc. You can specify values in decimal form, 0.0056, or watts etc. You can specify values in decimal form, 0.0056, or exponential form, 5.6e-3. SPICE also recognizes the followingexponential form, 5.6e-3. SPICE also recognizes the following abbreviations:abbreviations:

ff E-15E-15 femtofemtopp E-12E-12 picopiconn E-9E-9 nanonanouu E-6E-6 micromicromm E-3E-3 milli   milli   kk E+3E+3 kilokilomegmeg E+6E+6 megamegagg E+9E+9 gigagigatt E+12E+12 teratera

For clarity you can add letters to the abbreviation as in 1U orFor clarity you can add letters to the abbreviation as in 1U or1UFARADS and both are read as the value 1e-6.. SPICE processes1UFARADS and both are read as the value 1e-6.. SPICE processesthe first letter after the number and ignores the rest.the first letter after the number and ignores the rest.

Page 12: EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

SPICE Netlist for inverterSPICE Netlist for inverter.global VDD GND.global VDD GND.connect GND 0.connect GND 0.lib /EDA/Mentor-training-ADK/technology/accusim/tsmc035.mod NOM.lib /EDA/Mentor-training-ADK/technology/accusim/tsmc035.mod NOM.probe tran V.probe tran V.TRAN 0 400ns 1ns.TRAN 0 400ns 1ns

.subckt circuit portin portout.subckt circuit portin portoutMN1 DRAIN GET SOURCE BULK p L=0.4u W=1uMN1 DRAIN GET SOURCE BULK p L=0.4u W=1uMN2 DRAIN GET SOURCE BULK n L=0.4u W=1uMN2 DRAIN GET SOURCE BULK n L=0.4u W=1u.ends circuit.ends circuit

.subckt inv in out.subckt inv in outMN1 out in VDD VDD p L=0.4u W=1uMN1 out in VDD VDD p L=0.4u W=1uMN2 out in GND GND n L=0.4u W=1uMN2 out in GND GND n L=0.4u W=1u.ends inv.ends inv

X13 portin portout circuitX13 portin portout circuitVOL1 VDD GND DC 5VVOL1 VDD GND DC 5VVOL2 in GND PWL (0ns 0 100ns 0 101ns 5V 200ns 5V 201ns 0 300ns 0)VOL2 in GND PWL (0ns 0 100ns 0 101ns 5V 200ns 5V 201ns 0 300ns 0)

X13 in out invX13 in out invVOL1 VDD GND DC 5VVOL1 VDD GND DC 5VVOL2 in GND PWL (0ns 0 100ns 0 101ns 5V 200ns 5V 201ns 0 300ns 0)VOL2 in GND PWL (0ns 0 100ns 0 101ns 5V 200ns 5V 201ns 0 300ns 0)

.end.end

Format

Format

Page 13: EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

Exercise (Write Netlist)Exercise (Write Netlist)

1. 1.

DC = 5V

R1=1k R2=100

R3=100MC1=100p

2.A

B

BA

VDD

OUT

Page 14: EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

SolutionSolution Answer 1:Answer 1:

.global VDD GND.global VDD GND

.connect GND 0.connect GND 0

.lib /EDA/Mentor-training-ADK/technology/accusim/tsmc035.mod NOM.lib /EDA/Mentor-training-ADK/technology/accusim/tsmc035.mod NOM

.probe tran V.probe tran V

.TRAN 0 1000ns 1ns.TRAN 0 1000ns 1ns

.subckt exercise1 A B OUT.subckt exercise1 A B OUTMP1 node1 A VDD VDD pmos L=0.4u W=1uMP1 node1 A VDD VDD pmos L=0.4u W=1uMP2 OUT B node1 VDD pmos L=0.4u W=1uMP2 OUT B node1 VDD pmos L=0.4u W=1uMN1 OUT A GND GND nmos L=0.4u W=1uMN1 OUT A GND GND nmos L=0.4u W=1uMN2 OUT B GND GND nmos L=0.4u W=1uMN2 OUT B GND GND nmos L=0.4u W=1u.ends inv.ends inv

X1 A B OUT exercise1X1 A B OUT exercise1VOL1 VDD GND DC 5VVOL1 VDD GND DC 5VVOL2 A GND PWL (0ns 0 100ns 0 101ns 5V 200ns 5V 201ns 0 300ns 0)VOL2 A GND PWL (0ns 0 100ns 0 101ns 5V 200ns 5V 201ns 0 300ns 0)VOL3 B GND PWL (0ns 0 100ns 0 101ns 5V 200ns 5V 201ns 0 300ns 0)VOL3 B GND PWL (0ns 0 100ns 0 101ns 5V 200ns 5V 201ns 0 300ns 0)

.end.end

Page 15: EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

SolutionSolution

Question 2:Question 2:

DC = 5V

R1=1k R2=100

R3=100MC1=100p

DC = 5V

R1=1k R2=100

R3=100MC1=100p

1 23

Page 16: EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

SolutionSolution Answer 2:Answer 2:

.global GND.global GND

.connect GND 0.connect GND 0

.lib /EDA/Mentor-training-ADK/technology/accusim/tsmc035.mod NOM.lib /EDA/Mentor-training-ADK/technology/accusim/tsmc035.mod NOM

.probe tran V.probe tran V

.TRAN 0 1000ns 1ns.TRAN 0 1000ns 1ns

V1 1 GND  DC 5V1 1 GND  DC 5R1 1   2     1kR1 1   2     1kR2 2  3     100R2 2  3     100R3 3 GND 100megR3 3 GND 100megC1 2 GND 100pC1 2 GND 100p

V1 VDD GND DC 5VV1 VDD GND DC 5V.plot DC v(2,3).plot DC v(2,3)

.end.end

Page 17: EMT 251 SPICE NETLIST. Introduction SPICE (Simulation with Integrated Circuits Emphasis) SPICE (Simulation with Integrated Circuits Emphasis) General

POP QUIZPOP QUIZ

A

A

B

B

Cin

A

BBA

Cin

SL

SL

MP1

MN1

VDD

MP2 MP3

MP4

MP5

MP6

MN2 MN3 MN4

MN5 MN6

F