blob: 6ef0e10bea54b085bce0b1a8928a23394f92e7c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
module reversed #(parameter WIDTH=256, SELW=2)
(input clk ,
input [9:0] ctrl ,
input [15:0] din ,
input [SELW-1:0] sel ,
output reg [WIDTH-1:0] dout);
localparam SLICE = WIDTH/(SELW**2);
always @(posedge clk) begin
dout[(1024-ctrl*sel)-:SLICE] <= din;
end
endmodule
|