Closed dayalannair closed 2 years ago
mem in wave shows the last sample at the top
The above was generated with code: This indicates that the shift is shifting the hexadecimal number and not its binary form. This must have something to do with the memory read. Seems like memory read stores the value as a set of hexadecimals instead of as a single hexadecimal value.
the shift is shifting the hexadecimal number and not its binary form
The statement makes no sense. It's one and the same thing. If you shift by 8 bits, that is 2 hex places.
True...when I set data hold as shown for data_hold1, it comes out to 00000800 and when I set it as shown above, it comes out the same but now data_hold1 is somehow correct. Will be an interesting fix
maybe needs a clk edge wait inside nested loop since its in initial begin. This will cause the whole thing to be clocked
Can confirm its a timing issue - added waits. Easiest would be to store all 4 bytes at once then feed them in instead of shifting
Fixed for the shifting case and also got it working for the split into bytes case