1
0
mirror of https://github.com/olofk/serv.git synced 2026-01-13 23:25:57 +00:00
olofk.serv/rtl/ser_eq.v
2018-11-17 21:30:03 +01:00

20 lines
290 B
Verilog

`default_nettype none
module ser_eq
(
input wire clk,
input wire a,
input wire b,
input wire clr,
output reg o_q);
reg eq = 1'b1;
wire q = eq & (a == b);
always @(posedge clk) begin
eq <= q | clr;
if (!clr)
o_q <= q;
end
endmodule