blob: 5b0a77c112d310e899a1d7466dc1928254c98eae (
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[(WIDTH-ctrl*sel)-:SLICE] <= din;
end
endmodule
|