[問題] CMOS的程式問題
fa
.protect
.lib '/home2/icds11/spice/techfile/mm0355v.l' tt
.unprotect
.option post
.global vdd vss
vdd vdd 0 3.3v
vss vss 0 0v
.subckt inv in out
mp out in vdd vdd pch w=6.5u l=0.35u
mn out in vss vss nch w=3.5u l=0.35u
.ends
.subckt nand ina inb out1
mp1 out1 ina vdd vdd pch w=6.5u l=0.35u
mp2 out1 inb vdd vdd pch w=6.5u l=0.35u
mn1 out1 ina vx vss nch w=3.5u l=0.35u
mn2 vx inb vss vss nch w=3.5u l=0.35u
.ends
.subckt xor a b out1
xnand1 a b c nand
xnand2 a c d nand
xnand3 b c e nand
xnand4 d e out1 nand
.ends
.subckt and a b out1
xnand1 a b out nand
xinv1 out out1 inv
.ends
.subckt or a b out1
xinv1 a a1 inv
xinv2 b b1 inv
xand1 a1 b1 out1 and
.ends
.subckt fa a b c co sum
xxor1 b c d xor
xxor2 a d sum xor
xand1 a b e and
xand2 a c f and
xand3 b c g and
xor1 f g h or
xor2 e h co or
.ends
vina a vss pulse(0 3.3 0 0.01n 0.01n 0.5n 1n)
vinb b vss pulse(0 3.3 0 0.01n 0.01n 0.5n 1n)
vinc c vss pulse(0 3.3 0 0.01n 0.01n 0.5n 1n)
xfa a b c co sum fa
.tran 10p 3n
.probe
.op
.end
這是小弟寫的全加器
HSPICE會過
但是波形只有SUM會對
CARRY OUT卻是錯的
請問高手可以幫忙找出錯的地方嗎
還是設定電壓的值的問題?
請各位大大幫忙一下
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.25.118.139
→
06/26 02:33, , 1F
06/26 02:33, 1F