1 2 3 4 5 6 7
module sdff( input d, clk, rst, output reg q ); always @( posedge clk) if (rst) q <= 0; else q <= d; endmodule