module dff_async_reset ( input CLK, input RST, input D, output reg Q ); // async active-high reset with posedge sensitivity always @(posedge CLK or posedge RST) begin if(RST) Q <= 0; else Q <= D; end endmodule