GR712RC-UM, Jun 2017, Version 2.9 12 www.cobham.com/gaisler
GR712RC
This scenario can occur when writing a series of words to the SPI controller and the delay between
two writes matches the time it takes for the core to transfer the current transmit queue contents. A pos-
sible scenario is that a processor wants to send two words over SPI, after the first word has been writ-
ten the processor gets an interrupt, when the processor returns from serving the interrupt and writes
the second word the second write could hit the window.
Software drivers that use SPI clock phase 0 (data sampling starts on the first transition of SCK) are
potentially affected.
Workaround 0: Use a SPI clock phase of 1 and adjust the CPOL value instead.
Workaround 1: Ensure that all words of a transfer are written to the transmit queue before the last bit
of a preceding word has been sent.
See section 23.3.
1.7.7 FTMCTLR: EDAC usage with 8-bit wide memory
The FTMCTRL - 8/16/32-bit Memory Controller with EDAC IP core supports EDAC protection of
8-bit wide PROM and SRAM banks. The implementation has a shortcoming that prevents a contigu-
ous data area stretching over multiple banks to be protected with EDAC when using memory devices
with 8-bit wide data buses. It has therefore been documented in user's manuals that only the first
PROM bank and the first SRAM bank can be used with EDAC protection of 8-bit wide data.
Detailed analysis shows however that the limitation of using only one bank applies to the usage of a
contiguous memory space. It is in fact possible to use multiple banks (i.e. multiple chip select signals)
in 8-bit wide operation with EDAC protection, provided that the memory space can be not contigu-
ous. The checkbytes for the device in each bank are stored at the top addresses of the actual device.
Thus 80% of each device can be utilized but there will consequently be gaps in the user data.
For this scheme to work with GR712RC it is mandatory that the bank size is defined as at least 4
times larger than the actual memory device mapped to the bank. Thus the gaps in the user data will be
larger than the expected 20% imposed by the checkbytes, since now the distance between the start of
each bank is at least four times the memory device size. The governing principle is that the actual
memory device size must not be larger than a quarter of the bank size for this scheme to work for
more than 2 PROM banks. Note that more than 2 PROM banks can be decoded in the GR712RC,
although only 2 external chip select signals are provided.
For this scheme to work with 2 PROM banks (due to programming) there is no limitation on the size
of the actual memory device mapped to the bank.
This scheme is compatible with the power-on reset values of the ROMBANKSZ field and applies to
both two 2 or 4 PROM bank solutions.
For programmable PROM bank sizes, such as the ones available on the GR712RC, half of the PROM
space (i.e. 256MiB) is mapped to the first PROM bank after power-up reset. During the boot sequence
one can change the PROM bank size accordingly to enable other PROM banks as well.
This scheme also works with PROM memory device sizes up to 256 MiB (when using a PROM bank
size of 256MiB), provided that only two PROM banks are used.
The same principles apply to GR712RC’s SRAM banks, which have a programmable bank size that
should be setup to be at least 4 times larger than the actual memory device mapped to the bank.
The address of where a checkbyte is located is calculated as follows:
AMBA address of first data byte in a 32-bit word (lowest address, word aligned): A[31:0]
AMBA address of checkbyte: A[31:28] & "11" & not A[27:2]
Note that the chip select decoding is done once for the data bytes only and the same chip select is kept
asserted also for the checkbyte.
Example 1:
Assuming one is using four 128KiB PROM memory devices, each with its own PROM select signal.
By defining the PROM bank as 4 x 128KiB = 512KiB (i.e. ROMBANKSZ = ln (512KiB/8KiB) / ln 2
= 6), it is possible to use four PROM banks with EDAC protection in 8-bit operation.
The first bank is located at address 0x0000 0000, the second at 0x0008 0000, and so on. One can use
80% of each memory device, thus the following ranges can be used for user data:
PROM bank 0: 0x0000 0000 - 0x0001 9997
PROM bank 1: 0x0008 0000 - 0x0009 9997