For SoC Architects and hardware system designers, performance verification is a key step to ensure that the interconnect, as configured, meets the desired performance in terms of latency and bandwidth. However, measuring performance in the CoreLink Coherent Mesh Network (CMN) interconnect is complex due to the large number of nodes and potential measurement points. Additionally, measuring performance from arbitrary locations in the interconnect can lead to subjective or inconsistent results across teams or companies. AMBA Viz and included scripting capabilities define a standard approach to measuring CMN performance, helping you avoid inconsistent or subjective metrics. Furthermore, AMBA Viz offers visibility into internal CMN nodes such as HNF, enabling analysis across full transaction paths.
AMBA Viz (1.1.86 and beyond) includes a performance script for CMN interconnects, enabling users to perform sweeping latency and bandwidth queries across CMN nodes and crosspoints. You can now use AMBA Viz to verify CMN performance more easily and consistently. This solution delivers reliable and consistent performance insights without requiring users to be experts in AMBA Viz's application programming interface.
Node bandwidth (including aggregate bandwidth)
MXP port bandwidth
Request latency for reads and writes
RetryAck response analysis
Opcode coverage for Nodes and MXPs
The script is in the AMBA Viz bundle at the below path:
<ambaviz_install_dir>/layers/cmn-perf-metrics/CmnPerformanceMetrics.groovy
There is README.txt in this directory to provide additional information, including how to run the script and input parameters.
AMBA Viz provides a command-line utility called triton-gvy, used to run Groovy scripts against a simulation waveform. This utility supports input parameters supplied via -A[arg]=[value]. Below is an example triton-gvy command for running the CMN performance script.
$ triton-gvy -f waves.fsdb -g CmnPerformanceMetrics.groovy -d cmns3 -c cmns3_ambaviz_cfg.yml -o metrics.txt -AbwMode=rw
-AbwMode=rw parameter sets the mode for bandwidth queries by filtering via Read/Write/Snoop messages and outputs the Read/Write/Snoop bandwidth.
The other flags are a standard part of triton-gvy usage. For a detailed explanation of triton-gvy input requirements, use the --help option.
Figure 1: Example of the script's output with bandwidth metrics.
Figure 2: Example of the script's output with latency metrics.
By default, the script optimizes for the shortest time window to use for the bandwidth queries. This is done by identifying the first and last data flits in which all Requesting Nodes are active.
Users can adjust the time window under measurement by using optional script arguments.
Time windows – ignoring initialization phases If the simulation includes initialization and cache warmup phases that should be excluded from analysis, you can instruct the tool to skip it by specifying a list of sequential request addresses. The tool will then start computing the minimum time window from the first occurrence of any of these addresses rather than the start of the waveform. Example: -AaddrStart=0xffff000200,0xffff000400
Time windows – setting your own manual time window for all queries If the default computed window does not align with the period you want to analyze, you can manually define the start and end of the measurement window. You can use either timestamps (in CMN GCLK0 domain) or cycle numbers. Examples: -AstartTs=1800000 -AendTs=958000000 -AstartCycle=500 -AendCycle=550000
Time windows – setting manual cycle delay to computed time window To further fine-tune the automatically computed window, you can delay the start or end measurements by a specific number of cycles. Use delayStartCycles to push the start later (adding some GCLK0 cycles to the start and increase start measurement time) and -ApredelayEndCycles to pull the end earlier (remove some cycles from the end and decrease measurement time) Example: -AdelayStartCycles=500 -ApredelayEndCycles=200
Setting the bandwidth mode Sets the mode for bandwidth queries by filtering via Read/Write/Snoop messages, and it outputs the Read/Write/Snoop bandwidth. Example: -AbwMode=rw
If you are using an `internal_mxp` CMN detector, such as `cmns3_internal_mxp`, the script will generate detailed bandwidth metrics for all MXP ports—North, South, East, and West.
To save this data in a more structured format, you can specify a directory using the optional `csvDir` argument. When provided, the script will output individual CSV files for each MXP, containing their respective bandwidth statistics. Note that the target directory must already exist prior to running the script.
Example: -AcsvDir=/home/scratch/mxp_metrics
AMBA Viz is part of the Arm Hardware Success Kit, so if you have the Hardware Success Kit, you already have access to AMBA Viz. If you do not have the Hardware Success Kit and you would like to try AMBA Viz, send an email to license.support@arm.com to request an evaluation.