Tuesday, 29 March 2016

How is byte addressable memory implemented?



How is byte addressable memory implemented? If the max word size is 8 bytes (64 bits), does the memory always read 8 bytes and then use logic to select the bytes you actually need (1, 2, 4, 8 bytes)? Also, how are the writes implemented?



Answer



Generally what happens is you lose the low order address lines and gain byte enable lines. So if you have 4 GB of memory which would require 32 address bits for byte access, you might end up with 30 address bits, 4 byte enables (from the remaining 2 address bits), and 32 data lines for a 32 bit word size or 29 address bits, 8 byte enables, and 64 data lines for a 64 bit word size. Inside the memory, logic will be used to mask which bytes are actually written back during write operations based on which byte enables are selected. Generally the byte enables are only used during write operations, reads will almost always read out the complete word size and whatever is performing the read operation will simply ignore the extra data.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...