how to shift mutiple bytes in an array in one clock cycle?

i have a byte array of size 10 and i need to shift values in the array to left by 5 positions in 5 clocks. here is the code im using.

reg [7:0] data[0:9];

// data shifting process reg ps_shift_start; reg ps_done;

reg [1:0] ps_state; parameter ps_s0 = 2'b00; parameter ps_s1 = 2'b01;

reg [12:0] ps_shift; integer ps_index;

always @ (posedge clk) begin if(reset == 1) begin ps_done

Reply to
CMOS
Loading thread data ...

How about abstracting the address instead? Each time you have to shift, the addresses 0-4 swap back and forth with 5-9. Better yet, use two arrays and swap which you read or write depending on the "shift" status.

Reply to
John_H

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.