Archived
1
0
This repository has been archived on 2026-02-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
iceberg/gates/predefined/xor_gate.v
T
2022-02-22 13:06:51 +01:00

17 lines
373 B
Verilog

include "and_gate.v"
include "xor_gate.v"
include "not_gate.v"
module xnor_gate(a, b, y);
input a, b;
output y;
logic selA, selB, tmpXorA, tmpXorB;
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);
end
endmodule