测试指南
带宽 |
说明 |
---|---|
800 MB/s |
CLK 200 MHz, DDR, parallel 模式下 XSPI 总线带宽理论值 |
320 MB/s |
CLK 200 MHz, DDR, parallel 模式下 XSPI 的协议损耗数据带宽理论值 |
290 MB/s |
CLK 200 MHz, DDR, parallel 模式下 XSPI 有效传输数据实测带宽值,其中有协议损耗 |
注:
290 MB/s,CLK 200 MHz, DDR, parallel 模式下 XSPI 有效传输数据实测带宽值,其中有协议损耗。 此测试为 CPU 带宽测试,转换效率取决于 CPU cache line 长度,传输 burst 越长 XSPI 转换效率越高。
打开 BootLoader 测试开关
遵照下列流程,打开 BootLoader 测试开关:
- 在 SDK 根目录下执行
sourceonestep.sh
命令。 - 使用
lunch
命令,启用对应的 BootLoader 配置文件。 - 执行
scons --menuconfig
,进入 menuconfig 的功能配置界面,按如下选择:Bootloader options ---> Bootloader commands ---> [*] psram memory test
使能
psram memory test
选项后,BootLoader 的 cmd 中会支持 test_psram 命令。
memory 测试
RTOS 默认配置使能 memory 测试,以下是测试相关测试示例说明:
- 从 psram 中 malloc 0x100000
空间大小作为测试:
mem_test 0x100000
- 指定 0x40780000 起始地址, 0x10000
空间大小作为测试:
mem_test 0x40780000 0x10000
带宽测试
- 执行
scons --menuconfig
。进入 menuconfig 的功能配置界面。 - 使能
test_stream:
-> Local packages options -> Third-party packages options -> BenchMark Tests [*] STREAM : a benchmark that measures the sustained memory bandwidth. ---> (262144) Stream test array size.
-
关闭部分 APP,释放 psram 空间:
Board options ---> [ ] Using Display Engine (DE) [ ] Using Graphics Engine (GE) [ ] Using Video Engine (VE) Application options ---> [ ] ArtInChip lvgl demo ---- Local packages options ---> Third-party packages options ---> [ ] LVGL (official): powerful and easy-to-use embedded GUI library ---- ArtInChip packages options ---> [ ] aic-mpp ----
- 在 RTOS 的 console 中输入下列命令查看 psram
空间情况:
free
输出结果示例如下:
memheap pool size max used size available size ---------------- ---------- ------------- -------------- heap_cma 8388608 48 8388560 heap_sys 751264 19628 733852
-
在 RTOS 的 console 中输入下列命令执行测试。
test_stream