2.6.2 Overriding component parameter attributes

In Fast Models, you can override the default value for a parameter and, for integer parameters, the min and max values.

Parameters of subcomponents that are set in the composition section of their parent component cannot be set or configured in the debugger or run-time environment. They are hard coded in the system. All other parameters can be configured in the debugger or when starting the run-time environment.

You can override parameters of subcomponents in Fast Models in the component instantiation statement in the form of assignments, in the syntax:

parameter_name.attribute_name=attribute_value

Include the override assignments in the normal parameter assignments in an instantiation statement.

Parameter overriding
component Core
{
    resources
    {
        PARAMETER { default(0x8a0000) } itcm_size;
        PARAMETER { default(0xda0000), min(0x450000), max(0xff0000) } dtcm_size;
    }
}

component Board
{
    composition
    {
        core : Core(itcm_size=0x440000, dtcm_size.default=0xaa0000, dtcm_size.min=0x600000);
    }
}
The code overrides the default value of dtcm_size and its min boundary. This means that the parameter is published and you can set it, but:
  • You cannot specify a value less than 0x60000.
  • The parameter is initialized with 0xaa0000 if you does not specify anything.

For min and max attributes of integer parameters, the global rule also applies to the overridden variants. If the value specified during system instantiation is not within the [min, max] range, it is truncated to fit.

If a component overrides the min or max attribute of a parameter in a subcomponent, the new value can only restrict the [min, max] range:

If an integer parameter forwards another, whose [min, max] range is not identical, then the resulting range is the intersection of the restrictions:

Range restriction warning
The LISA+ parser warns that the range of parameter b_dtcm_size is being restricted to [0x450000, 0xef0000].
component Core
{
    resources
    {
        PARAMETER { default(0x8a0000) } itcm_size;
        PARAMETER { default(0xda0000), min(0x450000), max(0xff0000) } dtcm_size;
    }
}

component Board
{
  resources
  {
      PARAMETER { default(0xda0000), min(0x350000), max(0xef0000) } b_dtcm_size;
  }

  composition
  {
      // b_dtcm_size is the forwarder
      core : Core(dtcm_size=b_dtcm_size);
  }
}

As is the case with parameter fixing and forwarding, an override assignment must use the name attribute of the parameter on the left-hand side, if specified. If the name is not a valid C identifier, enclose it in double quotes.

core : Core("semihosting-enable".default=true);
Non-ConfidentialPDF file icon PDF version101092_0100_03_en
Copyright © 2014–2018 Arm Limited or its affiliates. All rights reserved.