diff options
author | Nir Ekhauz <nir.ekhauz@arm.com> | 2021-06-06 14:57:50 +0300 |
---|---|---|
committer | Nir Ekhauz <nir.ekhauz@arm.com> | 2021-09-30 18:00:25 +0300 |
commit | 3c505caf6632619df297d4448fc68e987849f6c6 (patch) | |
tree | 246507401eef481eab8786abe614bf5c0f78ab83 /targets/corstone-300/CMakeLists.txt | |
parent | 08191ead1ba93e63b07ea3b12680889ddff1c2ea (diff) | |
download | ethos-u-core-platform-3c505caf6632619df297d4448fc68e987849f6c6.tar.gz |
Add memory area to run_platform.py
Control the placement of the model and the arena for baremetal application
in SRAM/DRAM by 4 configurable options:
a. Model in SRAM and Arena in SRAM
b. Model in SRAM and Arena in DRAM
c. Model in DRAM and Arena in DRAM w/o Scratch buffer
d. Model in DRAM and Arena in DRAM with Scratch buffer in SRAM
Change-Id: Ia154be8a1c88cb13aeee62e701c2db7719a9d71c
Diffstat (limited to 'targets/corstone-300/CMakeLists.txt')
-rw-r--r-- | targets/corstone-300/CMakeLists.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/targets/corstone-300/CMakeLists.txt b/targets/corstone-300/CMakeLists.txt index e5276fe..bd73481 100644 --- a/targets/corstone-300/CMakeLists.txt +++ b/targets/corstone-300/CMakeLists.txt @@ -69,10 +69,33 @@ target_compile_definitions(ethosu_target_common INTERFACE ETHOSU_PMU_EVENT_2=${ETHOSU_PMU_EVENT_2} ETHOSU_PMU_EVENT_3=${ETHOSU_PMU_EVENT_3}) +set(MEMORY_MODEL "dram" CACHE STRING "Memory config for model") +set(MEMORY_ARENA "dram" CACHE STRING "Memory config for arena") + target_compile_definitions(ethosu_target_common INTERFACE ETHOSU_NPU_TA_COUNT=${ETHOSU_TARGET_NPU_TA_COUNT} ETHOSU_NPU_COUNT=${ETHOSU_TARGET_NPU_COUNT}) +# Model memory configuration +# For ETHOSU_MODEL: 0 - SRAM, 1 - DRAM +if (MEMORY_MODEL STREQUAL "dram") + target_compile_definitions(ethosu_target_common INTERFACE + ETHOSU_MODEL=1) +else() + target_compile_definitions(ethosu_target_common INTERFACE + ETHOSU_MODEL=0) +endif() + +# Arena memory configuration +# For ETHOSU_ARENA: 0 - SRAM, 1 - DRAM +if (MEMORY_ARENA STREQUAL "dram") + target_compile_definitions(ethosu_target_common INTERFACE + ETHOSU_ARENA=1) +else() + target_compile_definitions(ethosu_target_common INTERFACE + ETHOSU_ARENA=0) +endif() + # Linker script set(LINK_FILE platform CACHE STRING "Link file") |