Table A-28:
Model.rtw Subsystem Block Specific Records
ParamSettings {
|
Paramsettings for Subsystem Block
|
SystemIdx
|
Index of the System corresponding to this Subsystem block.
|
StatesWhenEnabling
|
held or reset. Only written if enable port is present,
|
TriggerBlkIdx
|
Block index of TriggerPort block in system or -1 if the trigger block is not present
|
IteratorBlock
|
Block index of Iterator block, not present if there is no iterator.
|
IteratorBlockType
|
for or while: if one of them is present.
|
IteratorScope
|
Only written if the Subsystem has an iterator block. Can be NoTIDScope or NeedTIDScope.
|
TriggerScope
|
Only written if we have a trigger port. It can be one of: NoScope, ScopeOnce, ScopeIndividually.
|
EnableScope
|
Only written if we have an enable port. It can be one of: NoScope, ScopeOnce, ScopeIndividually
|
EnableOutputScope
|
Sample time scoping for enable/atomic system's Output code. It can be yes or no .
|
SystemContStates
|
Specified as [N,I] where N is the number of continuous states and I is the offset in the derivative vector.
|
NumNonsampledZCs
|
Number of NonsampledZCs in the subsystem.
|
StartNonsampledZCs
|
Start index of the NonsampledZCs corresponding to this system in CompiledModel.NonsampledZCs.NonsampledZC
|
SingleRate
|
Is this a SingleRate system. It can be yes or no.
|
MinorStepGuard
|
Does this system needs a minor step guard. It can be yes or no .
|
}
|
|
CallSiteInfo {
|
This has information used in generating a call to this System in its caller or parent system and the typedef's need to execute the function (or inlined version of the function).
|
SystemIdx
|
Index of the corresponding called/inlined system.
|
CallSiteIdx
|
Used to determine the row in the CallSites matrix in the called/inlined system corresponding to this block. For example, let:
sys = CompiledModel.System[CallSiteInfo.SystemIdx]
then
cs = sys.CallSites[CallSiteIdx]
will point back to this block.
|
StructId
|
The identifier for the structure to be passed in (e.g. rtB_name id). The identifiers are unique at a given level. As an example, consider a model that has two references (sysA1,sysA2) to a nonvirtual subsystem named sysA. Within sysA, there are three references
(sysB1,sysB2,sysB3) to sysB. Within sysB, there
are five references (sysC1,sysC2,sysC3,sysC4,sysC5)
to sysC. The total number of system instances:
sysA: 2
sysB: 2*3 = 6
sysC: 2*3*5 = 30
The structure will look like:
struct rtB_sysC_tag {
<flat fields from regular block outputs in sysC>
} rtB_sysC;
struct rtB_sysB_tag {
<flat fields from regular block outputs in sysB>
rtB_sysC sysC1;
rtB_sysC sysC2;
rtB_sysC sysC3;
rtB_sysC sysC4;
rtB_sysC sysC5;
} rtB_sysB;
struct rtB_sysA_tag {
<flat fields from regular block outputs in sysA>
rtB_sysB sysB1;
rtB_sysB sysB2;
rtB_sysB sysB3;
} rtB_sysA;
struct rtB_tag {
<flat fields from regular blocks at root>
rtB_sysA sysA1;
rtB_sysA sysA2;
}rtB;
This same StructID is used by the various Arg infos.
|
NumCanonicalInputArgs
|
Number of explicit inputs to the system.
|
CanonicalInputArg {
|
One record for each explicit input.
|
SignalSrc
|
Vector specifying the input signal to the system. This can be global/local block I/O (Bi or bi ), global/local continuous states (X i or xi ), global/local DWork vectors (Di or di ), root or canonical inputs (Ui or ui ), or ground connection (G ).
|
SignalOffset
|
Vector where each element is an integer value giving the offset within the record specified by SignalSrc.
|
}
|
|
BlockIOArg {
|
Present if the corresponding system has block I/O.
|
OffsetIdx
|
Integer index used with Interface.BlockIOArgDef.FirstLocation to get to the first BlockOutput slot corresponding to this subsystem, i.e.,
interface = System[CallSiteInfo.SystemIdx].Interface
bioIdx = OffsetIdx + interface.BlockIOArgDef.FirstLocation
|
}
|
|
NumCanonicalOutputArgs
|
Number of explicit outputs from a Subsystem
|
CanonicalOutputArg {
|
One record for each explicit output.
|
SignalSrc
|
Vector specifying the canonical output of the subsystem. This can be global/local block I/O (Bi or bi ), root or canonical outputs of the parent system (yi ).
|
SignalOffset
|
Vector where each element is an integer value giving the offset within the record specified by SignalSrc.
|
}
|
|
PrmArg {
|
|
OffsetIdx
|
Integer index used with Interface.ParamArgDef.FirstLocation to get to the first BlockOutput slot corresponding to this subsystem, i.e.,
interface= System[CallSiteInfo.SystemIdx].Interface
prmIdx = OffsetIdx + interface.BlockIOArgDef.FirstLocation
|
}
|
|
NumCanonicalPrmArgs
|
Occur when inline parameters is on, i.e., always zero if Inline Parameters is off
|
CanonicalPrmArg {
|
One for each parameter argument. These originate when a variable in a block parameter field (or child system Canonical parameter) maps back to a parameter field in a mask above us.
|
ChildPrmArgIdx
|
Index in to the corresponding called/inlined system:
ChildCanoncialPrmArgs.ChildConicalPrmArg[i]
|
|
|
DWorkArg {
|
Present if the corresponding system has DWorks.
|
OffsetIdx
|
Integer index used with Interface.DWorkArgDef.FirstLocation to get to the first DWork slot corresponding to this subsystem, i.e.,
interface = System[CallSiteInfo.SystemIdx].Interface
dworkIdx = OffsetIdx + interface.DWorkArgDef.FirstLocation
|
}
|
|
ContStatesArg {
|
Present if the corresponding system has continuous states.
|
OffsetIdx
|
Integer index used with Interface. ContStatesArgDef.FirstLocation to get to the first continuous state corresponding to this subsystem.
i.e., interface= System[CallSiteInfo.SystemIdx].Interface
csIdx=OffsetIdx+interface.ContStatesArgDef.FirstLocation
|
}
|
|
NonsampledZCArg {
|
Present if the corresponding system has nonsampled zero crossings.
|
OffsetIdx
|
Integer index used with Interface. NonsampledZCArgsDef.FirstLocation to get to the first DWork slot corresponding to this subsystem.
i.e., interface=System[CallSiteInfo.SystemIdx].Interface
nsZCIdx = OffsetIdx + interface.NonsampledZCArgDef.FirstLocation
|
}
|
|
ZCEventArg {
|
Present if the corresponding system has ZC events.
|
OffsetIdx
|
Integer index used with Interface. ZCEventArgDef.FirstLocation to get to the first DWork slot corresponding to this subsystem.
i.e., interface= System[CallSiteInfo.SystemIdx].Interface
dworkIdx = OffsetIdx + interface.ZCEventArgDef.FirstLocation
|
}
|
|