Channel Replace Elements navigation bar

Table of Contents

Demultiplexer

Routes an input signal to one of several outputs based on a selection input.

Library

QUARC Targets/Signal Routing

MATLAB Command Line

Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:

qc_open_library('quarc_library/Signal Routing')

Description

Demultiplexer

The Demultiplexer block acts like a digital demultiplexer. It routes an input signal to one of several outputs based on the value of a selection input. The selection input is the zero-based index of the output port to which the input should be routed.

The state of the unselected outputs depends on the Output states parameter. If it is held then the unselected outputs retain their previous value. If it is reset to zero then they are reset to zero. Otherwise, if it is reset to port then the unselected outputs are reset to the value of the rst input.

Input Ports

in

The signal to be routed to an output.

sel

The selection input which determines the output port to which to route the input. A value of zero routes the in signal to the first output port. A value of one routes it to the second output port, etc. If the sel input is not a valid index then the outputs are left unchanged. This input must be a numeric scalar.

rst

The value to which to reset the unselected outputs. This port is only available when the Output states option is set to reset to port.

Output Ports

The number of outputs depends on the Number of output ports parameter. Each output has the same data type and dimensions as the signal connected to the in port.

Data Type Support

The Demultiplexer block supports any data type except fixed point, including complex and multidimensional signals, at the in port. The sel input may be any of the standard Simulink built-in numeric data types.

Parameters and Dialog Box

Demultiplexer

Number of output ports

The number of output ports to make available.

Output states

This option determines the state of the unselected outputs. The following table enumerates the semantics for each option:

Option

Description

held

The unselected outputs hold their most recent value.

reset to zero

The unselected outputs are reset to zero.

reset to port

The unselected outputs are reset to the value of the rst port.

Targets

Target Name

Compatible*

Model Referencing

Comments

QUARC Win32 Target

Yes

Yes

QUARC Win64 Target

Yes

Yes

QUARC Linux Nvidia Target

Yes

Yes

QUARC Linux QBot Platform Target

Yes

Yes

QUARC Linux QCar 2 Target

Yes

Yes

QUARC Linux QDrone 2 Target

Yes

Yes

QUARC Linux Raspberry Pi 3 Target

Yes

Yes

QUARC Linux Raspberry Pi 4 Target

Yes

Yes

QUARC Linux RT ARMv7 Target

Yes

Yes

QUARC Linux x64 Target

Yes

Yes

QUARC Linux DuoVero Target

Yes

Yes

QUARC Linux DuoVero 2016 Target

Yes

Yes

QUARC Linux Verdex Target

Yes

Yes

QUARC QNX x86 Target

Yes

Yes

Last fully supported in QUARC 2018.

Rapid Simulation (RSIM) Target

Yes

Yes

S-Function Target

No

N/A

Old technology. Use model referencing instead.

Normal simulation

Yes

Yes

* Compatible means that the block can be compiled for the target.

 

navigation bar