quasar/verif/LEC/LEC_RTL/generated_rtl/gated_latch.sv

16 lines
247 B
Systemverilog
Raw Normal View History

2021-03-29 21:34:16 +08:00
module gated_latch
(
input logic SE, EN, CK,
output Q
);
logic en_ff;
logic enable;
assign enable = EN | SE;
always @(CK, enable) begin
if(!CK)
en_ff = enable;
end
assign Q = CK & en_ff;
endmodule