Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

xo2 in hspice how i can solve my xor2 code problem

Status
Not open for further replies.

diod

Member level 3
Joined
Aug 18, 2011
Messages
65
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,719
hi
this is my code in hspice but it didnt work and it didnt run in hspice
.option post accurate
.op
.MODEL CMOSN NMOS ( LEVEL = 49
+VERSION = 3.1 TNOM = 27 TOX = 4E-9
+XJ = 1E-7 NCH = 2.3549E17 VTH0 = 0.3627858
+K1 = 0.5873035 K2 = 4.793052E-3 K3 = 1E-3
+K3B = 2.2736112 W0 = 1E-7 NLX = 1.675684E-7
+DVT0W = 0 DVT1W = 0 DVT2W = 0
+DVT0 = 1.7838401 DVT1 = 0.5354277 DVT2 = -1.243646E-3
+U0 = 263.3294995 UA = -1.359749E-9 UB = 2.250116E-18
+UC = 5.204485E-11 VSAT = 1.083427E5 A0 = 2
+AGS = 0.4289385 B0 = -6.378671E-9 B1 = -1E-7
+KETA = -0.0127717 A1 = 5.347644E-4 A2 = 0.8370202
+RDSW = 150 PRWG = 0.5 PRWB = -0.2
+WR = 1 WINT = 1.798714E-9 LINT = 7.631769E-9
+XL = -2E-8 XW = -1E-8 DWG = -3.268901E-9
+DWB = 7.685893E-9 VOFF = -0.0882278 NFACTOR = 2.5
+CIT = 0 CDSC = 2.4E-4 CDSCD = 0
+CDSCB = 0 ETA0 = 2.455162E-3 ETAB = 1
+DSUB = 0.0173531 PCLM = 0.7303352 PDIBLC1 = 0.2246297
+PDIBLC2 = 2.220529E-3 PDIBLCB = -0.1 DROUT = 0.7685422
+PSCBE1 = 8.697563E9 PSCBE2 = 5E-10 PVAG = 0
+DELTA = 0.01 RSH = 6.7 MOBMOD = 1
+PRT = 0 UTE = -1.5 KT1 = -0.11
+KT1L = 0 KT2 = 0.022 UA1 = 4.31E-9
+UB1 = -7.61E-18 UC1 = -5.6E-11 AT = 3.3E4
+WL = 0 WLN = 1 WW = 0
+WWN = 1 WWL = 0 LL = 0
+LLN = 1 LW = 0 LWN = 1
+LWL = 0 CAPMOD = 2 XPART = 0.5
+CGDO = 7.16E-10 CGSO = 7.16E-10 CGBO = 1E-12
+CJ = 9.725711E-4 PB = 0.7300537 MJ = 0.365507
+CJSW = 2.604808E-10 PBSW = 0.4 MJSW = 0.1
+CJSWG = 3.3E-10 PBSWG = 0.4 MJSWG = 0.1
+CF = 0 PVTH0 = 4.289276E-4 PRDSW = -4.2003751
+PK2 = -4.920718E-4 WKETA = 6.938214E-4 LKETA = -0.0118628
+PU0 = 24.2772783 PUA = 9.138642E-11 PUB = 0
+PVSAT = 1.680804E3 PETA0 = 2.44792E-6 PKETA = 4.537962E-5 )
*
.MODEL CMOSP PMOS ( LEVEL = 49
+VERSION = 3.1 TNOM = 27 TOX = 4E-9
+XJ = 1E-7 NCH = 4.1589E17 VTH0 = -0.4064886
+K1 = 0.5499001 K2 = 0.0389453 K3 = 0
+K3B = 11.4951756 W0 = 1E-6 NLX = 9.143209E-8
+DVT0W = 0 DVT1W = 0 DVT2W = 0
+DVT0 = 0.5449299 DVT1 = 0.3160821 DVT2 = 0.1
+U0 = 117.9612996 UA = 1.64867E-9 UB = 1.165056E-21
+UC = -1E-10 VSAT = 2E5 A0 = 1.7833459
+AGS = 0.407511 B0 = 1.314603E-6 B1 = 5E-6
+KETA = 0.0137171 A1 = 0.4610527 A2 = 0.6597363
+RDSW = 364.9443889 PRWG = 0.5 PRWB = -0.1129203
+WR = 1 WINT = 0 LINT = 2.007556E-8
+XL = -2E-8 XW = -1E-8 DWG = -2.835566E-8
+DWB = 8.003075E-9 VOFF = -0.1064646 NFACTOR = 2
+CIT = 0 CDSC = 2.4E-4 CDSCD = 0
+CDSCB = 0 ETA0 = 0.0141703 ETAB = -0.0398356
+DSUB = 0.4441401 PCLM = 2.2364512 PDIBLC1 = 9.167645E-4
+PDIBLC2 = 0.0209189 PDIBLCB = -9.568266E-4 DROUT = 9.976778E-4
+PSCBE1 = 1.731161E9 PSCBE2 = 5E-10 PVAG = 14.337819
+DELTA = 0.01 RSH = 7.5 MOBMOD = 1
+PRT = 0 UTE = -1.5 KT1 = -0.11
+KT1L = 0 KT2 = 0.022 UA1 = 4.31E-9
+UB1 = -7.61E-18 UC1 = -5.6E-11 AT = 3.3E4
+WL = 0 WLN = 1 WW = 0
+WWN = 1 WWL = 0 LL = 0
+LLN = 1 LW = 0 LWN = 1
+LWL = 0 CAPMOD = 2 XPART = 0.5
+CGDO = 6.79E-10 CGSO = 6.79E-10 CGBO = 1E-12
+CJ = 1.176396E-3 PB = 0.8607121 MJ = 0.4163285
+CJSW = 2.135953E-10 PBSW = 0.6430918 MJSW = 0.2654457
+CJSWG = 4.22E-10 PBSWG = 0.6430918 MJSWG = 0.2654457
+CF = 0 PVTH0 = 4.364418E-3 PRDSW = 4.4192048
+PK2 = 3.104478E-3 WKETA = 0.0270296 LKETA = 2.038008E-3
+PU0 = -2.3639825 PUA = -8.41675E-11 PUB = 1E-21
+PVSAT = -50 PETA0 = 1E-4 PKETA = -1.444802E-3 )
*

