Mux
Joins signals into one vector wire, in order. Set the number of inputs in its properties; an input may itself be a vector.
- signal
- Gradara equations
- 4 ports
muxLibraryRoutingDescription
Joins several signals into one vector, in order, and carries it on one wire. The wire is drawn heavy so a bundle stands out from a single signal.
Set the number of inputs (2 to 32) under Signals in the block’s properties; the bar grows to fit. An input may itself be a vector, which is added in place, so Muxes can be chained. Split the vector again with a Demux, or pass it through subsystem ports unchanged.
A Mux carries one kind of signal, Real or Boolean. Choose the type under Signals while the block has no wires, or wire it: it takes the kind of the first wire you connect. A Boolean Mux joins Boolean signals (gate commands, flags) into one Boolean vector, drawn in the Boolean color.
Example
Mux and Demux Three signals carried across the sheet on one vector wire, then split apart again.
Ports
Inputs 3
-
1
u1First signal (or vector).
-
2
u2Second signal (or vector).
-
3
u3Third signal (or vector).
Outputs 1
-
y
The inputs joined in order: as wide as all of them together.
Equations
y = {u1, u2, u3} (a vector input contributes all its signals)Implementation
y = {u1, u2, u3};Assumptions and limitations
- A vector wire can go only to a Demux, a Bus Selector, a Bus Creator, another Mux, or a subsystem port. Other blocks take one signal each and report an error; element-wise math on vectors is not available yet.
- A vector is all Real or all Boolean; a Mux cannot mix the two. Physical connections travel on a Physical bus instead.
- Its signals have no names: in results they are numbered, as Mux.y[1], Mux.y[2]. Use a Bus Creator to name them.
Tips
- Log the vector wire to record every signal on it: Results shows one trace per signal.
See also
Select a block in Gradara and press F1 to open its page offline.