summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorKshitij Sisodia <kshitij.sisodia@arm.com>2021-11-24 10:39:52 +0000
committerKshitij Sisodia <kshitij.sisodia@arm.com>2021-11-25 10:05:25 +0000
commit661959c6d2fabada5d465e9de8f84128e3f7b684 (patch)
tree3321ebb442c7ec1f7af454dd25d6bd1b54663587 /docs
parentb59ba684aef4bef16262a1825e787a55fc992f0d (diff)
downloadml-embedded-evaluation-kit-661959c6d2fabada5d465e9de8f84128e3f7b684.tar.gz
MLECO-2426: Support for new Corstone-300 app note AN552 rev B.
These changes will limit the use of FPGA internal SRAM from a max of 4MiB to 2MiB and the BRAM from 2MiB to 1MiB. Change-Id: I69c8e695aee26ff4f235bfe83ffd26efbd66f547
Diffstat (limited to 'docs')
-rw-r--r--docs/documentation.md8
-rw-r--r--docs/sections/deployment.md80
-rw-r--r--docs/sections/memory_considerations.md30
3 files changed, 64 insertions, 54 deletions
diff --git a/docs/documentation.md b/docs/documentation.md
index 7049630..f1fab8c 100644
--- a/docs/documentation.md
+++ b/docs/documentation.md
@@ -37,13 +37,17 @@ Before starting the setup process, please make sure that you have:
[Arm Compiler download Page](https://developer.arm.com/tools-and-software/embedded/arm-compiler/downloads)
- An Arm® MPS3 FPGA prototyping board and components for FPGA evaluation or a `Fixed Virtual Platform` binary:
- - An MPS3 board loaded with Arm® Corstone™-300 reference package (`AN547`) from:
+ - An MPS3 board loaded with Arm® Corstone™-300 reference package (`AN552`) from:
<https://developer.arm.com/tools-and-software/development-boards/fpga-prototyping-boards/download-fpga-images>. You
must have a USB connection between your machine and the MPS3 board - for UART menu and for deploying the
application.
- `Arm Corstone-300` based FVP for MPS3 is available from:
<https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps>.
+> **NOTE**: There are two Arm® Corstone™-300 implementations available for the MPS3 FPGA board - application
+> notes `AN547` and `AN552`. We are aligned with the latest application note `AN552`. However, the application built
+> for MPS3 target should work on both FPGA packages.
+
### Additional reading
This document contains information that is specific to Arm® Ethos™-U55 and Arm® Ethos™-U65 products. Please refer to the following documents
@@ -336,4 +340,4 @@ Please refer to:
## FAQ
-Please refer to: [FAQ](./sections/faq.md#faq) \ No newline at end of file
+Please refer to: [FAQ](./sections/faq.md#faq)
diff --git a/docs/sections/deployment.md b/docs/sections/deployment.md
index a3cbbd2..034fb19 100644
--- a/docs/sections/deployment.md
+++ b/docs/sections/deployment.md
@@ -22,7 +22,7 @@ Both implement the Arm® *Corstone™-300* design. For further information, plea
The FVP is available publicly from the following page:
[Arm Ecosystem FVP downloads](https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps).
-Please ensure that you download the correct archive from the list under `Arm Corstone-300`. You need the one which:
+Please ensure that you download the correct archive from the list under Arm® *Corstone™-300*. You need the one which:
- Emulates MPS3 board and *not* for MPS2 FPGA board,
- Contains support for Arm® *Ethos™-U55*.
@@ -158,24 +158,31 @@ For more information on getting started with an MPS3 board, please refer to:
### Deployment on MPS3 board
> **Note:**: These instructions are valid only if the evaluation is being done using the MPS3 FPGA platform using
-> `SSE-300`.
+> an Arm® *Corstone™-300* implementation.
To run the application on MPS3 platform, you must first ensure that the platform has been set up using the correct
configuration.
-For details on platform set-up, please see the relevant documentation. For the Arm `Corstone-300`, the PDF is available
-here: [Arm Developer](https://developer.arm.com/-/media/Arm%20Developer%20Community/PDF/DAI0547B_SSE300_PLUS_U55_FPGA_for_mps3.pdf?revision=d088d931-03c7-40e4-9045-31ed8c54a26f&la=en&hash=F0C7837C8ACEBC3A0CF02D871B3A6FF93E09C6B8).
+For details on platform set-up, please see the relevant documentation. For the Arm® Corstone™-300 implementation
+`AN552`, the document is available here: [Arm Developer](https://developer.arm.com/documentation/dai0552/).
-For the MPS3 board, instead of loading the `axf` file directly, copy the executable blobs generated under the
-`sectors/<use_case>` subdirectory to the micro SD card located on the board. Also, the `sectors/images.txt` file is used
-by the MPS3 to understand which memory regions the blobs must be loaded into.
+For the MPS3 FPGA board, instead of loading the `axf` file directly, copy the executable blobs generated under the
+`sectors/<use_case>` subdirectory to the micro SD card located on the board. Also, the `sectors/images.txt` file is
+used by the MPS3 to understand which memory regions the blobs must be loaded into.
Once the USB A to USB B cable between the MPS3 and the development machine is connected, and the MPS3 board powered on,
the board enumerates as a mass storage device over this USB connection.
Depending on the version of the board you are using, there might be two devices listed. The device named `V2M-MPS3`, or
-`V2MMPS3`, which is the `SD card`. Note that if `V2M-MPS3` or `V2MMPS3` device is not listed, you may need to enable USB
-connection from the board. You can do this by opening a serial connection to the first serial port and issuing a `usb_on` command.
+`V2MMPS3` is the `SD card`. Note that if `V2M-MPS3` or `V2MMPS3` device is not listed, you may need to enable USB
+connection from the board. You can do this by opening a serial connection to the first serial port (as specified in
+point 3 in the instructions below) and issuing a `usb_on` command at the prompt:
+
+```commandline
+Cmd> usb_on
+Enabling debug USB...
+USB Serial Number = 5000123456789
+```
If the `axf` or `elf` file is within the ITCM load size limit, it can be copied into the FPGA memory directly without
having to break it down into separate load region-specific blobs. However, if the neural network models exceed this
@@ -196,21 +203,23 @@ size, you must use the following approach:
cp -av ./bin/sectors/img_class/* /media/user/V2M-MPS3/SOFTWARE/
```
- Note that the `itcm.bin` and `ddr.bin` files correspond to the part of the application residing in the first and second load region respectively,
- as defined in the [scatter file](../../source/application/hal/platforms/bare-metal/bsp/mem_layout/mps3-sse-300.sct).
+ Note that the `itcm.bin` and `ddr.bin` files correspond to the part of the application residing in the first and
+ second load region respectively, as defined in the
+ [scatter file](../../source/application/hal/platforms/bare-metal/bsp/mem_layout/mps3-sse-300.sct).
2. The `./bin/sectors/images.txt` file must be copied over to the MPS3. The exact location for the destination depends
on the version of the MPS3 board and the application note for the bit file in use.
- For example, the revision C of the MPS3 board hardware uses an application note directory named `AN547`, to replace the
+ For example, the revision C of the MPS3 board hardware uses an application note directory named `AN552`, to replace the
`images.txt` file, like so:
```commandline
- cp ./bin/sectors/images.txt /media/user/V2M-MPS3/MB/HBI0309C/AN547/images.txt
+ cp ./bin/sectors/images.txt /media/user/V2M-MPS3/MB/HBI0309C/AN552/images.txt
```
3. Open the first serial port available from MPS3. For example, `/dev/ttyUSB0`. This can be typically done using
- minicom, screen, or Putty application. Make sure the flow control setting is switched off:
+ `minicom`, `screen`, or `Putty` applications. Make sure the configuration is set to 115200 8/N/1 and that the
+ flow control setting is switched off:
```commandline
minicom --D /dev/ttyUSB0
@@ -238,10 +247,12 @@ size, you must use the following approach:
```
```log
- Rebooting...Disabling debug USB..Board rebooting...
+ Rebooting...
+ Disabling debug USB..
+ Board rebooting...
- ARM V2M-MPS3 Firmware v1.3.2
- Build Date: Apr 20 2018
+ ARM V2M-MPS3 Firmware v1.5.1
+ Build Date: Jun 2 2021
Powering up system...
Switching on main power...
@@ -252,40 +263,37 @@ size, you must use the following approach:
FPGA memory locations. For example:
```log
- Reading images file \MB\HBI0309C\AN547\images.txt
+ Reading images file \MB\HBI0309C\AN552\images.txt
Writing File \SOFTWARE\itcm.bin to Address 0x00000000
-
- ............
-
+ ......
File \SOFTWARE\itcm.bin written to memory address 0x00000000
Image loaded from \SOFTWARE\itcm.bin
- Writing File \SOFTWARE\ddr.bin to Address 0x08000000
-
- ..........................................................................
-
-
- File \SOFTWARE\ddr.bin written to memory address 0x08000000
+ Writing File \SOFTWARE\ddr.bin to Address 0x0C000000
+ .......................................................................................................................................................................
+ File \SOFTWARE\ddr.bin written to memory address 0x0C000000
Image loaded from \SOFTWARE\ddr.bin
```
-6. When the reboot from previous step is completed, issue a reset command on the command prompt:
+6. If the reboot from previous step completes without starting the application, issue a reset command:
``` commandline
$ Cmd> reset
```
- This triggers the application to start, and the output becomes visible on the second serial connection.
+ This should trigger the application to start, and the output should be visible on the second serial
+ connection. By default, the FPGA configuration should start the application as soon as it is loaded
+ into the memory and the above command should not be required.
-7. On the second serial port, the output is similar to that in section 2.2, is visible, like so:
+7. On the second serial port the output should show the standard output and error streams from the
+ application deployed. For example:
```log
- INFO - Setting up system tick IRQ (for NPU)
INFO - V2M-MPS3 revision C
- INFO - Application Note AN540, Revision B
- INFO - FPGA build 1
- INFO - Core clock has been set to: 32000000 Hz
- INFO - CPU ID: 0x410fd220
- INFO - CPU: Cortex-M55 r0p0
+ INFO - Application Note AN552, Revision B
+ INFO - MPS3 build 2
+ INFO - MPS3 core clock has been set to: 32000000Hz
+ INFO - CPU ID: 0x411fd220
+ INFO - CPU: Cortex-M55 r1p0
...
```
diff --git a/docs/sections/memory_considerations.md b/docs/sections/memory_considerations.md
index 89acb1e..b3cbfa5 100644
--- a/docs/sections/memory_considerations.md
+++ b/docs/sections/memory_considerations.md
@@ -41,27 +41,28 @@ have definitions that describe the memory regions and the peripheral base addres
See the example for Arm® *Corstone™-300* description file [corstone-sse-300.cmake](../../scripts/cmake/subsystem-profiles/corstone-sse-300.cmake). For the discussion on this page, it is useful to note the following definitions:
```
-set(ISRAM0_SIZE "0x00200000" CACHE STRING "ISRAM0 size: 2 MiB")
-set(ISRAM1_SIZE "0x00200000" CACHE STRING "ISRAM1 size: 2 MiB")
+set(ISRAM0_SIZE "0x00100000" CACHE STRING "ISRAM0 size: 1 MiB")
+set(ISRAM1_SIZE "0x00100000" CACHE STRING "ISRAM1 size: 1 MiB")
...
# SRAM size reserved for activation buffers
math(EXPR ACTIVATION_BUF_SRAM_SZ "${ISRAM0_SIZE} + ${ISRAM1_SIZE}" OUTPUT_FORMAT HEXADECIMAL)
```
-This will set `ACTIVATION_BUF_SRAM_SZ` to be **4 MiB** for Arm® *Corstone™-300* target platform.
+This will set `ACTIVATION_BUF_SRAM_SZ` to be **2 MiB** for Arm® *Corstone™-300* target platform.
As mentioned in the comments within the file, this size is directly linked to the size mentioned
in the linker scripts, and therefore, it should not be changed without corresponding changes
-in the linker script too. For example, a snippet from the scatter file for Corstone™-300 shows:
+in the linker script too. For example, a snippet from the scatter file for Arm® *Corstone™-300*
+shows:
```
;-----------------------------------------------------
-; SSE-300's internal SRAM of 4MiB - reserved for
-; activation buffers.
+; FPGA internal SRAM of 2MiB - reserved for activation
+; buffers.
; This region should have 3 cycle read latency from
; both Cortex-M55 and Ethos-U NPU
;-----------------------------------------------------
-isram.bin 0x31000000 UNINIT ALIGN 16 0x00400000
+isram.bin 0x31000000 UNINIT ALIGN 16 0x00200000
{
- ...
+ ...
}
```
If the usable size of the internal SRAM was to be increased/decreased, the change should be
@@ -73,16 +74,13 @@ Other than the obvious link between the linker script and the target profile des
CMake files, there are other parameters linked to what the reserved space for activation
buffers is. These are:
-- The file [default_vela.ini](../../scripts/vela/default_vela.ini) contains a parameter called
- `arena_cache_size` under `Shared_Sram` memory mode. For example:
+- The file [set_up_default_resources.py](../../set_up_default_resources.py) contains a
+ parameter called `mps3_max_sram_sz`:
```
- [Memory_Mode.Shared_Sram]
- const_mem_area=Axi1
- arena_mem_area=Axi0
- cache_mem_area=Axi0
- arena_cache_size=4194304
+ # The internal SRAM size for Corstone-300 implementation on MPS3 specified by AN552
+ mps3_max_sram_sz = 2 * 1024 * 1024 # 2 MiB (2 banks of 1 MiB each)
```
- This size of **4 MiB** here is provided here to allow the default vela optimisation process to
+ This size of **2 MiB** here is provided here to allow the default vela optimisation process to
use this size as a hint for the available SRAM size for use by the CPU and the NPU.
- In every `usecase.cmake` file (present within each use case's source directory), there is