URL
https://opencores.org/ocsvn/cowgirl/cowgirl/trunk
[/] [cowgirl/] [trunk/] [mux_8_1.vhdl] - Diff between revs 2 and 4
Show entire file |
Details |
Blame |
View Log
Rev 2 |
Rev 4 |
Line 1... |
Line 1... |
|
library ieee;
|
|
use ieee.std_logic_1164.all;
|
|
|
No newline at end of file
|
No newline at end of file
|
|
entity mux_8_1 is port(
|
|
a: in std_logic_vector(15 downto 0);
|
|
b: in std_logic_vector(15 downto 0);
|
|
c: in std_logic_vector(15 downto 0);
|
|
d: in std_logic_vector(15 downto 0);
|
|
e: in std_logic_vector(15 downto 0);
|
|
f: in std_logic_vector(15 downto 0);
|
|
g: in std_logic_vector(15 downto 0);
|
|
h: in std_logic_vector(15 downto 0);
|
|
sel: in std_logic_vector(2 downto 0);
|
|
o: out std_logic_vector(15 downto 0)
|
|
);
|
|
end mux_8_1;
|
|
|
|
architecture mux8_arch of mux_8_1 is
|
|
begin
|
|
process(sel, a, b)
|
|
begin
|
|
if sel = "000" then
|
|
o <= a;
|
|
elsif sel = "001" then
|
|
o <= b;
|
|
elsif sel = "010" then
|
|
o <= c;
|
|
elsif sel = "011" then
|
|
o <= d;
|
|
elsif sel = "100" then
|
|
o <= e;
|
|
elsif sel = "101" then
|
|
o <= f;
|
|
elsif sel = "110" then
|
|
o <= g;
|
|
elsif sel = "111" then
|
|
o <= h;
|
|
end if;
|
|
end process;
|
|
end mux8_arch;
|
No newline at end of file
|
No newline at end of file
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.