9.3 CPI files

CPI files define classes of instructions and assign CPI values to them. They increase the accuracy of the estimated number of cycles that are required to run a binary on a SystemC model.

Note:

  • An alternative to using CPI files is to use cpi_mul and cpi_div processor model parameters. These are integer values that represent a CPI multiplication or division factor. They are used together to represent non-integer CPI values. For example, to achieve a CPI of 1.25, use cpi_mul = 5, cpi_div =4.
  • If a CPI file is present, it overrides the cpi_mul and cpi_div parameters.
  • If you do not set these parameters and do not specify a CPI file, a CPI value of 1.0 is used for all instructions.

A CPI file can support multiple instruction sets, including A64, A32, and T32. Also, it can support multiple processor types, including pre-defined and user-defined types.

Arm provides pre-defined CPI instruction classes which you can include in your CPI files, or you can define your own classes. The following files are located in $PVLIB_HOME/etc/CPIPredefines/:

You can find typical CPI values and instruction groups in the Arm® Software Optimization Guides, which are available at http://infocenter.arm.com/.

Specify a CPI file when launching a SystemC platform model by using the --cpi-file command-line parameter, for example:

./EVS_Base_Cortex-A73x1 -a $PVLIB_HOME/images/brot.axf \
-C cache_state_modelled=1 \
-C bp.secure_memory=false \
--cpi-file /CPI_file.txt --stat

Note:

The --stat parameter displays timing statistics on simulation exit.

Alternatively, you can specify the CPI file in your code by calling the SystemC Export API function scx::scx_set_cpi_file(). You must call scx::scx_set_cpi_file() before any call to a platform parameter function.

The CPIValidator command-line executable is provided to help you create valid CPI files. It is located in the $MAXCORE_HOME/bin/ folder. Use the --help command-line switch to list the available options. For example, the following command parses and builds the evaluation tree for CPI_file.txt, and prints it in plain text to a file called CPIEvaluationTree.txt:

$MAXCORE_HOME/bin/CPIValidator --input-file ./CPI_file.txt --output-file ./CPIEvaluationTree.txt
Non-ConfidentialPDF file icon PDF version100965_1180_00_en
Copyright © 2014–2019 Arm Limited or its affiliates. All rights reserved.