mirror of
https://github.com/aolofsson/oh.git
synced 2025-01-30 02:32:53 +08:00
20 lines
675 B
Verilog
20 lines
675 B
Verilog
//#############################################################################
|
|
//# Function: D-type active-high transparent latch #
|
|
//# #
|
|
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
|
//# License: MIT (see LICENSE file in OH repository) #
|
|
//#############################################################################
|
|
|
|
module oh_latq #(parameter DW = 1) // array width
|
|
(
|
|
input [DW-1:0] d,
|
|
input [DW-1:0] g,
|
|
output reg [DW-1:0] q
|
|
);
|
|
|
|
always_latch
|
|
if(g)
|
|
q <= d;
|
|
|
|
endmodule
|