Bus Assignment
Assigns new values to the specified bus elements.
Description
The Bus Assignment block assigns input signal values to selected bus elements. Use the Bus Assignment block to change the values without removing the bus elements and reassemble the bus with the desired elements. The Bus Assignment block makes it easy to update the bus to reflect processing that occurs in a separate component, such as a subsystem or reference model.
The Bus Assignment block assigns the elements connected to its input assignment ports (:=) to the specified bus elements connected to its Bus input port. In doing so, the block replaces the elements previously assigned to those elements. The change does not affect the bus composition and only affects the element values. Non-exchangeable signals are not affected by the replacement of other elements.
The elements to which values are assigned may be non-bus signals or buses, including bus arrays, provided that they are input bus elements. The new values must correspond to the attributes of the elements of the original bus.
By default, the software corrects non-functional elections for the Bus Assignment block caused by a change in the bus hierarchy. To prevent automatic repair, set the Repair bus selections parameter to Error without repair
.
Ports
Input
Bus - input bus with elements for reassignment
bus
An input virtual or non-virtual bus may contain elements with real or complex values of any supported data type, including bus objects, fixed-point data types, and enumerated data types. A bus may also contain bus arrays.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
Support for complex numbers: Yes
:= - new value to assign to the bus element
scalar
| vector
| matrix
| array
| bus
Each element in the list of assignable elements receives an assignment port (:=). The port label indicates the bus element that corresponds to that port. For the element named signal1
, the port label is := signal1
.
Connect the signal to be assigned to the bus element to the corresponding assignment port (:=). The signal connected to the assignment port (:=) must have the same structure, data type and calculation step as the corresponding bus element.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
Support for complex numbers: Yes
Output
Bus - output bus
bus
The output virtual or non-virtual bus includes the assigned bus element values for the selected elements and the unchanged bus element values for the remaining elements.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
Support for complex numbers: Yes
Parameters
Elements in bus - list of elements in the input bus
`list of element names
This parameter is read-only.
Select the input bus items to work with.
An arrow next to the item name indicates that the item is a nested bus. Click on the arrow to display the items in the nested bus.
With one or more items selected, click the button:
-
Find to find the source of the selected elements. The programme will open and highlight the system containing the source of the elements.
-
Select - add the selected elements to the list of elements to which values will be assigned.
To update the list with the changes on the input bus, press the Update button.
Block parameter |
|
Values |
|
Selected signals - bus elements to which new values will be assigned
`list of element names
For each element in this list, the block has an assignment port (:=). The port label contains the name of the corresponding element.
To add assignment ports (:=) for items:
-
Select one or more elements from the Elements on Bus list.
If multiple items are selected from the Elements in bus list, the order of their selection determines the order in the Selected signals list.
-
Optionally, specify where the items in the Elements that are being assigned list are to be displayed. Select the element under which the added elements are to be displayed. If no item is selected, the added items appear at the end of the list.
-
Press the Select button.
To change the order of the assignment ports (:=), select an item or multiple adjacent items in the list, and then press the Up or Down button. When you change the order of the items, the port cohesion is preserved.
To delete assignment ports (:=), select the corresponding items in the list and then press the Delete button.
If an item in the list is not present on the input bus, its name begins with three question marks (?????). Change the input bus so that an item with the specified name appears on the input bus, or delete the item from the list.
Block parameter |
|
Values |
|