2.4.1. Overriding component parameter attributes

Parameters of subcomponents that are set in the composition section of their parent component can not 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.

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

Overriding is done in the component instantiation statement in the form of assignments and must use the following syntax:

parameter_name.attribute_name=attribute_value

If done, the override assignments must be included in the normal parameter assignments in an instantiation statement as shown in Example 2.15

Example 2.15. Parameter overriding

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

component Board
{
    composition
    {
        cpu : CPU(itcm_size=0x440000, dtcm_size.default=0xaa0000, dtcm_size.min=0x600000);
    }
}

The code in Example 2.15 overrides the default value of dtcm_size and its min boundary. This means that the parameter is published and the user can set it, but:

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:

For Example 2.16, the LISA+ parser warns that the range of parameter b_dtcm_size is being restricted to [0x450000, 0xef0000].

Example 2.16. Range restriction warning

component CPU
{
    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
      cpu : CPU(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, it must be enclosed in double quotes. For example:

cpu : CPU("semihosting-enable".default=true);
Copyright © 2007-2009 ARM Limited. All rights reserved.ARM DUI 0372H
Non-Confidential