Library
rtlab/Miscellaneous
Block
This block handles the multiplexing or demultiplexing of data elements according to parameters defined by the user through the block’s interface.
Mask
Description
The OpMuxDemux block can act either as a multiplexer or a demultiplexer depending on user’s choice. If demux is specified, this block will split the raw Data vector in Element pieces according to the definition of that Element provided by the user through the block’s interface. When acting as a multiplexer, the OpMuxDemux block will concatenate the element data pieces into one raw data vector according to the definition of that Element.
A start bit number and a data word number define an element start position in the stream of data.
For example if the element start bit is equal 2 and element start word is equal 0, the element starts at the third bit of the first word of the data stream as shown in figure 3. The raw length defines the length in bits of the element. An element can span over several words. The total number of bits of a data stream is defined by the position of the last element and its length.
Parameters
Number of elements | the number of elements. |
---|---|
Word size | the size of one word of data. |
Vector of elements start bits | one vector of elements start bits. |
Vector of elements start word | one vector of elements start word. |
Vector of elements lengths | one vector of elements lengths. |
Inputs
This block has one input when acting as a demux, and several inputs when acting as a mux.
Outputs
This block has several outputs when acting as a demux and only one output when acting as a mux.
Characteristics and Limitations
This block has no special characteristics.