Blame examples/mux.vhdl

Packit Service 50c9f2
-------------------------------------------------------
Packit Service 50c9f2
--! @file
Packit Service 50c9f2
--! @brief 2:1 Mux using with-select
Packit Service 50c9f2
-------------------------------------------------------
Packit Service 50c9f2
Packit Service 50c9f2
--! Use standard library
Packit Service 50c9f2
library ieee;
Packit Service 50c9f2
--! Use logic elements
Packit Service 50c9f2
    use ieee.std_logic_1164.all;
Packit Service 50c9f2
Packit Service 50c9f2
--! Mux entity brief description
Packit Service 50c9f2
Packit Service 50c9f2
--! Detailed description of this 
Packit Service 50c9f2
--! mux design element.
Packit Service 50c9f2
entity mux_using_with is
Packit Service 50c9f2
    port (
Packit Service 50c9f2
        din_0   : in  std_logic; --! Mux first input
Packit Service 50c9f2
        din_1   : in  std_logic; --! Mux Second input
Packit Service 50c9f2
        sel     : in  std_logic; --! Select input
Packit Service 50c9f2
        mux_out : out std_logic  --! Mux output
Packit Service 50c9f2
    );
Packit Service 50c9f2
end entity;
Packit Service 50c9f2
Packit Service 50c9f2
--! @brief Architecture definition of the MUX
Packit Service 50c9f2
--! @details More details about this mux element.
Packit Service 50c9f2
architecture behavior of mux_using_with is
Packit Service 50c9f2
begin
Packit Service 50c9f2
    with (sel) select
Packit Service 50c9f2
    mux_out <= din_0 when '0',
Packit Service 50c9f2
               din_1 when others;
Packit Service 50c9f2
end architecture;
Packit Service 50c9f2