FAQ 555: Bus Manager - Signal extraction from model port block created by Bus Configuration
Question
How to extract signals from a Model Port Block for Model Mapping
Model port blocks are usually created during the propagation of the bus configuration. However, due to the hierarchy of that configuration, it’s not always possible to directly map model signals to the model port block.
To access signals from this hierarchy, we often need to connect the bus creator block, which can be a tedious task.
A MATLAB script can simplify this process by automatically extracting the ports and connecting the model signals, saving time and effort.
Solution
Generate Model Port Blocks
Propagate the bus configuration using any approach (e.g., port-based, block-based, or function-based).
Example: Block-based approach.
Create Model Port Block Periphery
Select the model port block and choose the “Create Model Port Block Periphery” option.
- This option connects constant inputs and terminations to the respective inports and outports.
- The constants generated will be placed in subsystems based on the hierarchy of the bus configuration.
Add the Script to the Working Directory
After completing the above steps, add the provided script to your working directory.
Execute the Command for Periphery Blocks
- Select the periphery blocks generated (e.g., ‘In’ and ‘Out’ in the example) one at a time.
In the MATLAB Command Window, run: givePeripheryInports(gcb)
Tags
| Date | 2026-06-16 |
| Product | Bus Manager |
| Information Type | Frequently Asked Questions |