cgsl_0402: Signal interfaces for component deployment
|cgsl_0402: Signal interfaces for component deployment
At the root level of a component, signal interfaces shall be modeled by using only one type of ports:
Using name-based ports:
For structured signals that use In Bus Element and Out Bus Element blocks, set block parameters as follows:
Configure the interface for each name-based port individually.
For structured signals that use Inport and Outport blocks, set block parameters as follows:
To select signal elements in a way that minimizes memory usage, reduce the number of data copies by passing an entire virtual or nonvirtual bus into an atomic subsystem, even when the subsystem uses only a subset of the bus. To select an element of the bus from the interface, use anIn Bus Element block.
A data copy is created when an atomic subsystem interface receives only part of a bus. For example, a data copy is created when a bus element is selected from the bus, then that bus element is passed into the subsystem.
This table describes the data copy creation when an atomic subsystem receives a bus element instead of the entire bus.
Using In Bus Element and Out Bus Element blocks reduces wiring and the name-based approach avoids issues with port reordering.
Reduces complexity and provides model clarity.
|Model Advisor Check
|Verify this guideline by using Model Advisor check Check signal interfaces (Embedded Coder).
In this model, an In Bus
Element block selects a vector from a nonvirtual bus. The selected vector
enters an atomic subsystem that has function packaging set to
Only the selected vector is passed to the function because the vector is selected before the subsystem interface. The function requires a data copy of the vector independent of the nonvirtual bus.
Code Interfaces and Code Interface Specification (Embedded Coder)