module top(input clk, rst, input di, output reg q); reg q1; always @(posedge clk) begin // if (rst) begin // q <= 0; // q1 <= 0; // end else begin q <= q1; q1 <= di; // end end endmodule