blob: 0c6a388b3564b8197777770a9e3baed7172435da [file] [log] [blame]
alexander3c798932021-03-26 21:42:19 +00001; Copyright (c) 2021 Arm Limited. All rights reserved.
2; SPDX-License-Identifier: Apache-2.0
3;
4; Licensed under the Apache License, Version 2.0 (the "License");
5; you may not use this file except in compliance with the License.
6; You may obtain a copy of the License at
7;
8; http://www.apache.org/licenses/LICENSE-2.0
9;
10; Unless required by applicable law or agreed to in writing, software
11; distributed under the License is distributed on an "AS IS" BASIS,
12; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13; See the License for the specific language governing permissions and
14; limitations under the License.
15
16; *************************************************************
17; *** Scatter-Loading Description File ***
18; *************************************************************
19;
20;---------------------------------------------------------
21; First load region (ITCM)
22;---------------------------------------------------------
23LOAD_REGION_0 0x00000000 0x00080000
24{
25 ;-----------------------------------------------------
26 ; First part of code mem - 512kiB
27 ;-----------------------------------------------------
28 itcm.bin 0x00000000 0x00080000
29 {
30 *.o (RESET, +First)
31 * (InRoot$$Sections)
32
33 ; Essentially only RO-CODE, RO-DATA is in a
34 ; different region.
35 .ANY (+RO)
36 }
37
38 ;-----------------------------------------------------
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010039 ; 128kiB of 512kiB DTCM is used for any other RW or ZI
alexander3c798932021-03-26 21:42:19 +000040 ; data. Note: this region is internal to the Cortex-M
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010041 ; CPU.
alexander3c798932021-03-26 21:42:19 +000042 ;-----------------------------------------------------
43 dtcm.bin 0x20000000 0x00020000
44 {
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010045 ; Any R/W and/or zero initialised data
alexander3c798932021-03-26 21:42:19 +000046 .ANY(+RW +ZI)
47 }
48
49 ;-----------------------------------------------------
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010050 ; 384kiB of stack space within the DTCM region. See
51 ; `dtcm.bin` for the first section. Note: by virtue of
52 ; being part of DTCM, this region is only accessible
53 ; from Cortex-M55.
alexander3c798932021-03-26 21:42:19 +000054 ;-----------------------------------------------------
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010055 ARM_LIB_STACK 0x20020000 EMPTY ALIGN 8 0x00060000
alexander3c798932021-03-26 21:42:19 +000056 {}
57
58 ;-----------------------------------------------------
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010059 ; SSE-300's internal SRAM of 4MiB - reserved for
60 ; activation buffers.
61 ; This region should have 3 cycle read latency from
Isabella Gottardif5907732021-08-06 15:39:41 +010062 ; both Cortex-M55 and Ethos-U NPU
alexander3c798932021-03-26 21:42:19 +000063 ;-----------------------------------------------------
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010064 isram.bin 0x31000000 UNINIT ALIGN 16 0x00400000
65 {
66 ; activation buffers a.k.a tensor arena
67 *.o (.bss.NoInit.activation_buf)
68 }
alexander3c798932021-03-26 21:42:19 +000069}
70
71;---------------------------------------------------------
72; Second load region (DDR)
73;---------------------------------------------------------
74LOAD_REGION_1 0x70000000 0x02000000
75{
76 ;-----------------------------------------------------
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010077 ; 32 MiB of DDR space for neural network model,
78 ; input vectors and labels. If the activation buffer
79 ; size required by the network is bigger than the
80 ; SRAM size available, it is accommodated here.
alexander3c798932021-03-26 21:42:19 +000081 ;-----------------------------------------------------
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010082 ddr.bin 0x70000000 ALIGN 16 0x02000000
alexander3c798932021-03-26 21:42:19 +000083 {
84 ; nn model's baked in input matrices
85 *.o (ifm)
86
87 ; nn model
88 *.o (nn_model)
89
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010090 ; labels
91 *.o (labels)
92
alexander3c798932021-03-26 21:42:19 +000093 ; if the activation buffer (tensor arena) doesn't
94 ; fit in the SRAM region, we accommodate it here
95 *.o (activation_buf)
96 }
97
98 ;-----------------------------------------------------
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +010099 ; First 256kiB of BRAM (FPGA SRAM) used for RO data.
100 ; Note: Total BRAM size available is 2MiB.
alexander3c798932021-03-26 21:42:19 +0000101 ;-----------------------------------------------------
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +0100102 bram.bin 0x11000000 ALIGN 8 0x00040000
alexander3c798932021-03-26 21:42:19 +0000103 {
104 ; RO data (incl. unwinding tables for debugging)
105 .ANY (+RO-DATA)
106 }
Kshitij Sisodiaf9c19ea2021-05-07 16:08:14 +0100107
108 ;-----------------------------------------------------
109 ; 960 KiB of remaining part of the 2MiB BRAM used as
110 ; heap space. 0x000F0000 of 0x0x001C0000 available.
111 ;-----------------------------------------------------
112 ARM_LIB_HEAP 0x11040000 EMPTY ALIGN 8 0x000F0000
113 {}
alexander3c798932021-03-26 21:42:19 +0000114}