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