3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-29 14:30:08 +00:00
yosys/tests/xilinx_ug901/sfir_shifter.v
2019-10-17 17:08:38 +02:00

19 lines
494 B
Verilog

//sfir_shifter.v
(* dont_touch = "yes" *)
module sfir_shifter #(parameter dsize = 16, nbtap = 4)
(input clk,input [dsize-1:0] datain, output [dsize-1:0] dataout);
(* srl_style = "srl_register" *) reg [dsize-1:0] tmp [0:2*nbtap-1];
integer i;
always @(posedge clk)
begin
tmp[0] <= datain;
for (i=0; i<=2*nbtap-2; i=i+1)
tmp[i+1] <= tmp[i];
end
assign dataout = tmp[2*nbtap-1];
endmodule
// sfir_shifter