1
0
mirror of https://github.com/aolofsson/oh.git synced 2025-02-07 06:44:09 +08:00
oh/common/hdl/oh_buffer.v
Andreas.Olofsson 9e9d323025 Changing the CFG_ASIC approach
-Should be ifdef, since this is a global. You will never be doing and not an asic at the same time!
2020-02-04 23:04:52 -05:00

25 lines
832 B
Verilog

//#############################################################################
//# Function: Buffer #
//#############################################################################
//# Author: Andreas Olofsson #
//# License: MIT (see LICENSE file in OH! repository) #
//#############################################################################
module oh_buffer #(parameter N = 1, // number of inputs
parameter SIZE = 1) // size of buffer
( input [N-1:0] in, // input
output [N-1:0] out // output
);
`ifdef CFG_ASIC
asic_buf #(.SIZE(SIZE)) ibuf [N-1:0] (.in(in[N-1:0]),
.out(out[N-1:0]));
`else
assign out[N-1:0] = in[N-1:0];
`endif
endmodule // oh_buffer