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/xnor_gate.v
T
2022-02-28 23:53:53 +01:00

16 lines
345 B
Verilog

include "and_gate.v"
include "or_gate.v"
include "not_gate.v"
module xnor_gate(y, a, b);
input a, b;
output y;
wire selA, selB, tmpOrA, tmpOrB, tmpNot;
not_gate(a, selA);
not_gate(b, selB);
and_gate(a, selB, tmpOrA);
and_gate(selA, b, tmpOrB);
or_gate(tmpOrA, tmpOrB, tmpNot);
not_gate(tmpNot, y);
endmodule