What happens to out of range memory addresses?
Posted: Tue Mar 16, 2021 11:35 pm
I see in RAM.v that 3 blocks of BRAM are instantiated for a total of ~48k words. Since the `adr` signal is 16bit and can theoretically address up to ~65k words, what happens if I pass in an address beyond 48K?
If I've done my math correctly, that means that any addresses 0xBFFF would be out of range? Is there a condition to handle this scenario? (We're looking to reserve sections on the address bus for our application, so I'm wondering if I can reserve these addresses without disrupting the RAM operation)
If I've done my math correctly, that means that any addresses 0xBFFF would be out of range? Is there a condition to handle this scenario? (We're looking to reserve sections on the address bus for our application, so I'm wondering if I can reserve these addresses without disrupting the RAM operation)
Code: Select all
wire [31:0] do [0:2]; //3 32bit wires, one for each block
// select RAM block using the 2 MSB in the address
// does this mean that '11' is out of range? because there are only
// 3 memory blocks?
// '00' --> block0
// '01' --> block1
// '10' --> block2
// what happens with '11' since there are only 3 blocks?
rdata = do[adr[15:14]];