TCM (Tightly coupled memory???) lib and app demo
Find a file
max 56413dfef8
update README.md.
Signed-off-by: max <guoqun.ma@spacemit.com>
2024-12-16 03:01:08 +00:00
tcm initial commit 2024-12-16 10:04:11 +08:00
tests initial commit 2024-12-16 10:04:11 +08:00
udma initial commit 2024-12-16 10:04:11 +08:00
.gitignore initial commit 2024-12-16 10:04:11 +08:00
aimm.c initial commit 2024-12-16 10:04:11 +08:00
aimm.h initial commit 2024-12-16 10:04:11 +08:00
list.h initial commit 2024-12-16 10:04:11 +08:00
main.c initial commit 2024-12-16 10:04:11 +08:00
Makefile initial commit 2024-12-16 10:04:11 +08:00
README.md update README.md. 2024-12-16 03:01:08 +00:00
time_us.c initial commit 2024-12-16 10:04:11 +08:00

下载

在开发板上编译

git clone https://gitee.com/bianbu-linux/tcm.git -b bl-v2.0.y
cd tcm
make
./app.elf

说明

  • tcm 是一块高速sramK1/M1上共512K。可以给AI CPU高速缓存数据而不用每次去dram取数据。

  • udma 实现用户层控制dma做tcm和dram之间数据搬运。也可以直接用CPU搬运而不用dma。

  • 如果有AI推理onnxruntime也会用到tcm。其他应用直接访问tcm会产生资源竞争导致推理速度下降。

使用方法参考main.c文件实现了数据在tcm和dram之间互相拷贝。访问tcm前先确保自身进程绑定在AI CPU上也就是CPU 0-3.