1
0
mirror of https://github.com/aolofsson/oh.git synced 2025-02-07 06:44:09 +08:00
oh/stdcells/hdl/oh_dffrq.v
2021-05-24 19:05:20 -04:00

24 lines
852 B
Verilog

//#############################################################################
//# Function: Positive edge-triggered static D-type flop-flop with async #
//# active low reset. #
//# #
//# Copyright: OH Project Authors. All rights Reserved. #
//# License: MIT (see LICENSE file in OH repository) #
//#############################################################################
module oh_dffrq #(parameter DW = 1) // array width
(
input [DW-1:0] d,
input [DW-1:0] clk,
input [DW-1:0] nreset,
output reg [DW-1:0] q
);
always @ (posedge clk or negedge nreset)
if(!nreset)
q <= 'b0;
else
q <= d;
endmodule