blob: c822dc054fa5bf879c3313a5b082ce9aa39d316f [file] [log] [blame]
alexander3c798932021-03-26 21:42:19 +00001#----------------------------------------------------------------------------
2# Copyright (c) 2021 Arm Limited. All rights reserved.
3# SPDX-License-Identifier: Apache-2.0
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#----------------------------------------------------------------------------
17
18#----------------------------------------------------------------------------
19# CMake description file for the Ethos-U55 Timing Adapter settings (single
20# NPU core with two AXIs).
21#----------------------------------------------------------------------------
22
Cisco Cervelleraf085fa52021-08-02 09:32:07 +010023set(TA0_BASE "${SEC_ETHOS_U_NPU_TA0_BASE}" CACHE STRING "Timing adapter 0: base-address")
24set(TA1_BASE "${SEC_ETHOS_U_NPU_TA1_BASE}" CACHE STRING "Timing adapter 1: base-address")
alexander3c798932021-03-26 21:42:19 +000025
26message(STATUS "using TA0_BASE @ ${TA0_BASE}; TA1_BASE @ ${TA1_BASE}.")
27
28# Timing adapter settings for AXI0
29set(TA0_MAXR "8" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
30set(TA0_MAXW "8" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
31set(TA0_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
32set(TA0_RLATENCY "32" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
33set(TA0_WLATENCY "32" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
34set(TA0_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
35set(TA0_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
36set(TA0_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
37set(TA0_PERFCTRL "0" CACHE STRING "6-bit field selecting an event for event counter 0=default")
38set(TA0_PERFCNT "0" CACHE STRING "32-bit event counter")
39set(TA0_MODE "1" CACHE STRING "Bit 0: 1=enable dynamic clocking to avoid underrun;
40 Bit 1: 1=enable random AR reordering (0=default);
41 Bit 2: 1=enable random R reordering (0=default);
42 Bit 3: 1=enable random B reordering (0=default);
43 Bit 11-4: Frequency scale 0=full speed, 255=(1/256) speed")
44set(TA0_HISTBIN "0" CACHE STRING "Controls which histogram bin (0-15) that should be accessed by HISTCNT.")
45set(TA0_HISTCNT "0" CACHE STRING "32-bit field. Read/write the selected histogram bin.")
46
47# Timing adapter settings for AXI1
Isabella Gottardi118f73e2021-09-16 17:54:35 +010048# If Memory mode is Sram_Only Timing adapter settings for AXI1 need to match the same as AXI0
49if (ETHOS_U_NPU_MEMORY_MODE STREQUAL Sram_Only)
50 set(TA1_MAXR ${TA0_MAXR} CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
51 set(TA1_MAXW ${TA0_MAXW} CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
52 set(TA1_MAXRW ${TA0_MAXRW} CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
53 set(TA1_RLATENCY ${TA0_RLATENCY} CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
54 set(TA1_WLATENCY ${TA0_WLATENCY} CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
55 set(TA1_PULSE_ON ${TA0_PULSE_ON} CACHE STRING "No. of cycles addresses let through (0-65535).")
56 set(TA1_PULSE_OFF ${TA0_PULSE_OFF} CACHE STRING "No. of cycles addresses blocked (0-65535).")
57 set(TA1_BWCAP ${TA0_BWCAP} CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
58 set(TA1_PERFCTRL ${TA0_PERFCTRL} CACHE STRING "6-bit field selecting an event for event counter 0=default")
59 set(TA1_PERFCNT ${TA0_PERFCNT} CACHE STRING "32-bit event counter")
60 set(TA1_MODE ${TA0_MODE} CACHE STRING "Bit 0: 1=enable dynamic clocking to avoid underrun;
61 Bit 1: 1=enable random AR reordering (0=default);
62 Bit 2: 1=enable random R reordering (0=default);
63 Bit 3: 1=enable random B reordering (0=default);
64 Bit 11-4: Frequency scale 0=full speed, 255=(1/256) speed")
65 set(TA1_HISTBIN ${TA0_HISTBIN} CACHE STRING "Controls which histogram bin (0-15) that should be accessed by HISTCNT.")
66 set(TA1_HISTCNT ${TA0_HISTCNT} CACHE STRING "32-bit field. Read/write the selected histogram bin.")
67else ()
68 set(TA1_MAXR "2" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
69 set(TA1_MAXW "0" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
70 set(TA1_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
71 set(TA1_RLATENCY "64" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
72 set(TA1_WLATENCY "0" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
73 set(TA1_PULSE_ON "320" CACHE STRING "No. of cycles addresses let through (0-65535).")
74 set(TA1_PULSE_OFF "80" CACHE STRING "No. of cycles addresses blocked (0-65535).")
75 set(TA1_BWCAP "50" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
76 set(TA1_PERFCTRL "0" CACHE STRING "6-bit field selecting an event for event counter 0=default")
77 set(TA1_PERFCNT "0" CACHE STRING "32-bit event counter")
78 set(TA1_MODE "1" CACHE STRING "Bit 0: 1=enable dynamic clocking to avoid underrun;
79 Bit 1: 1=enable random AR reordering (0=default);
80 Bit 2: 1=enable random R reordering (0=default);
81 Bit 3: 1=enable random B reordering (0=default);
82 Bit 11-4: Frequency scale 0=full speed, 255=(1/256) speed")
83 set(TA1_HISTBIN "0" CACHE STRING "Controls which histogram bin (0-15) that should be accessed by HISTCNT.")
84 set(TA1_HISTCNT "0" CACHE STRING "32-bit field. Read/write the selected histogram bin.")
85endif ()