I have defined some BRAM in FPGA where each entry is 32bits, and the depth is 8192. Each entry will store 8 (4bit )numbers (8x4bits = 32bits). I can access BRAM starting at address 0 and increment the address by 4 (word addressing). After reading 32 bits I just split it into 4 bits each to get the stored number. How can I access the stored numbers linearly.
Lets assume that the number stored at address 0, bits [31:28] is 1, bits [27:24] is 2 and so on. If I want to access the number stored at location 70 which would be at address 32, bits [15:12]. How can I do that?. The algorithm I am trying to implement will generate location 70, and I need to convert location 70 into BRAM address and bit location