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

Subversion Repositories tiny64

[/] [tiny64/] [trunk/] [mux2.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 mux2 is
13
    Port ( ina : in cpuWord;
14
           inb : in cpuWord;
15
           mout : out cpuWord;
16
           sel : in std_logic);
17
end mux2;
18
 
19
architecture Behavioral of mux2 is
20
begin
21
  mx2: for i in ina'range generate
22
    mout(i) <= (ina(i) and (not sel)) or (inb(i) and sel);
23
  end generate;
24
end Behavioral;
25
 

powered by: WebSVN 2.1.0

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