summaryrefslogtreecommitdiffstats
path: root/examples/mux.vhdl
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2008-01-17 18:56:38 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2008-01-17 18:56:38 (GMT)
commitf1103ed882b5739e7f16cfd69527bde6d6d96dfa (patch)
tree05e55417a750c1275c9139b7952de6941db168dd /examples/mux.vhdl
parentc9fcb1845bd7c5080abfee1be4070130bbdd38c2 (diff)
downloadDoxygen-f1103ed882b5739e7f16cfd69527bde6d6d96dfa.zip
Doxygen-f1103ed882b5739e7f16cfd69527bde6d6d96dfa.tar.gz
Doxygen-f1103ed882b5739e7f16cfd69527bde6d6d96dfa.tar.bz2
Release-1.5.4-20080101
Diffstat (limited to 'examples/mux.vhdl')
-rw-r--r--examples/mux.vhdl32
1 files changed, 32 insertions, 0 deletions
diff --git a/examples/mux.vhdl b/examples/mux.vhdl
new file mode 100644
index 0000000..211e56e
--- /dev/null
+++ b/examples/mux.vhdl
@@ -0,0 +1,32 @@
+-------------------------------------------------------
+--! @file
+--! @brief 2:1 Mux using with-select
+-------------------------------------------------------
+
+--! Use standard library
+library ieee;
+--! Use logic elements
+ use ieee.std_logic_1164.all;
+
+--! Mux entity brief description
+
+--! Detailed description of this
+--! mux design element.
+entity mux_using_with is
+ port (
+ din_0 : in std_logic; --! Mux first input
+ din_1 : in std_logic; --! Mux Second input
+ sel : in std_logic; --! Select input
+ mux_out : out std_logic --! Mux output
+ );
+end entity;
+
+--! @brief Architure definition of the MUX
+--! @details More details about this mux element.
+architecture behavior of mux_using_with is
+begin
+ with (sel) select
+ mux_out <= din_0 when '0',
+ din_1 when others;
+end architecture;
+