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