nand2/07_Operating_System/00_HACK/DFF.v

22 lines
309 B
Coq
Raw Normal View History

2023-01-11 10:13:09 +00:00
/**
* Data-Flip-Flop
* out[t+1] = in[t]
*/
`default_nettype none
module DFF(
input clk,
input in,
output out
);
// No need to implement this module
// This module is implemented in verilog using reg-variables
reg out=0;
always @(posedge clk)
if (in) out <= 1'b1;
else out <= 1'b0;
endmodule