mirror of
https://github.com/aolofsson/oh.git
synced 2025-01-30 02:32:53 +08:00
Adding delay cell
This commit is contained in:
parent
a330f73838
commit
3314051934
32
src/common/hdl/oh_delay.v
Normal file
32
src/common/hdl/oh_delay.v
Normal file
@ -0,0 +1,32 @@
|
||||
//#############################################################################
|
||||
//# Function: Delay element #
|
||||
//#############################################################################
|
||||
//# Author: Andreas Olofsson #
|
||||
//# License: MIT (see LICENSE file in OH! repository) #
|
||||
//#############################################################################
|
||||
|
||||
module oh_delay #(parameter DW = 1, // width of data
|
||||
parameter ASIC = 0, // use asic library
|
||||
parameter DELAY= 0 // delay
|
||||
)
|
||||
(
|
||||
input [DW-1:0] in, // input
|
||||
output [DW-1:0] out // output
|
||||
);
|
||||
|
||||
generate
|
||||
if(ASIC)
|
||||
begin
|
||||
asic_delay i_delay[DW-1:0] (.in(in[DW-1:0]),
|
||||
.out(out[DW-1:0]));
|
||||
end
|
||||
else
|
||||
begin
|
||||
assign out[DW-1:0] = in [DW-1:0];
|
||||
end
|
||||
endgenerate
|
||||
|
||||
endmodule // oh_delay
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user