2.3 Configuration file syntax for specifying model parameters

Text files can configure models for Model Shell from the command line, thus setting many parameters at once.

Syntax

model_shell --config-file my_configuration_file.txt …

Each line of the configuration file must have the same instance.parameter=value syntax as used for command-line assignments.

Include comment lines and blank lines in configuration files with a # character before the comment or blank text.

To generate a configuration file, use the --list-instances and --list-params options on the command line. The command line can also include parameter assignments.

Example

model_shell --list-params --list-instances -C top-mm=0x3 -o file.config -m model.so

might generate:

# Instances:
# Instance id: instance name (SW: y/n, component, type, version) : description
# instance.parameter=value    #(type, mode)         default = 'value' : description              : [min..max]
#---------------------------------------------------------------------------------
# Instance 0:                (SW: no , NoCore, , 1.0) : Regression test system without PVLIB usage.
   top-p=0x2                  # (int   , init-time) default = '0x2'   : test display name
   top-str="empty"            # (string, init-time) default = 'empty' : test string param
   top-mm=0x3                 # (int   , init-time) default = '0x6'   : test min(2) max(6) param : [0x2..0x6]
# Instance 1: a1             (SW: no , A, , 1.0) :
   a1.p1=0x2                  # (int   , init-time) default = '0x2'   : A parameter p1
   a1.p2=0                    # (bool  , run-time ) default = '0'     : A parameter p2
# Instance 2: a1.b           (SW: no , B, , 1.0) :
   a1.b.p1=0x2                # (int   , init-time) default = '0x2'   : B parameter p1
   a1.b.p2=""                 # (string, run-time ) default = ''      : B parameter p2
# Instance 3: a2             (SW: no , A, , 1.0) :
   a2.p1=0x2                  # (int   , init-time) default = '0x2'   : A parameter p1 
   a2.p2=0                    # (bool  , run-time ) default = '0'     : A parameter p2
# Instance 4: a2.b           (SW: no , B, , 1.0) : 
   a2.b.p1=0x2                # (int   , init-time) default = '0x2'   : B parameter p1
   a2.b.p2="test"             # (string, run-time ) default = ''      : B parameter p2 
#---------------------------------------------------------------------------------

This is another way of specifying run-time parameters:

# Disable semihosting using true/false syntax
coretile.core.semihosting-enable=false
#
# Enable VFP at reset using 1/0 syntax
coretile.core.vfp-enable_at_reset=1
#
# Set the baud rate for UART 0
baseboard.uart_0.baud_rate=0x4800
Non-ConfidentialPDF file icon PDF version100969_1103_00_en
Copyright © 2014–2018 Arm Limited (or its affiliates). All rights reserved.