Archived
1
0

fixed typo

This commit is contained in:
Erick
2022-02-22 13:19:11 +01:00
parent 2fde4d5bf5
commit af47b1fe38
2 changed files with 10 additions and 10 deletions
+5 -5
View File
@@ -1,17 +1,17 @@
include "and_gate.v" include "and_gate.v"
include "xnor_gate.v" include "nor_gate.v"
include "not_gate.v" include "not_gate.v"
module xnor_gate(a, b, y); module xnor_gate(a, b, y);
input a, b; input a, b;
output y; output y;
logic selA, selB, tmpXnorA, tmpXnorB; logic selA, selB, tmpNorA, tmpNorB;
always @ (a or b)begin always @ (a or b)begin
not_gate(a, selA); not_gate(a, selA);
not_gate(b, selB); not_gate(b, selB);
and_gate(a, selB, tmpXnorA) and_gate(a, selB, tmpNorA)
and_gate(selA, b, tmpXnorB) and_gate(selA, b, tmpNorB)
xnor_gate(tmpXnorA, tmpXnorB, y) nor_gate(tmpNorA, tmpNorB, y)
end end
endmodule endmodule
+5 -5
View File
@@ -1,17 +1,17 @@
include "and_gate.v" include "and_gate.v"
include "xor_gate.v" include "or_gate.v"
include "not_gate.v" include "not_gate.v"
module xnor_gate(a, b, y); module xnor_gate(a, b, y);
input a, b; input a, b;
output y; output y;
logic selA, selB, tmpXorA, tmpXorB; logic selA, selB, tmpOrA, tmpOrB;
always @ (a or b)begin always @ (a or b)begin
not_gate(a, selA); not_gate(a, selA);
not_gate(b, selB); not_gate(b, selB);
and_gate(a, selB, tmpXnorA); and_gate(a, selB, tmpOrA);
and_gate(selA, b, tmpXnorB); and_gate(selA, b, tmpOrB);
xor_gate(tmpXorA, tmpXorB, y); or_gate(tmpOrA, tmpOrB, y);
end end
endmodule endmodule