Orb/Doxygen/examples/mux.vhdl
changeset 0 42188c7ea2d9
equal deleted inserted replaced
-1:000000000000 0:42188c7ea2d9
       
     1 -------------------------------------------------------
       
     2 --! @file
       
     3 --! @brief 2:1 Mux using with-select
       
     4 -------------------------------------------------------
       
     5 
       
     6 --! Use standard library
       
     7 library ieee;
       
     8 --! Use logic elements
       
     9     use ieee.std_logic_1164.all;
       
    10 
       
    11 --! Mux entity brief description
       
    12 
       
    13 --! Detailed description of this 
       
    14 --! mux design element.
       
    15 entity mux_using_with is
       
    16     port (
       
    17         din_0   : in  std_logic; --! Mux first input
       
    18         din_1   : in  std_logic; --! Mux Second input
       
    19         sel     : in  std_logic; --! Select input
       
    20         mux_out : out std_logic  --! Mux output
       
    21     );
       
    22 end entity;
       
    23 
       
    24 --! @brief Architure definition of the MUX
       
    25 --! @details More details about this mux element.
       
    26 architecture behavior of mux_using_with is
       
    27 begin
       
    28     with (sel) select
       
    29     mux_out <= din_0 when '0',
       
    30                din_1 when others;
       
    31 end architecture;
       
    32