quasar/gated_latch.v

15 lines
242 B
Coq
Raw Normal View History

2020-12-10 15:52:23 +08:00
module gated_latch
(
input wire SE, EN, CK,
output Q
);
reg en_ff;
wire enable;
assign enable = EN | SE;
always @(CK, enable) begin
if(!CK)
en_ff = enable;
end
assign Q = CK & en_ff;
endmodule