Hello!
I need to do a project of an complex door only using NANDs, NORs and NOTs from the this equation: (C*!D)*(A+B). My teacher said that I need to create a subcircuit with the whole equation, and a subcircuit for a NOT. I did this, but PSPICE returned this: "ERROR(ORPSIM-15461) Incorrect number of interface nodes for X4."
What can I do? I need to use four nodes at the subcircuit.
My project:
.include ams35ps.lib
V0 gnd 0 DC 0V
V1 vcc 0 DC 3.3V
VinA A gnd pulse (0 3.3 0 0.1ns 0.1ns 2.5ns 5.2ns)
VinB B gnd pulse (0 3.3 0 0.1ns 0.1ns 5ns 10.2ns)
VinC C gnd pulse (0 3.3 0 0.1ns 0.1ns 10ns 20.2ns)
VinD D gnd pulse (0 3.3 0 0.1ns 0.1ns 20ns 40.2ns)
*** Subcircuit
.subckt COMPLEXA OUT VDD GND
**NAND 1
* Rede P - Pull UP
M1 S AN VDD VDD MODP W=60u L=0.3u
M2 S BN VDD VDD MODP W=60u L=0.3u
* Rede N - Pull Down
M3 S AN Y GND MODN W=40u L=0.3u
M4 Y BN GND GND MODN W=40u L=0.3u
** NOR
* Rede P - Pull UP
M1 Y CN 1 1 MODP W=50u L=0.3u
M2 X D Y 1 MODP W=50u L=0.3u
* Rede N - Pull Down
M3 X CN 0 0 MODN W=13u L=0.3u
M4 X D 0 0 MODN W=13u L=0.3u
**NAND 2
* Rede P - Pull UP
M1 OUT S VDD VDD MODP W=60u L=0.3u
M2 OUT X VDD VDD MODP W=60u L=0.3u
* Rede N - Pull Down
M3 OUT S Y GND MODN W=40u L=0.3u
M4 OUT X GND GND MODN W=40u L=0.3u
.ends COMPLEXA
**-------------------------------------
* SubcircuitNOT
.subckt INV IN OUT VDD GND
M1 OUT IN VDD VDD MODP W=50u L=0.3u
M2 OUT IN GND GND MODN W=30u L=0.3u
.ends INV
* -------------------------------
* Invert:
X1 A AN vcc gnd INV
X2 B BN vcc gnd INV
X3 C CN vcc gnd INV
* -------------------------------
* Use complex door: (The error warning indicates this line)
X4 AN BN CN D S_1 vcc gnd COMPLEXA
* -------------------------------
X5 S_1 S_2 vcc gnd INV
* -------------------------------
C1 S_2 0 0.1pF
.tran 0.001ns 50ns
Thank you!
I need to do a project of an complex door only using NANDs, NORs and NOTs from the this equation: (C*!D)*(A+B). My teacher said that I need to create a subcircuit with the whole equation, and a subcircuit for a NOT. I did this, but PSPICE returned this: "ERROR(ORPSIM-15461) Incorrect number of interface nodes for X4."
What can I do? I need to use four nodes at the subcircuit.
My project:
.include ams35ps.lib
V0 gnd 0 DC 0V
V1 vcc 0 DC 3.3V
VinA A gnd pulse (0 3.3 0 0.1ns 0.1ns 2.5ns 5.2ns)
VinB B gnd pulse (0 3.3 0 0.1ns 0.1ns 5ns 10.2ns)
VinC C gnd pulse (0 3.3 0 0.1ns 0.1ns 10ns 20.2ns)
VinD D gnd pulse (0 3.3 0 0.1ns 0.1ns 20ns 40.2ns)
*** Subcircuit
.subckt COMPLEXA OUT VDD GND
**NAND 1
* Rede P - Pull UP
M1 S AN VDD VDD MODP W=60u L=0.3u
M2 S BN VDD VDD MODP W=60u L=0.3u
* Rede N - Pull Down
M3 S AN Y GND MODN W=40u L=0.3u
M4 Y BN GND GND MODN W=40u L=0.3u
** NOR
* Rede P - Pull UP
M1 Y CN 1 1 MODP W=50u L=0.3u
M2 X D Y 1 MODP W=50u L=0.3u
* Rede N - Pull Down
M3 X CN 0 0 MODN W=13u L=0.3u
M4 X D 0 0 MODN W=13u L=0.3u
**NAND 2
* Rede P - Pull UP
M1 OUT S VDD VDD MODP W=60u L=0.3u
M2 OUT X VDD VDD MODP W=60u L=0.3u
* Rede N - Pull Down
M3 OUT S Y GND MODN W=40u L=0.3u
M4 OUT X GND GND MODN W=40u L=0.3u
.ends COMPLEXA
**-------------------------------------
* SubcircuitNOT
.subckt INV IN OUT VDD GND
M1 OUT IN VDD VDD MODP W=50u L=0.3u
M2 OUT IN GND GND MODN W=30u L=0.3u
.ends INV
* -------------------------------
* Invert:
X1 A AN vcc gnd INV
X2 B BN vcc gnd INV
X3 C CN vcc gnd INV
* -------------------------------
* Use complex door: (The error warning indicates this line)
X4 AN BN CN D S_1 vcc gnd COMPLEXA
* -------------------------------
X5 S_1 S_2 vcc gnd INV
* -------------------------------
C1 S_2 0 0.1pF
.tran 0.001ns 50ns
Thank you!