[Glean] Tightly Coupled Memory

Published: by Creative Commons Licence (Last updated: )

Tightly Coupled Memory (TCM)1

Due to being embedded inside the CPU The TCM has a Harvard-architecture, so there is an ITCM (instruction TCM) and a DTCM (data TCM). The DTCM can not contain any instructions, but the ITCM can actually contain data. The size of DTCM or ITCM is minimum 4KiB so the typical minimum configuration is 4KiB ITCM and 4KiB DTCM.

TCM is used for a few things:

  • FIQ and other interrupt handlers that need deterministic timing and cannot wait for cache misses.
  • Idle loops where all external RAM is set to self-refresh retention mode, so only on-chip RAM is accessible by the CPU and then we hang inside ITCM waiting for an interrupt.
  • Other operations which implies shutting off or reconfiguring the external RAM controller.

Difference between Cache and TCM2

The 'TCM' (tightly coupled memory) is fast, probably SRAM multi-transistor memory, like the cache. Both have a fast dedicated connection to the CPU. However, the overhead to implement the TCM is far less than a cache. Typically TCM is found on lower-end (deeply embedded probably Cortex-M) ARM devices.

Cache memory is implemented with on-chip memory and control logic. Tightly coupled memory is implemented with on-chip memory and a dedicated connection.

Tightly coupled memory has a fixed span in the address map. Cache does not live in the address map.

Tightly coupled memory has deterministic access time. Accesses through the cache are not deterministic since the data will either live in the cache (hit) or the data must be fetched from main memory (miss).

Reference