Target Language Compiler | ![]() ![]() |
Inline Parameters On Code Structure
When inline parameters is on, Real-Time Workshop will generate the following structures:
rtP
-- A semi-hierarchical structure for optimizing the placement of auto
tunable variables in order to localize the tunable parameters within rtP (only systems that need to see a tunable variable are thus able to see it). The auto
tunable variables consist of:
RTWInfo.StorageClass
set to Auto
.
rtCP_
name
-- Individual variables for the #define/const parameters. These are run-time parameters that are inlined unless rolled. These are pooled together. Constant parameters not placed in a constant structure because this would disable parameter pooling and non-finite parameters cannot initialize at compile time.
Masks result in canonical input parameters. For example, consider:
>> a = 7 (tunable) >> k = 8 (tunable) S1: nonvirtual subsystem with a block accessing mask parameter k that has the value 5 in the mask field for k. S2: nonvirtual subsystem within a virtual subsystem and S2 contains a block accessing mask parameter k of the virtual subsystem that has the value 6 in the mask field for k. S3: nonvirtual subsystem with a block accessing mask parameter k that has the tunable variable a in the mask field for k. S4: nonvirtual subsystem that doesn't reside within a mask and is directly accessing tunable variable k.
Sa(sa_input_signals, rtB_Sa *rtB, ..., param_type k) { // for S1, S2, S3 } Sb(sa_input_signals, rtB_Sa *rtB) { // for S4 (directly access rtP.k) }
![]() | Code Data Structure Concepts | model.rtw Changes Between Real-Time Workshop 5.0 and 4.1 | ![]() |