The OCM controller supports four modes of operation. Each of these modes is selected through the CFG_OCMC_ECC[2:0] CFG_OCMC_MODE bit field. The four supported modes are the following:
- Non-ECC mode (Data Access) - Accesses to the SRAM are non-ECC-enabled and an ECC is not calculated.
- Non-ECC mode (Code Access) - The L3_MAIN address is mapped to the SRAM memory space where the ECC code is stored. This mode allows read and write access to the 9-bit ECC word associated with each 128-bit data word. This mode is used for test purposes.
- Full-ECC mode - Accesses to the SRAM are ECC-enabled and a 9-bit ECC is calcualted for each 128 bits of data.
- Block-ECC mode - A 9-bit ECC is calcualted only for a 128KiB block of the SRAM. Accesses outside the 128KiB ECC-enabled block are non-ECC data acceses. In other words, a 9-bit ECC will be calculated not for each 128-bit data word of the whole SRAM space, but for each 128-bit data word within the boundaries of this 128KiB block of the SRAM. The selection of a 128KiB ECC-enabled block is done using bits[19:0] of the CFG_OCMC_ECC_MEM_BLK register. Each bit specifies which 128KiB block of the SRAM is ECC-enabled. 0x1 is the active value for each bit. In addition, more than one 128KiB ECC-enabled block can be selected.
The default mode of operation for the OCM controller is the non-ECC data access mode.