
GR716-DS-UM, May 2019, Version 1.29
160
www.cobham.com/gaisler
GR716
20.1.3 Atomic operation
The atomic operations (OR, AND, XOR, Set&Clear) are performed by adding an offset or the
address. The offset is equal to the size of the memory. For the operations: OR, AND, XOR the size of
the area is the same as the memory size. Accessing offset 0x10 and OR0x10 would affect
the same word in memory. The operation is performed by applying or, and, xor with the write data and
the value of the memory location. For the Set&Clear operations the area is two times the memory size
because each memory location is mapped to two consecutive addresses. Accessing Set&Clear_OFF-
SET 0x0 and 0x4 would affect memory offset 0x0 (Set&Clear_OFFSET 0x8 and 0xc would affect
memory offset 0x4). To perform the Set&Clear operation a store-double should be performed to this
area. The store operation should write the Set pattern followed by the Clear pattern.
20.1.4 Scrubber
The scrubber is designed to loop through all memory locations and check for errors. The scrubbing is
performed as a dummy read access which in case of a detected correctable error will trigger the auto-
correction feature (which would perform a read-modify-write to update the data and checksum).
When a uncorrectable error is detected, the scrubber will not alter the memory location. Instead an
interrupt can be generated (by setting the LRAMCFG.IE field to '1'). The scrubber can also be config-
ured to be disabled once a uncorrectable error is detected (by setting the SCRUBCFG.DISE field to
'1'). In this case the offset of the failing memory location can be read out from the SCRUBC-
TRL.ADDR field (this field would in this case point to the memory location directly after the failing
location). The scrubbing rate can be configured with the SCRUBCFG.DELAY field. The value of this
field sets the number of clock cycles between each scrubbing access.
Wash
The scrubber can be configured to wash the memory (writing to all memory location) and generate
valid checksums. This is done by setting then SCRUBCFG.WASH field to '1'. To trig the wash func-
tion the address, pending, and enable fields need to be set in the scrub control register. The address
field should be set to zero to wash the entire memory. When the wash function completes, the scrub-
ber will be automatically enabled to check the memory for errors. To disable the scrubber after the
wash has completed, the SCRUBCFG.DISW field needs to be set to '1'.
Diagnostic read/write
To perform diagnostic accesses the scrubber is configured to read or write checksum directly using the
SCRUBCFG.CB field.
To read out the checksum of a memory location the SCRUBCFG.RCB field needs to be configured to
'1'. To perform the read out access, the address and pending bit need to be set in the scrub control reg-
ister (SCRUBCTRL.ADDR and SCRUBCTRL.PEN). When the access has completed (SCRUBC-
TRL.PEN = '0') the checksum can be read from the SCRUBCFG.CB field and the corresponding data
can be read for the scrub data register.
To write the checksum of a memory location the SCRUBCFG.WCB field needs to be configured to '1'
and the SCRUBCFG.CB needs to be set to the checksum. To perform the write access, the address and
pending bit need to be set in the scrub control register (SCRUBCTRL.ADDR and SCRUBC-
TRL.PEN). This would trigger a read-modify-write access to the memory location but instead of
using the calculated checksum the value of SCRUBCFG.CB field is used instead.
Error injection
To inject error on a memory location the scrubber is configured to xor the checksum with the
SCRUBCFG.CB field. This is done by setting the SCRUBCFG.XCB field to '1' and configure the xor
pattern in the SCRUBCFG.CB field. To perform the error injection, the address and pending bit need
to be set in the scrub control register (SCRUBCTRL.ADDR and SCRUBCTRL.PEN). This would
trigger a read-modify-write access to the memory location and xor:ed checksum is written to memory.