cgsl_0204: Vector and bus signals crossing into atomic subsystems or Model blocks
ID: Title | cgsl_0204: Vector and bus signals crossing into atomic subsystems or Model blocks | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | When working with vector or bus signals and some of the signal elements are in an atomic subsystem or a referenced model, use the following information to determine how to select signal elements to minimize memory usage. | |||||||||||||||
A | Bus or vector entering an atomic subsystem:
| |||||||||||||||
| ||||||||||||||||
| ||||||||||||||||
B | Bus or vector entering a Model block:
| |||||||||||||||
Notes |
| |||||||||||||||
Rationale | A, B | Minimize RAM, ROM, and stack usage | ||||||||||||||
Last Changed | R2016a | |||||||||||||||
Examples | Example 1: Nonvirtual bus entering an atomic subsystem
| |||||||||||||||
Only the selected signals are passed to the function: | ||||||||||||||||
Example 2: Nonvirtual bus entering a model block
| ||||||||||||||||
There are no data copies in the code for the main model. The whole bus is passed to the model reference function. Code for the model reference function:
|