Simulation With NEtlist PDF
Simulation With NEtlist PDF
Simulation With NEtlist PDF
usingNetlist description
Seminar
Prof : Rogelio Palomera
Prof:RogelioPalomera
TA:AndresSalazarLlinas
What is a Netlist
WhatisaNetlist
Connectivity
Connectivitydescriptionofanelectronic
description of an electronic
design.
TheheartofanyCadence(Spice)file,whichis
The heart of any Cadence (Spice) file which is
simplya list ofcomponentsandthe nets (or
nodes) that connect them together
nodes)thatconnectthemtogether.
GeneratetheNetlist File
Setupsimulation
parameters
R Si l ti
RunSimulation
GeneratetheNetlist File
RunSimulation
Example 1
Example1
*Example 1
VS10AC1SIN(0VOFF1VPEAK2KHZ)
R1121K
C1 2 0 0 032UF
C1200.032UF
*ANALYSIS
.ACDEC51010MEG
.TRAN5US500US
S 00 S
*VIEWRESULTS
.PRINTACVM(2)VP(2)
.PLOTACVM(2)VP(2)
.PLOTTRANV(1)V(2)
.PROBE
PROBE
.END
Commands
Devices:
Nameacomponent,designatethenodeswhereit'sconnected,andgiveitavalue.
RS 1 2 1000
VOLTAGE SOURCE
VOLTAGESOURCE
SINEWAVE,PULSE,AC,DC
SIN({voffset}{vpeak}{freq}{tdelay}{damp_factor}{phase})
PULSE({v1}{v2}{tdelay}{trise}{tfall}{width}{period})
AC AND TRANSIENT ANALYSIS
ACANDTRANSIENTANALYSIS
PerformbothAC(frequency)AnalysisandTransient(time)Analysis.Alsoperformanumberofotheranalyses
likeDC,Sensitivity,NoiseandDistortion.
.AC[LIN][OCT][DEC]{points}{start}{end}
.DC[LIN]{varname}{start}{end}{incr}
.DC[OCT][DEC]{varname}{start}{end}{points}
.FOUR{freq}{outputvar}
Examples:.FOUR10KHzv(5)v(6,7)
.IC{{vnode}={value}}*Initial Conditions
Examples:.ICV(2)=3.4V(102)=0
.TRAN{print step value}{finaltime}[{noprint time}
Examples:.TRAN5NS100NS
PLOTTINGRESULTS
.PLOT[DC][AC][NOISE][TRAN][[{outputvariable}*]
PLOT [DC][AC][NOISE][TRAN] [ [{
i bl }*]
Examples:.PLOTDCV(3)V(2,3)V(R1)I(VIN)
.PROBE[outputvariable]*
Commands II
CommandsII
CONTROLLEDSOURCES
H{name}{+node}{node}{vsource name}{gain}
Examples:
HSENSE12VSENSE10.0
HowtoobtainaVoltageCurrent
Characteristiccurve
h
*Currentsourcefortesting
I1 0 1 d 1A
I101dc1A
R1121k
d123mod1
Vsupply2 3 0 1
Vsupply2301
.modelmod1d
*Analysis
.dcI10.0010.0010.00005
.probeV(2)
.end
Netlist SimulationusingCadence
Simulation using Cadence
GotoAllProgramsCadenceSPBCAMSSimulator AMSSimulator
IntroducetheNetlist Descriptionof
theCirctuit
h
andsaveitas.cirfile
d
fl
Go to FileOpen andopenthe.cirfile
GotoFileOpen
and open the .cir file
Go to Run Button
GotoRunButton
IfyouwanttoseetheOutputfile.Go
toSimulationOutputfileButton
l
fl
Getallthedataaboutyoursimulation
results
l
Creating a Subcircuit
CreatingaSubcircuit
A
Asubcircuit
subcircuit issimilartoasubroutineinsoftware
is similar to a subroutine in software
programming.
Thissavesthetediumofcreatingmultipleblocks
This saves the tedium of creating multiple blocks
ofacircuitusedinmanyplaces.
Thesubcircuit
The subcircuit isdefinedbythestatements:
is defined by the statements:
.SUBCKT <subcircuit name> <node a><node b>...
S b i it definition.
Subcircuit
d fi iti
.ENDS
Example 2
Example2
WewanttocreateamodelforanOpAmp
We want to create a model for an OpAmp
*SINGLEPOLEOPERATIONALAMPLIFIERMACROMODEL*connections:
*
| inverting input
*
| | output
*
| | |
.SUBCKTOPAMP1 1 2 6
*INPUTIMPEDANCE
RIN 1
2
10MEG
*DCGAIN(100K)ANDPOLE1(100HZ)
EP13012100K
RP1341K
CP1401.5915UF
*OUTPUTBUFFERANDRESISTANCE
EOUT 5 0 4 0 1 ROUT 5 6 10
EOUT50401ROUT5610
.ENDS
noninverting input
NowIntroduceyoursubcircuit toyourdesign
Example2
VS 1
0
AC
1
R1 1
25K
R2 2
310K
XOP1 023
xOPAMP1
R3 4
010K
R4 4
510K
XOP2 345
345
xOPAMP1
*
*SINGLEPOLEOPERATIONALAMPLIFIERMACROMODEL
*connections:noninverting input
*|inverting input
*||output
*
*|||
| | |
.SUBCKTxOPAMP1126
*INPUTIMPEDANCE
RIN1210MEG
*DCGAIN(100K)ANDPOLE1(100HZ)
EP1 3012100K
RP1 341K
CP1 401.5915UF
*OUTPUTBUFFERANDRESISTANCE
EOUT 50401
ROUT 5610
.ENDS
*
*ANALYSIS
.TRAN
0.01MS0.2MS
.PLOTTRANV(1)V(5)
.PROBEV(1)V(5)
.END
SIN(0 1 10KHZ)
SIN(0110KHZ)
Homework
1) Page330.Book:MicroeLectronic circuits4th Edition.Sedra/Smith.Example4.18Fig4.76.
Getthesimulationresultsusingnetlist.ACanalysisandTRANanalysisforRe=100ohmsandRe=10ohms.
Exercise
GettherealmodelsfortherequiredcomponentsandobtainthesimulationresultsfortheOutputcurrentandOutput
Voltage. Use a resistor of 8Kohms to simulate the speaker. Input Voltage V1 . 10 mVpp at10KHz
Voltage.Usearesistorof8Kohmstosimulatethespeaker.InputVoltageV1.10mVpp
at 10 KHz
References