GR740-UM-DS, Nov 2017, Version 1.7
100
www.cobham.com/gaisler
GR740
10
SDRAM Memory Controller with Reed-Solomon EDAC
10.1
Overview
The SDRAM memory controller is a 64+32-bit memory controller which is divided into a front-end
and a back-end part.
10.2
Operation
10.2.1 Memory data width
The controller supports a full-width and a half-width mode, selected via the MEM_IFWIDTH input
signal. In full-width mode, the memory bus has 64 data bits, and 0,16 or 32 check bits depending on
EDAC configuration. In half-width mode, the memory bus has 32 data bits, plus 0,8 or 16 check bits.
10.2.2 Memory access
When an AHB access is done to the controller, the corresponding request is sent to the memory back-
end which performs the access. For read bursts, the controller streams the read data so each burst item
is delivered to the bus as soon as it arrives and wait states are added as needed between each part of
the burst.
The controller has a write buffer holding one write access in EDAC configuration, and two write
accesses in non-EDAC configuration. Each write access can be up to the configured burst length in
size. The controller will mask the write latency by storing the data into the write buffer and releasing
the AHB bus immediately. The latency will be seen however if a read access is done before the writes
have completed or an additional write access is made when all buffers are used.
Writes of 32 bits or less will result in a read-modify-write cycle to update the checkbits (this is done
even if EDAC has been disabled in the control register). In this case, the memory controller generates
wait states on the AHB bus until the read part of the cycle has completed.
10.3
Limitations
The AHB front-end with EDAC is optimized for 64/128-bit masters and does not handle 32-bit bursts
efficiently, each access will result in a RMW cycle in the write case, and a read cycle in the read case.
In this device, this case only happens when the Level-2 cache is disabled or set to write-through
mode.
Figure 9.
Memory controller connected to AMBA bus and SDRAM
AHB Front-end
with EDAC
Read/Write
data buffers
SDR back-end
AHB slave I/F
to SDRAM
mem_ifwidth
mem_ifwidth