fixed typo
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
include "and_gate.v"
|
||||
include "xnor_gate.v"
|
||||
include "nor_gate.v"
|
||||
include "not_gate.v"
|
||||
|
||||
module xnor_gate(a, b, y);
|
||||
input a, b;
|
||||
output y;
|
||||
logic selA, selB, tmpXnorA, tmpXnorB;
|
||||
logic selA, selB, tmpNorA, tmpNorB;
|
||||
|
||||
always @ (a or b)begin
|
||||
not_gate(a, selA);
|
||||
not_gate(b, selB);
|
||||
and_gate(a, selB, tmpXnorA)
|
||||
and_gate(selA, b, tmpXnorB)
|
||||
xnor_gate(tmpXnorA, tmpXnorB, y)
|
||||
and_gate(a, selB, tmpNorA)
|
||||
and_gate(selA, b, tmpNorB)
|
||||
nor_gate(tmpNorA, tmpNorB, y)
|
||||
end
|
||||
endmodule
|
||||
@@ -1,17 +1,17 @@
|
||||
include "and_gate.v"
|
||||
include "xor_gate.v"
|
||||
include "or_gate.v"
|
||||
include "not_gate.v"
|
||||
|
||||
module xnor_gate(a, b, y);
|
||||
input a, b;
|
||||
output y;
|
||||
logic selA, selB, tmpXorA, tmpXorB;
|
||||
logic selA, selB, tmpOrA, tmpOrB;
|
||||
|
||||
always @ (a or b)begin
|
||||
not_gate(a, selA);
|
||||
not_gate(b, selB);
|
||||
and_gate(a, selB, tmpXnorA);
|
||||
and_gate(selA, b, tmpXnorB);
|
||||
xor_gate(tmpXorA, tmpXorB, y);
|
||||
and_gate(a, selB, tmpOrA);
|
||||
and_gate(selA, b, tmpOrB);
|
||||
or_gate(tmpOrA, tmpOrB, y);
|
||||
end
|
||||
endmodule
|
||||
Reference in New Issue
Block a user