|Non-Confidential||PDF version||ARM 100965_1101_00_en|
|Home > Timing Annotation > About 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.
cpi_divprocessor 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
A CPI file can support multiple instruction sets, including
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
--statparameter 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
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