A mux (or multiplexer) taking one of several input lines, and then routing the selected input to a combined output vector.
The "Mux" is a signal multiplexer which merges several input signals into a single vector signal. The input signal are stacked in the output signal: First input signal first element of the output. This Mux object is defined through its parameters, which gives both the number of input ports and the width of these. The sum of all Input port widths must be equal to the output port width.
A figure illustrating the principles of multiplexing.
- Author
- Karl-Johan Reite
- Date
- 02.03.2007 KJR: Initial version.
-
20.07.2011 KGA: Ported to 2.0
Example configuration excerpt
<Lib
LibName = "fhsim_base"
SimObject = "Signal/Mux"
Name = "A"
NumInput = "3"
InPortWidth1 = "1"
InPortWidth2 = "1"
InPortWidth3 = "1"
/>
...
<Connection
A.In1 = "1"
A.In2 = "2"
A.In3 = "3"
/>
Input Ports
Name | Width | Description |
In1 .. In<NumInput> | <InPortWidth1> .. <InPortWidth<NumInput>> | The input port |
Output Ports
Name | Width | Description |
Out | <PortWidth> | The input signals multiplexed into a single signal |
Configuration parameters
Name | Width | Description |
PortWidth | 1 |
The width of the Mux object input and output ports.
|
NumInput | 1 | The number of input signals |
InPortWidth1 .. InPortWidth<NumInput> | - | The number of elements in each individual input signal |
Initial conditions
There are no initial conditions for this function.
Full example file
<Contents>
<OBJECTS>
<Lib
LibName="base"
SimObject="Signal/Mux"
Name="A"
NumInput="3"
InPortWidth1="1"
InPortWidth2="1"
InPortWidth3="1"
/>
<Lib
LibName="base"
SimObject="Src/Sine"
Name="S1"
Amplitude="1"
Bias="0"
StartTime="0"
PeriodS="4"
PhaseDeg="0"
/>
<Lib
LibName="base"
SimObject="Src/Sine"
Name="S2"
Amplitude="2"
Bias="0"
StartTime="0"
PeriodS="4"
PhaseDeg="0"
/>
<Lib
LibName="base"
SimObject="Src/Sine"
Name="S3"
Amplitude="3"
Bias="0"
StartTime="0"
PeriodS="4"
PhaseDeg="0"
/>
</OBJECTS>
<INTERCONNECTIONS>
<Connection
A.In1="S1.Out"
A.In2="S2.Out"
A.In3="S3.Out"
/>
</INTERCONNECTIONS>
<INITIALIZATION>
<InitialCondition
/>
</INITIALIZATION>
<INTEGRATION>
<Engine
IntegratorMethod="2"
NumCores="1"
TOutput="0, 0,1,2,3,4, 5, 30"
LogStates ="1"
stepsize ="0"
HMax="0.002"
HMin="0.00000001"
AbsTol="1e-3" RelTol="1e-3"
UseRSSNormInsteadOfInfNorm="0"
FileOutput="objects:all"
/>
</INTEGRATION>
</Contents>
This SimObject is referred to as Signal/Mux