discover93
Newbie level 5
- Joined
- Mar 2, 2018
- Messages
- 8
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 45
Hello guys.
I am using Hspice to simulate 2-input xor gate., but for some reasons the output is not as neat as I expected. I will be very thankful if someone explain me the reason.
Here is the code:
I am using Hspice to simulate 2-input xor gate., but for some reasons the output is not as neat as I expected. I will be very thankful if someone explain me the reason.
Here is the code:
Code:
#xor
.option nomod
.include ./22nm_lp.pm.txt
.include ./inverter.sp
X_invertera 1 a ab inverter
X_inverterb 1 b bb inverter
M1 2 a 1 1 pmos l=22n w=33n
M2 c bb 2 2 pmos l=22n w=33n
M3 3 ab 1 1 pmos l=22n w=33n
M4 c b 3 3 pmos l=22n w=33n
M5 c a 4 4 nmos l=22n w=33n
M6 4 b 0 0 nmos l=22n w=33n
M7 c ab 5 5 nmos l=22n w=33n
M8 5 bb 0 0 nmos l=22n w=33n
vdd 1 0 dc 0.95V
vinb b 0 pulse(0.95 0 0 10p 10p 95p 200p)
vina a 0 pulse(0.95 0 50p 10p 10p 95p 200p)
.tran 200p 600p
.end
.subckt inverter 1 a b
.option post accurate nomod
.include ./22nm_lp.pm.txt
M1 b a 1 1 pmos l=22n w=33n *Ap
M2 b a 0 0 nmos l=22n w=33n *An
.ends