Complete novice asking a question here.
I'm just curious about using the calculated output of a pure combinational logic block, in a vector dereference. What I mean is, is this a legitimate way to derefence a block of memory on the core?
reg [7:0] mem [1023:0];
reg [7:0] someValue;
addrOffs = (y * 2) + x;
someValue = mem[addrOffs];
I guess the question is, does addrOffs need time to settle before "mem" can validly be indexed with this value? The gist would be to use something similar to this kind of array dereference in a single clock, and then retrieve "someValue" after it has been validly applied on the next clock, ie, one clock, calculate "addrOff", dereference "someValue". Next clock, use someValue.
Is this correct understanding, or "addrOffs" definitely needs to be stabilised prior to using it as an index? I was just wondering how the decoding of the flop to use would handle a changing value during settle time.