问题描述
ARM 处理器上的 TCM 内存是什么,它是驻留在处理器旁边的专用内存还是只是配置为 TCM 的 RAM 区域??.
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?.
推荐答案
TCM,紧耦合内存是一个(或多个)小型专用内存区域,顾名思义,它非常靠近 CPU.它的主要好处是,CPU 可以在每个周期访问 TCM.与普通内存不同,它不涉及缓存,这使得所有内存访问都是可预测的.
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.
TCM 的主要用途是存储性能关键数据和代码.中断处理程序、实时任务的数据和操作系统控制结构是一个常见的例子.
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.
如果是专用内存,为什么要配置它的位置和大小
使其可配置只会使所有内存访问的地址解码复杂化,而不会在固定地址范围内带来真正的好处.因此,将 TCM 绑定到固定地址可能更容易、更快捷.
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.
顺便说一句,如果您正在使用具有 TCM 的系统并且您还没有使用它,请尝试将您的堆栈放在那里.由于所有堆栈内存访问现在都是单周期并且不再污染数据缓存,因此通常可以免费获得一定百分比的性能提升.
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.
这篇关于什么是ARM TCM内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!