simulation with netlist.pdf
TRANSCRIPT
-
SImulating electricalcircuitsusingNetlist description
Seminar
Prof : Rogelio PalomeraProf:RogelioPalomera
TA:AndresSalazarLlinas
-
What is a NetlistWhatisaNetlist
Connectivity description of an electronicConnectivitydescriptionofanelectronicdesign.
The heart of any Cadence (Spice) file which is TheheartofanyCadence(Spice)file,whichissimplya list ofcomponentsandthe nets (ornodes) that connect them togethernodes)thatconnectthemtogether.
-
Circuit Simulation ProcessCircuitSimulationProcess
CreateSchematic
GeneratetheNetlist File GeneratetheNetlist File
Setupsimulationparameters
R Si l ti
RunSimulation
RunSimulation
-
Example 1Example1
*Example 1
VS10AC1SIN(0VOFF1VPEAK2KHZ)
R1121K
C1 2 0 0 032UFC1200.032UF
*ANALYSIS
.ACDEC51010MEG
S 00 S.TRAN5US500US
*VIEWRESULTS
.PRINTACVM(2)VP(2)
.PLOTACVM(2)VP(2)
.PLOTTRANV(1)V(2)
PROBE.PROBE
.END
-
CommandsCommands Devices:Nameacomponent,designatethenodeswhereit'sconnected,andgiveitavalue.RS 1 2 1000 VOLTAGE SOURCE VOLTAGESOURCESINEWAVE,PULSE,AC,DCSIN({voffset}{vpeak}{freq}{tdelay}{damp_factor}{phase})PULSE({v1}{v2}{tdelay}{trise}{tfall}{width}{period}) AC AND TRANSIENT ANALYSISACANDTRANSIENTANALYSISPerformbothAC(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 ConditionsExamples:.ICV(2)=3.4V(102)=0.TRAN{print step value}{finaltime}[{noprint time}Examples:.TRAN5NS100NS PLOTTINGRESULTSPLOT [DC][AC][NOISE][TRAN] [ [{ i bl }*].PLOT[DC][AC][NOISE][TRAN][[{outputvariable}*]Examples:.PLOTDCV(3)V(2,3)V(R1)I(VIN).PROBE[outputvariable]*
-
Commands IICommandsII CONTROLLEDSOURCESVoltage Controlled Voltage Source VCVS.E{name}{+node}{node}{+cntrl}{cntrl}{gain}Examples:EBUFF1210111.0 Current Controlled Current Source CCCS Current Controlled Current Source CCCS.F{name}{+node}{node}{vsource name}{gain}Examples:FSENSE12VSENSE10.0 Voltage Controlled Current Source VCCS Voltage Controlled Current Source VCCS.G{name}{+node}{node}{+control}{control}{gain}Examples:GBUFF1210111.0 Current Controlled Voltage Source CCVS.Current Controlled Voltage Source CCVS.H{name}{+node}{node}{vsource name}{gain}Examples:HSENSE12VSENSE10.0
-
HowtoobtainaVoltageCurrenthCharacteristiccurve
*CurrentsourcefortestingI1 0 1 d 1AI101dc1A
R1121kd123mod1
Vsupply2 3 0 1Vsupply2301
.modelmod1d
*Analysis.dcI10.0010.0010.00005
.probeV(2)
.end
-
Netlist Simulation using CadenceNetlist SimulationusingCadence
GotoAllProgramsCadenceSPBCAMSSimulator AMSSimulator
-
Open a New Text FileOpenaNewTextFile
-
IntroducetheNetlist Descriptionofh d f ltheCirctuit andsaveitas.cirfile
-
Go to FileOpen and open the .cir fileGotoFileOpen andopenthe.cirfile
-
Go to Run ButtonGotoRunButton
-
Check if the simulation is completedCheckifthesimulationiscompleted
-
Go to the Add Trace ButtonGototheAddTraceButton
-
Choose your OutputsChooseyourOutputs
-
IfyouwanttoseetheOutputfile.Gol f ltoSimulationOutputfileButton
-
Getallthedataaboutyoursimulationlresults
-
Creating a SubcircuitCreatingaSubcircuit
A subcircuit is similar to a subroutine in softwareAsubcircuit issimilartoasubroutineinsoftwareprogramming.
This saves the tedium of creating multiple blocksThissavesthetediumofcreatingmultipleblocksofacircuitusedinmanyplaces.
The subcircuit is defined by the statements: Thesubcircuit isdefinedbythestatements:.SUBCKT ...
S b i it d fi itiSubcircuit definition.
.ENDS
-
Example 2Example2
We want to create a model for an OpAmpWewanttocreateamodelforanOpAmp *SINGLEPOLEOPERATIONALAMPLIFIERMACROMODEL*connections: noninverting input * | 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
-
NowIntroduceyoursubcircuit toyourdesignExample2
VS 1 0 AC 1 SIN(0 1 10KHZ)VS 1 0 AC 1 SIN(0110KHZ)R1 1 25KR2 2 310KXOP1 023 xOPAMP1R3 4 010KR4 4 510KXOP2 3 4 5 xOPAMP1XOP2 345 xOPAMP1**SINGLEPOLEOPERATIONALAMPLIFIERMACROMODEL*connections:noninverting input*|inverting input*||output* | | |*|||.SUBCKTxOPAMP1126*INPUTIMPEDANCERIN1210MEG*DCGAIN(100K)ANDPOLE1(100HZ)EP1 3012100KRP1 341KCP1 401.5915UF*OUTPUTBUFFERANDRESISTANCEEOUT 50401ROUT5610.ENDS**ANALYSIS.TRAN 0.01MS0.2MS.PLOTTRANV(1)V(5).PROBEV(1)V(5).END
-
Homework1) Page330.Book:MicroeLectronic circuits4th Edition.Sedra/Smith.Example4.18Fig4.76.
Getthesimulationresultsusingnetlist.ACanalysisandTRANanalysisforRe=100ohmsandRe=10ohms.
2)Page462.Book:MicroeLectronic circuits4th Edition.
Sedra/Smith.Example5.13.Fig5.76.
G t i l ti lt f th CMOS i tGetsimulationresultsfortheCMOSinverter.
-
ExerciseExercise GettherealmodelsfortherequiredcomponentsandobtainthesimulationresultsfortheOutputcurrentandOutput
Voltage. Use a resistor of 8Kohms to simulate the speaker. Input Voltage V1 . 10 mVpp at 10 KHzVoltage.Usearesistorof8Kohmstosimulatethespeaker.InputVoltageV1.10mVpp at10KHz
-
ReferencesReferences SPICE:AGuideto Circuit Simulation andAnalysis Using PSpice,PaulTuinenga,3rdEdition,PrenticeHall,1995,ISBN013
1587757.158775 7.
The Spice Book,Andrei Vladimirescu,JohnWiley &Sons,Inc.,1994,ISBN0471609269.
PSpice andCircuit Analysis,JohnKeown,Third Edition,Merrill(Macmillan PublishingCompany),1997,ISBN0132354586.