.tran 5ns 1us 50ns
*========================================================================================
.MEASURE TRAN avgpwr AVG POWER FROM=0ns TO=15ns
.MEASURE TRAN peakpwr MAX POWER FROM=0ns TO=15ns
.meas tran RMS_Ckt_Pwr RMS power
.meas tran AVG_Sckt AVG p(x1)
.PARAM vvddpar=3.5

.measure TRAN iavg AVG i(mnb) FROM=0ns TO=15ns
.measure TRAN power PARAM='iavg*vvddpar'
.print tran p(mna)
.print tran p(mnb)
vdd vdd gnd 3.5
mpa out a vdd vdd pch W=10u L=1u
mpb out b vdd vdd pch W=10u L=1u
mna out a x gnd nch W=10u L=1u
mnb x b gnd gnd nch W=10u L=1u
va a gnd pulse 0 3.5 1n 50p 50p 2ns 20ns
vb b gnd pulse 0 3.5 2n 100p 100p 4ns 20ns
.end




what is wrong whit this?
 

You don't say what the error message is, but you have called the transistors NCH in the netlist but the model is called CMOSN. Same for the PMOS.

Keith
 
  • Like
Reactions: diod

    diod

    Points: 2
    Helpful Answer Positive Rating
what is wrong with my xor2 in hspice

hi
i changed cmosn to nch.now my code hasnt error but it has warning that(
**warning** dc voltage reset to initial transient source value
in source 0:va new dc= 0.1800D+01


**warning** dc voltage reset to initial transient source value
in source 0:vb new dc= 0.1800D+01

Don't start new threads with the same content. Threads merged [alexan_e]
 

Your error message doesn't make any sense to me. There is nothing in your netlist showing va or vb being 1.8V so I cannot see why it would set the voltage at that. Either you have changed the netlist or there is something that has 1.8V in it somewhere in your Hspice other than in the netlist.

Keith
 

.lib 'all_mos.l' tt
.GLOBAL VDD GND
VDD VDD GND 5
MNA OUT INVA Y GND nch W=10u L=1u
MNB Y INVB GND GND nch W=10u L=1u
MNA1 OUTA INVA GND GND nch W=10u L=1u
MPA1 OUTA INVA VDD VDD pch W=10u L=1u
MNB1 OUTB INVB GND GND nch W=10u L=1u
MPB1 OUTB INVB VDD VDD pch W=10u L=1u
MNA2 OUT OUTA Z GND nch W=10u L=1u
MNB2 Z OUTB GND GND nch W=10u L=1u
MPA OUT INVA X VDD pch W=10u L=1u
MPB OUT INVB X VDD pch W=10u L=1u
MPA2 X OUTA VDD VDD pch W=10u L=1u
MPB2 X OUTB VDD VDD pch W=10u L=1u
.cload out gnd 50fF
.TRAN 50PS 10NS
.measure tran avgpwr avg p(mna) from=1n to=3n
.measure TRAN iavg AVG i(mnA) FROM=1ns TO=3ns
VA INVA GND PULSE 0 5 1ns 50ps 50ps 4.1ns 8ns
VB INVB GND PULSE 0 5 1ns 200ps 200ps 2ns 8ns
.END
what is wrong with this?

---------- Post added at 02:44 ---------- Previous post was at 02:42 ----------

this is my xor2 code in hspice it hasent error but it has warning(*warning** dc voltage reset to initial transient source value in source 0:va new dc= 0.1800D+01PARAM SUPPLY=5
and i dont khow why in avanwave my output isnt correct
 

It sounds like you have some global setting in Hspice which sets va to 1.8V but not in the netlist - you need to track it down and remove it.

Keith
 

what you mean with track it down and remove it?could you say with exam?
 

I don't use Hspice, but as there is nothing in the netlist that sets va as 1.8V you must have some other way of setting the voltage through one of the menu settings. You need to find it.

Keith.
 

thanks keith about your help i try to find it.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top