跳转至

3.fmc_sdram_speedtest.md

功能:sdram速度测试

  • CPU ---> SDRAM
  • SDRAM--->CPU
  • SDRAM--->SRAM
  • SRAM-->SDRAM

编译

1
2
3
west build -p always -b art_pi -d build 3.fmc_sdram_speedtest -- \
  -DCONFIG_BOOTLOADER_MCUBOOT=y \
  -DCONFIG_MCUBOOT_SIGNATURE_KEY_FILE="\"$HOME/zephyrproject/bootloader/mcuboot/root-rsa-2048.pem\""

下载

west flash

log

*** Booting Zephyr OS build v4.2.0-3958-gb42209d06c5c ***
=== Board boot ===
Using SDRAM node: memory@c0000000, base=0xc0000000 size=6291456
SDRAM test begin: base=0xc0000000 size=6291456 bytes (test=4194304)
SDRAM test PASS ✅ (4194304 bytes checked)

=== SDRAM bandwidth bench ===
window: base=0xc0000000 size=6291456 bytes (test=4194304)
WRITE 32-bit (CPU->SDRAM): 4194304 bytes in 9552165 cycles (0.020 s) => 201.00 MB/s
READ 32-bit (SDRAM->CPU): 4194304 bytes in 13967637 cycles (0.029 s) => 137.46 MB/s
READ sink=0xfff80000
memcpy SDRAM->SRAM: 4194304 bytes in 19542310 cycles (0.041 s) => 98.25 MB/s
memcpy SRAM->SDRAM: 4194304 bytes in 16428920 cycles (0.034 s) => 116.87 MB/s
=== SDRAM bench done ===