Target Language Compiler    

Model Parameters Record

The model parameters record provides a complete description of the block parameters found within the model. The CompiledModel.System[i].Block[i].Parameter[i].ASTNode index into the CompiledModel.ModelParameters.Parameter[i] record.

Table A-17: Model.rtw Model Parameters Record 
Variable/Record Name
Description
ModelParameters {

  NumParameters

Total number of unique parameter values (sum of next 5 fields).

  NumInrtP

Number of parameter values in "rtP" parameter vector (realized as a struct). These are visible to external mode and possibly shared by multiple blocks.

  NumInlinedUnlessRolled

Number of inlined parameter values. These are inlined, unless the roll threshold causes them to be placed in global memory. These parameters are not shared by multiple blocks.

  NumExportedGlobal

Number of exported global parameters values. May be shared by multiple blocks.

  NumImportedExtern

Number of imported parameter values. May be shared by multiple blocks.

  NumImportedExternPointer

Number of parameter values that are accessed via imported extern pointers. May be shared by multiple blocks.

  ParameterDefaults {

Default values for the following Parameter records.

    DataTypeIdx

0: Default is real_T data type.

    ComplexSignal

no: Default is non-complex

    Tunable

no: Default value is not tunable.

    StorageClass

Auto: Default value is Auto (Real-Time Workshop declares the memory).

    TypeQualifier

"": Default is no type qualifier.

    IsSfcnSizePrm

0: Default is not an S-function sizes parameter (only used by non-inlined S-functions)

  }

  Parameter {

    Identifier

Identifier used in the generated code.

    Tunable

If inlined parameters check box is off, then all parameter values are tunable (they will reside in the rtP vector). If inlined is on, then tunable means that this parameter has been selectively non- inlined. It will be placed in memory according to the Storage class. Note that the default value is 'no' (in which case this field is not written).

    RequiredInP

Parameter required in rtP vector, 1 for the Accelerator, Rapid Simulation Target, External Mode; 0 otherwise.

    StorageClass

Specifies where to declare/place this parameter value in memory

(Auto, ExportedGlobal, ImportedExtern, ImportedExternPointer). Default value is Auto in which case this field is not written to the model.rtw file.

    TypeQualifier

String used as a type qualifier for the declaration of the parameter (e.g., "static").

    Value

Evaluated value of this parameter.

    Dimensions

Actual dimensions of this parameter value. Note, it is possible for blocks to have matrix values written as a column-major vector. This field contains the dimensions of the data prior to the flattening of the vector to column-major.

    DatatTypeIdx

Data type index into the data type table (CompiledModel.DataTypes.DataType).

    ComplexSignal

yes or no, is this a complex signal?

    IsSfcnSizePrm

1 if this is an S-function sizes parameter, 0 otherwise.

    ReferencedBy

An N-by-3 matrix. Each row specifies a system, block, parameter index triplet that identifies a usage of this parameter value. If N>1, then this parameter value is shared by multiple blocks.

  }

}


 Data and Control Port Defaults System Record