Examples: MUX 4→1
Complete implementation of a 4-to-1 multiplexer in different VHDL styles.
The Multiplexer (MUX)
A multiplexer selects one input out of N based on a selection signal.
Truth table of a 4→1 MUX:
i_sel | o_y |
|---|---|
"00" | i_d0 |
"01" | i_d1 |
"10" | i_d2 |
"11" | i_d3 |
Style 1: Conditional Concurrent Assignment
The most compact solution for small MUXes.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;