HSPICE 실습
HSPICE elements,commands, and key letters Key letters are used to identify components The dot, “.”, is used to identify control statements Passive elements R : Resistor C : Capacitor L : Inductor K : Coupled Inductor Sources V : Independent Voltage source I : Independent Current source E : Voltage Controlled Voltage source G : Voltage Controlled Current source Signal Generators,Transient analysis PULSE : pulse of pulse train SIN : sin or damped sin EXP : exponentially tapered PWL : piece wise linear Semiconductors D : diode Q : bipolar J : jfet, mesfet M : mosfet Subcircuits and Models X : Subcircuit Calls .SUBCKT : subcircuit descripton .ENDS : end of subcircuit .MODEL : model description DC analysis control .DC : DC analysis .TF : Transfer function .SENS : sensitivity Miscellaneous .PRINT : table of values .PLOT : line printer plots .OPTIONS : change defaults .TEMP : assign temperature .END : end of circuit definition TITLE : first line in netlist * : comment line + : continuation line Transient analysis control .TRAN : transient analysis .IC : initial condition .FOUR : fourier analysis AC analysis control .AC : AC analysis .NOISE : noise analysis .DISTO : distortion analysis
실습문제 1. 수동소자인 저항으로 이루어진 회로의 동작점(노드전압) 구하기 실습 74 SPICE 시뮬레이션 실습 (1) 실습문제 1. 수동소자인 저항으로 이루어진 회로의 동작점(노드전압) 구하기 실습문제 2. 수동소자인 저항과 캐패시터으로 이루어진 회로의 동작점과 주파수 특성 구하기 실습문제 3. 수동소자인 저항과 캐패시터으로 이루어진 회로에 Pulse전압을 인가하여 transient 해석하기 실습문제 4. 4차 바터워스 저역통과 필터의 주파수 특성와 시간영역 특성 해석하기 실습문제 5. 능동소자 Diode의 device model의 rs가 회로의 DC 특성에 미치는 영향을 DC analysis를 통하여 분석하기 실습문제 6. Peak Detector 특성 분석하기 실습문제 7. MOSFET의 Inverter 특성 분석하기
* 실습문제 1. 수동소자인 저항으로 이루어진 회로의 동작점(노드전압) 구하기 실습 75 * 실습문제 1. 수동소자인 저항으로 이루어진 회로의 동작점(노드전압) 구하기 Create a netlist nemed “lab1.sp” which describes the circuit shown at figure. Use LIST, POST, NODE as options, and Request an operating point be calculated. 1 R1 + - 1KW Vi 10 V R2 1KW Run HSPICE, eg. Hspice lab1.sp >! Lab1.lis Review the output file (lab1.lis ) and Search for “operating”
실습 76 * 실습문제 1 해답. lab1.sp passive R circuit operating point calculation V1 1 0 dc 10 R1 1 2 1k R2 2 0 1k .op .option list post node .print dc v(1) v(2) .end lab1.lis ~ ***** operating point status is all simulation time is 0. node =voltage node =voltage +0:1 = 10.0000 0:2 = 5.0000
+ - 실습 77 * 실습문제 2. 수동소자인 저항과 캐패시터으로 이루어진 회로의 동작점과 주파수 특성 구하기 Vi R2 R1 실습 77 * 실습문제 2. 수동소자인 저항과 캐패시터으로 이루어진 회로의 동작점과 주파수 특성 구하기 Create a netlist named “lab2.sp” which describes the circuit shown at figure. Use LIST, POST, NODE as options, and request an operating point be calculated. And request an ac sweep 10 points per decade from 1kHz to 1MHz, and a print the AC voltage at nodes 1 and 2, and the AC current through r2 and c1. Vi R2 R1 1KW 1 DC 10 V 2 AC 1 V - + C1 0.001uF Run HSPICE, eg. Hspice lab2.sp >! Lab2.lis Review the output file (lab2.lis ) and search for “ac analysis”. After then, run awaves and call up lab1b.sp. Display the voltage at node 2. Change the X axis to log.
실습 78 lab2.lis ~ ****** passive rc circuit operating point & frequecny calculation ****** ac analysis tnom= 25.000 temp= 25.000 x freq voltage voltage current current 1 2 r2 c1 1.00000k 1.0000 499.9975m 499.9975u 3.1416u 1.25893k 1.0000 499.9961m 499.9961u 3.9550u 1.58489k 1.0000 499.9938m 499.9938u 4.9790u 1.99526k 1.0000 499.9902m 499.9902u 6.2682u 2.51189k 1.0000 499.9844m 499.9844u 7.8911u 3.16228k 1.0000 499.9753m 499.9753u 9.9341u 3.98107k 1.0000 499.9609m 499.9609u 12.5059u 5.01187k 1.0000 499.9380m 499.9380u 15.7433u 6.30957k 1.0000 499.9018m 499.9018u 19.8182u 7.94328k 1.0000 499.8444m 499.8444u 24.9468u 10.00000k 1.0000 499.7534m 499.7535u 31.4004u 12.58925k 1.0000 499.6094m 499.6094u 39.5194u 15.84893k 1.0000 499.3814m 499.3814u 49.7293u 19.95262k 1.0000 499.0206m 499.0206u 62.5602u 25.11886k 1.0000 498.4504m 498.4504u 78.6687u 31.62278k 1.0000 497.5507m 497.5507u 98.8592u 39.81072k 1.0000 496.1347m 496.1347u 124.1022u 50.11872k 1.0000 493.9151m 493.9151u 155.5364u 63.09573k 1.0000 490.4574m 490.4574u 194.4380u 79.43282k 1.0000 485.1231m 485.1231u 242.1206u 100.00000k 1.0000 477.0141m 477.0141u 299.7168u 125.89254k 1.0000 464.9558m 464.9558u 367.7830u 158.48932k 1.0000 447.5874m 447.5873u 445.7154u 199.52623k 1.0000 423.6503m 423.6503u 531.1136u 251.18864k 1.0000 392.5065m 392.5065u 619.4792u 316.22777k 1.0000 354.7116m 354.7116u 704.7827u 398.10717k 1.0000 312.2423m 312.2423u 781.0371u 501.18723k 1.0000 268.0615m 268.0616u 844.1398u 630.95734k 1.0000 225.2079m 225.2079u 892.8190u 794.32823k 1.0000 185.9867m 185.9867u 928.2433u 1.00000x 1.0000 151.6572m 151.6572u 952.8905u y ***** job concluded * 실습문제 2 해답. lab2.sp passive RC circuit operating point & Frequency calculation V1 1 0 ac 1 dc 10 R1 1 2 1k R2 2 0 1k C1 2 0 0.001u .op .option list post node .ac dec 10 1k 1meg .print ac v(1) v(2) i(r2) i(c1) .end
+ - 실습 79 실습문제 3. 수동소자인 저항과 캐패시터으로 이루어진 회로에 Pulse전압을 인가하여 실습 79 실습문제 3. 수동소자인 저항과 캐패시터으로 이루어진 회로에 Pulse전압을 인가하여 transient 해석하기 Create a netlist nemed “lab3.sp” which describes the circuit shown at figure. Add a pulse input to the voltage source as follows (starting voltage = 0v, pulse voltage = 5v, delay = 10ns, rise time = fall time = 20ns, pulse width = 500ns, pulse repetition time = 2us) Use LIST , POST, NODE as options, and request an operating point be calculated. And request an transient analysis until 2usec with 10nsec time step. Vi R2 R1 1KW 1 Pulse 2 - + C1 0.001uF Run HSPICE, eg. Hspice lab3.sp >! Lab3.lis Review the output file (lab3.lis ) and search for “transient analysis”. After then, run awaves and call up lab1c.sp. Display the voltage at node1 and node 2. And display the currents through r2 and c1.
실습 80 * 실습문제 3 해답. lab3.sp passive RC circuit transient analysis of the pulse input source V1 1 0 pulse (0 5 10n 20n 20n 500n 3u) R1 1 2 1k R2 2 0 1k C1 2 0 0.001u .op .option list post node *.ac dec 10 1k 1meg .tran 10n 2u .print v(1) v(2) i(r2) i(c1) .end
+ - 실습 81 실습문제 4. 4차 바터워스 저역통과 필터의 주파수 특성와 시간영역 특성 해석하기 0.38268uH 실습 81 실습문제 4. 4차 바터워스 저역통과 필터의 주파수 특성와 시간영역 특성 해석하기 Create a netlist named “lab4.sp” which describes the circuit shown at figure. PWL voltage source, 0V at time 0sec, 0V at 1us, 1v at 20us, 0v at 20.1us AC voltage source, magnitude = 1v phase = 0 degrees AC analysis, 20 points per decade from 100 to 100MegaHz Transient analysis, 2us steps for 40us. View the result of wave form of DB/Phase of voltage at node 3 and transient result of voltage at node 3. 0.38268uH 1.5772uH 1W R1 L1 L2 5 1 2 3 + Vi C1 1.0824nF C2 1.5307nF - Pulse 방법 ; 주파수 특성해석시 ac입력과 .ac ~ 문장을 사용하고 시간영역해석시 pwl입력과 .tran ~ 를 각각 사용하여 각각 두개의 파형을 구한다.
실습 82 * 실습문제 4 해답. lab4.sp lab4: 4th butterworth lowpass filter (AC analysis) V1 5 0 ac 1 *pwl (0 0 1u 0 20u 1 20.1u 0) R1 5 1 1k L1 2 3 1.57772uH L2 1 2 0.38268uH C1 3 0 1.5307nF C2 2 0 1.0824nF .op .option list post node .ac dec 20 100 100meg *.tran 2u 40u .print vdb(3) v(3) .end
- + 실습 83 실습문제 5. 능동소자 Diode의 device model의 rs가 회로의 DC 특성에 미치는 실습 83 실습문제 5. 능동소자 Diode의 device model의 rs가 회로의 DC 특성에 미치는 영향을 DC analysis를 통하여 분석하기 Create a netlist nemed “lab5.sp” which describes the circuit shown at figure. Set Vi’s voltage to a variable, dv, and sweep dv from 800mV to 1V in 5mV steps. And use following diode model. ( .model df d is = 2.6615e-16 rs = 0.0 ) Use LIST , POST, NODE as options, put in a print control for v(1) I(d1) 1 + Vi - D1 df Run HSPICE, eg. Hspice lab5.sp >! Lab5.lis Review the output file ( vi lab5.lis ) and search for “dc transfer”. After then, run awaves and call up lab1c.sp. Display I(d1) with dv as the x-axis. You can see the unrealistic current spikes due to 0 ohm rs. Change the rs of the diode to 0.01ohms in the model and do the same as above.
실습 84 * 실습문제 5 해답. lab5.sp lab5: Diode DC analysis rs=0 V1 1 0 dv 실습 84 * 실습문제 5 해답. lab5.sp lab5: Diode DC analysis rs=0 V1 1 0 dv d1 1 0 df .op .option list post node .dc dv 800mv 1v 5mv .model df d(is=2.6615e-16 rs=0 .print v(1) i(d1) .end lab5: Diode DC analysis rs=0.01 V1 1 0 dv d1 1 0 df .op .option list post node .dc dv 800mv 1v 5mv .model df d(is=2.6615e-16 rs=0.01) .print v(1) i(d1) .end
+ + - - 실습 85 실습문제 6. Peak Detector 특성 분석하기 1W 1 2 R1 3 D1 V1 DN4148 실습 85 실습문제 6. Peak Detector 특성 분석하기 Create a netlist named “lab6.sp” which describes the circuit shown at figure. V1 is a SIN wave source, 0volt offset, 1volt peak amplitude, frequency of 1KHz V2 is a 500mV DC source. Use DN4148 model, print out V(2) and V(1) vs, TIME Transient analysis, 10us steps for 3ms. Diode model ( .MODEL DN4148 D (CJO=5PF VJ=0.6 M=0.45 RS=0.8 IS=7e-9 + N=2 TT=6e-9 BV=100) ) 1W 1 2 R1 3 D1 + + V1 DN4148 V2 Sin - - 0.5V
실습 86 * 실습문제 6 해답. lab6.sp lab6: Peak detector V1 1 0 sin( 0 1 1k) 실습 86 * 실습문제 6 해답. lab6.sp lab6: Peak detector V1 1 0 sin( 0 1 1k) V2 3 0 dc 500mv d1 2 1 dn4148 R1 2 3 1 .op .option list post node .tran 10u 3m .model DN4148 D (CJO=5PF VJ=0.6 M=0.45 RS=0.8 IS=7e-9 + N=2 TT=6e-9 BV=100) .print v(1) v(2) .end
+ + - - 실습 87 실습문제 7. MOSFET의 Inverter 특성 분석하기 in out C Vi 0.75pF VDD 실습 87 실습문제 7. MOSFET의 Inverter 특성 분석하기 Create a netlist named “lab7.sp” which describes the circuit shown at figure. The length for both MOS device is 1u, and the width is 20u. The pulse is (vlow=0.2, vhigh=4.8, tdly=2n, tf=fr=1n, pw=5n, trep=20n) The tran is 20n in 200p steps, and use the MOSFET model ( .MODEL nch NMOS level = 13 .MODEL pch PMOS level = 13) Sweep VIN from 0V to 5V in 500mV increments. Print out V(out) and V(in). Mp1 in out + C + Vi 0.75pF Mn1 VDD Pulse - -
실습 88 * 실습문제 7 해답. lab7: MOSFET Inverter Analysis 실습 88 * 실습문제 7 해답. lab7: MOSFET Inverter Analysis vin in 0 pulse(0.2 4.8 2n 1n 5n 20n) vdd vdd 0 5v Mp1 out in vdd vdd pch l=1u w=20u Mn1 out in 0 0 nch l=1u w=20u .op .option list post node .MODEL pch pMOS level = 13 .MODEL nch nMOS level = 13 .dc vin 0 5 500m .tran 1n 60n .print v(out) v(in) .end
* Common Source Amplifier 1 * Common Source Amplifier
* Common Source Amplifier 2 * Common Source Amplifier
* Common Source Amplifier 3 * Common Source Amplifier
* Common Source Amplifier 4 * Common Source Amplifier
* Common Gate Amplifier 5 * Common Gate Amplifier
* Common Gate Amplifier 6 * Common Gate Amplifier
* Common Gate Amplifier 7 * Common Gate Amplifier
* Common Drain Amplifier 8 * Common Drain Amplifier
* Common Drain Amplifier 9 * Common Drain Amplifier
* Common Drain Amplifier 10 * Common Drain Amplifier
* Common Source Amplifier with CM 11 * Common Source Amplifier with CM
* Common Source Amplifier with CM 12 * Common Source Amplifier with CM
* Common Source Amplifier with CM 13 * Common Source Amplifier with CM
* Common Source Amplifier with CM 14 * Common Source Amplifier with CM
* Common Source Amplifier with CM 15 * Common Source Amplifier with CM
* Common Source Amplifier with CM 16 * Common Source Amplifier with CM
* Common Source Amplifier with CM & Rs 17 * Common Source Amplifier with CM & Rs
* Common Source Amplifier with CM & Rs 18 * Common Source Amplifier with CM & Rs
* Common Source Amplifier with CM & Rs 19 * Common Source Amplifier with CM & Rs
* Common Source Amplifier with CM & Rs 20 * Common Source Amplifier with CM & Rs
* Common Source Amplifier with CM & Rs 21 * Common Source Amplifier with CM & Rs
* Common Source Amplifier with CM & Rs 22 * Common Source Amplifier with CM & Rs
* Common Source Amplifier with Rs 23 * Common Source Amplifier with Rs
* Common Source Amplifier with Rs 24 * Common Source Amplifier with Rs
* Common Source Amplifier with Rs 25 * Common Source Amplifier with Rs
26 [ 참고 문헌 ] 1. 조성익 “CMOS 아날로그 집적회로 설계”, IDEC 강의 2010.