There are currently several options for the handling of configuration data for PSoC 3 and PSoC 5. These are all configured using the Design Wide Resources System tab under Configuration:
- Compressed stored in normal Flash
Here are the various options:
- Compressed: This compression is not Run Length Encoding. It is taking advantage of the fact that there are many zeros in the configuration of various blocks and that the chip comes up with all these registers set to 0. This setting will build a table of the groups of non-zero values that need to be written.
- Uncompressed: This mode doesn't take advantage of the zeros for blocks of configuration data. If a block needs some configuration, then the entire block is written.
- DMA: This mode uses the DMA engine to copy the configuration from Flash to the configuration registers. This mode uses an uncompressed version of the data. That results in it using more Flash, but it configures more quickly.
- Store Configuration Data in ECC Memory: There is one byte of ECC flash for every 8 bytes of normal flash (64KB flash part has 8K of ECC flash). If you don't need ECC protection of the flash, then this ECC flash can be used instead to hold the configuration data.
Generally the ECC Flash area is large enough to store the configuration data. Provided your application doesn't need ECC protection, then this mechanism effectively hides all the cost of the configuration memory.
Thank you for your clear answer. It didn't came up to me that the data was already compressed, and it's great that it's already taken into account!
Maybe Huffman encoding could squeeze a bit more data. Huffman works great if the same value exists multiple times. The disadvantage is the table can take (too much) space at low data counts.