Generic demultiplexer and decoder

The demultiplexer receives one data bit din as input and routes it to one of ‘n’ possible outputs. The output is selected according to the value of the sel input.

The demultiplexer size is configurable via a generic parameter SEL_W.

The decoder is a simpler version of a demultiplexer, it will be shown after the code for the demultiplexer and the Vivado simulation results below:

Continue reading “Generic demultiplexer and decoder”