Storing
Writing into the RAM component requires that the
str bit is set to 1.
In the example above, DataIn is set so that a hex value 0xf1 is in the bottom line (bits 7..0),
0xf2 is in the second line (bits 15..8), 0xf3 is in the third line (bits 23..16), and 0xf4 is
in the top line (bits 24..31). The gif demonstrates how to write different bytes or
halfwords to the RAM.
When you want to write a byte to a location in RAM, pay attention that you place the
byte-values in DataIn correctly with selector bits. In the example above, if you wanted to
write 0xf1 to left-most byte, you would need to put 0xf1 in bits 24..31 in DataIn and
set
sel = 1000.