demux¶
It is used to distribute the data received at its input to one of its outputs.
-
demux
(ctrl: Uint, din, *, fcat=ccat, nout=None) -> (din, ...)¶ Sends the data received at
din
to one of its outputs designated by the value received atctrl
. The number of outputs is either determined by the value of thenout
parameter, or equals2**len(ctrl)
ifnout
is not specified.ctrl = drv(t=Uint[2], seq=[0, 1, 2, 3]) outs = drv(t=Uint[4], seq=[10, 11, 12, 13]) \ | demux(ctrl) outs[0] | check(ref=[10]) outs[1] | check(ref=[11]) outs[2] | check(ref=[12]) outs[3] | check(ref=[13])