Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

what is wrong with my xor2 in hspice?

Status
Not open for further replies.

diod

New Member
hi
this is my new code
* **********************************************
.PARAM SUPPLY=1.8

.lib 'all_mos.l' tt


.GLOBAL VDD GND
VDD VDD GND 1.8
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
.TRAN 100P 9NS
.PLOT TRAN V(OUT)
.measure tran avgpwr avg p(mna) from=1n to=5n
.measure TRAN iavg AVG i(mnb) FROM=1ns TO=3ns
VA INVA GND PULSE 1.8 0 1NS 100PS 100PS 4.1NS 8NS
VB INVB GND PULSE 1.8 0 1NS 100PS 100PS 2NS 4NS
.END
* **********************************************it 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)
* **********************************************
in avanwaves result the out result isnt correct
what is wrong with my code?
 
Hspice is generally only used by engineers who are designing integrated circuits so, unless one of those designers familiar with Hspice reads this forum, you may have difficulty in getting an answer.
 
help in hspice

hi crutschow
i am student in design engineer branch.i really need help in hspice.
i am waiting to enginner answers.
thanks
 
glich in hspice

how i can decrease glich in my output result in xor in hspice?my output is somehow not clear.
 
The warning may be just because Hspice had a problem converging on the solution. Don't know the reason for that.

The glitch may be due to different propagation delay between stages. You'll have to analyze the circuit to see where that may be coming from. If you post a picture of the glitch it would help in the analysis.
 
result

xor.png
this is my xor2 avanwaves result.is it true?
 
xor2 power

it is nor2 code.i need to calculate power with hspice and calculate power my self.power result in hspice is 5.8622e-4.and when i calculate power((v*v*c)/2)=(3.8*3.8*50)/2=3.61e-4.my calculate is true?
.option post
.PARAM SUPPLY=3.8
.lib 'all_mos.l' tt
.GLOBAL VDD 0
vsupply VDD 0 3.8
mpa out a x vdd pch W=10u L=1u
mpb x b vdd vdd pch W=10u L=1u
mna out a gnd gnd nch W=10u L=1u
mnb out b gnd gnd nch W=10u L=1u
cload out 0 50fF
.TRAN 50PS 10NS
.measure tran avgpwr avg p(mnA) from=1n to=3n
.measure TRAN power PARAM='iavg*3.8'
.measure TRAN iavg AVG i(mnA) FROM=1ns TO=3ns
VA A 0 PULSE 0 5 1ns 50ps 50ps 4.1ns 8ns
VB B 0 PULSE 0 5 1ns 200ps 200ps 2ns 8ns
.end
 
hi
i dont need fast XOR gate really.just i want have clear output result.but i dont khow how i must change my xor inputs?
 
nor output

and this is nor resul.i want to find clear output and calculate power.its output like xor gate isnt clear.what i must to do?
nor.png
 
and this is nor resul.i want to find clear output and calculate power.its output like xor gate isnt clear.what i must to do?
View attachment 56278


I dont use Hspice, but in the model you have these two lines.

VA INVA GND PULSE 1.8 0 1NS 100PS 100PS 4.1NS 8NS
VB INVB GND PULSE 1.8 0 1NS 100PS 100PS 2NS 4NS


I would try
VA INVA GND PULSE 1.8 0 1NS 100PS 100PS 10uS 20uS
VB INVB GND PULSE 1.8 0 1NS 100PS 100PS 20uS 40uS

this I believe will increase the pulse widths into the XOR
 
nor2 power result in hspice

why in or gate hspice power result in simulation is more diffrent whit my calculate power.when hspice calculate power it is(power=5.8622e-4)
and with my calculate(((v*v*c)/2)=(3.8*3.8*50)/2=3.61e-4).i dont khow way of my calculation is true or not.if it is true why like this diffrent?
iam waiting toyour answer.
thanks
 
Status
Not open for further replies.

Latest threads

Back
Top