Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what's ARM TCM memory

Tags:

memory

arm

what is TCM memory on ARM processors, is it a dedicated memory which resides next to the processor or just a region of RAM which is configured as TCM??.

if it's a dedicated memory, why can we configure it's location and size?.

like image 493
Makhlouf GHARBI Avatar asked Jun 12 '15 07:06

Makhlouf GHARBI


People also ask

What is DTCM memory?

ITCM is a 64-bit memory interface and DTCM is a two 32-bit memory interfaces (D0TCM and D1TCM). Typically, RAM or RAM like memory (SRAM, FRAM etc.,) are connected to the TCM port. DTCM is typically used to access Critical variables and Frequently updated variables.

Do ARM processors have cache?

Processors that implement the ARMv8-A Architecture are usually implemented with two or more levels of cache. This typically means that the processor has small L1 Instruction and Data caches for each core.

What is TCM in SoC?

Some ARM SoC:s have a so-called TCM (Tightly-Coupled Memory). This is usually just a few (4-64) KiB of RAM inside the ARM processor. 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).


1 Answers

TCM, Tightly-Coupled Memory is one (or multiple) small, dedicated memory region that as the name implies is very close to the CPU. The main benefit of it is, that the CPU can access the TCM every cycle. Contrary to the ordinary memory there is no cache involved which makes all memory accesses predictable.

The main use of TCM is to store performance critical data and code. Interrupt handlers, data for real-time tasks and OS control structures are a common example.

if it's a dedicated memory, why can we configure it's location and size

Making it configurable would just complicate the address decoding for all memory accesses while giving no real benefit over a fixed address range. So it was probably easier and faster to just tie the TCM to a fixed address.

Btw, if you are working on a system that has a TCM and you aren't using it yet, try placing your stack there. That usually gives you some percent of performance gain for free since all stack memory accesses are now single cycle and don't pollute the data-cache anymore.

like image 76
Nils Pipenbrinck Avatar answered Oct 19 '22 08:10

Nils Pipenbrinck