alexander | 3c79893 | 2021-03-26 21:42:19 +0000 | [diff] [blame^] | 1 | ; 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 | ;--------------------------------------------------------- |
| 23 | LOAD_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 | ;----------------------------------------------------- |
| 39 | ; BRAM or FPGA data SRAM region worth 2MiB |
| 40 | ;----------------------------------------------------- |
| 41 | bram.bin 0x11000000 UNINIT ALIGN 16 0x00200000 |
| 42 | { |
| 43 | ; activation buffers a.k.a tensor arena |
| 44 | *.o (.bss.NoInit.activation_buf) |
| 45 | } |
| 46 | |
| 47 | ;----------------------------------------------------- |
| 48 | ; 128kiB of 512kiB bank is used for any other RW or ZI |
| 49 | ; data. Note: this region is internal to the Cortex-M |
| 50 | ; CPU |
| 51 | ;----------------------------------------------------- |
| 52 | dtcm.bin 0x20000000 0x00020000 |
| 53 | { |
| 54 | .ANY(+RW +ZI) |
| 55 | } |
| 56 | |
| 57 | ;----------------------------------------------------- |
| 58 | ; 128kiB of stack space within the DTCM region |
| 59 | ;----------------------------------------------------- |
| 60 | ARM_LIB_STACK 0x20020000 EMPTY ALIGN 8 0x00020000 |
| 61 | {} |
| 62 | |
| 63 | ;----------------------------------------------------- |
| 64 | ; 256kiB of heap space within the DTCM region |
| 65 | ;----------------------------------------------------- |
| 66 | ARM_LIB_HEAP 0x20040000 EMPTY ALIGN 8 0x00040000 |
| 67 | {} |
| 68 | } |
| 69 | |
| 70 | ;--------------------------------------------------------- |
| 71 | ; Second load region (DDR) |
| 72 | ;--------------------------------------------------------- |
| 73 | LOAD_REGION_1 0x70000000 0x02000000 |
| 74 | { |
| 75 | ;----------------------------------------------------- |
| 76 | ; 32 MiB of DRAM space for nn model and input vectors |
| 77 | ;----------------------------------------------------- |
| 78 | dram.bin 0x70000000 ALIGN 16 0x02000000 |
| 79 | { |
| 80 | ; nn model's baked in input matrices |
| 81 | *.o (ifm) |
| 82 | |
| 83 | ; nn model |
| 84 | *.o (nn_model) |
| 85 | |
| 86 | ; if the activation buffer (tensor arena) doesn't |
| 87 | ; fit in the SRAM region, we accommodate it here |
| 88 | *.o (activation_buf) |
| 89 | } |
| 90 | |
| 91 | ;----------------------------------------------------- |
| 92 | ; SSE-300's internal SRAM of 2MiB - reserved for |
| 93 | ; activation buffers. |
| 94 | ; This region should have 3 cycle read latency from |
| 95 | ; both Cortex-M55 and Ethos-U55 |
| 96 | ;----------------------------------------------------- |
| 97 | isram.bin 0x31000000 0x00080000 |
| 98 | { |
| 99 | ; RO data (incl. unwinding tables for debugging) |
| 100 | .ANY (+RO-DATA) |
| 101 | } |
| 102 | } |