Generic Demultiplexer / Decoder

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

The demultiplexer size is configurable via a generic parameter SEL_W.

demux_code

demux_wave

 

The decoder is simpler than the demultiplexer, there isn’t a din input. The sel input (of width w) is decoded into one output active (there are 2^w outputs). A demultiplexer can behave as a decoder if its data input is at constant value ‘1’.

decoder_code

The VHDL code for these blocks and testbench are available here.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s