beginner_EDA
Full Member level 4
Hi,
I have 128 bit (i.e. 16 byte) single register and I would like to read from it byte by byte.
How I can do that in verilog?
Is this approach ok?
I have 128 bit (i.e. 16 byte) single register and I would like to read from it byte by byte.
How I can do that in verilog?
Is this approach ok?
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 11 reg [127:0] source_reg; reg [7:0] target_reg; reg [3:0] i = 0; always @ (posedge clk) begin for (i=0; i<15; i=i+1) begin target_reg <= source_reg[8*i +:8]; //target_reg is intended to be written in a 8 bit fifo. write_fifo <= 1; end end