1
0
mirror of https://github.com/olofk/serv.git synced 2026-01-13 15:17:25 +00:00
olofk.serv/rtl/ser_eq.v
Olof Kindgren 96b1906676 bne, srai
2018-10-30 22:41:05 +01:00

20 lines
277 B
Verilog

`default_nettype none
module ser_eq
(
input clk,
input a,
input b,
input 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