always @(posedge clk) begin if(rst_n) Q <= D; end always @(*) begin if(!rst_n) Q <= 0; end endmodule