OpenCores
URL https://opencores.org/ocsvn/tiny64/tiny64/trunk

Subversion Repositories tiny64

[/] [tiny64/] [trunk/] [mux8.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 riedelx
library IEEE;
2
use IEEE.STD_LOGIC_1164.ALL;
3
use IEEE.STD_LOGIC_ARITH.ALL;
4
use IEEE.STD_LOGIC_UNSIGNED.ALL;
5
 
6
use work.TinyXconfig.ALL;
7
--  Uncomment the following lines to use the declarations that are
8
--  provided for instantiating Xilinx primitive components.
9
--library UNISIM;
10
--use UNISIM.VComponents.all;
11
 
12
entity mux8 is
13
    Port ( ina : in cpuWord;
14
           inb : in cpuWord;
15
           inc : in cpuWord;
16
           ind : in cpuWord;
17
           ine : in cpuWord;
18
           inf : in cpuWord;
19
           ing : in cpuWord;
20
           inh : in cpuWord;
21
           mout : out cpuWord;
22
           sel : in std_logic_vector(2 downto 0));
23
end mux8;
24
 
25
architecture Behavioral of mux8 is
26
begin
27
  mx8: for i in ina'range generate
28
    mout(i) <= (ina(i) and (not sel(2)) and (not sel(1)) and (not sel(0))) or
29
               (inb(i) and (not sel(2)) and  not sel(1)  and (    sel(0))) or
30
               (inc(i) and (not sel(2)) and      sel(1)  and (not sel(0))) or
31
               (ind(i) and (not sel(2)) and      sel(1)  and      sel(0) ) or
32
               (ine(i) and      sel(2)  and (not sel(1)) and (not sel(0))) or
33
               (inf(i) and      sel(2)  and  not sel(1)  and (    sel(0))) or
34
               (ing(i) and      sel(2)  and      sel(1)  and (not sel(0))) or
35
               (inh(i) and      sel(2)  and      sel(1)  and      sel(0) );
36
  end generate;
37
end Behavioral;
38
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.