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

Subversion Repositories flha

[/] [flha/] [trunk/] [VHDL/] [Core/] [MUX3.vhd] - Blame information for rev 4

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 songching
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
--  Uncomment the following lines to use the declarations that are
7
--  provided for instantiating Xilinx primitive components.
8
--library UNISIM;
9
--use UNISIM.VComponents.all;
10
 
11
entity MUX3 is
12
    Port ( A : in std_logic_vector(63 downto 0);
13
           B : in std_logic_vector(63 downto 0);
14
           Sel : in std_logic;
15
           Count : in std_logic_vector(2 downto 0);
16
           C : out std_logic_vector(63 downto 0));
17
end MUX3;
18
 
19
architecture mux3_structure of MUX3 is
20
begin
21
        mux3_process: process(A, B, Sel, Count)
22
        begin
23
                if(Sel = '1') then
24
                        if(Count = "000") then
25
                                C <= (others=>'0');
26
                        else
27
                                C <= B;
28
                        end if;
29
                else
30
                        C <= A;
31
                end if;
32
        end process mux3_process;
33
end mux3_structure;

powered by: WebSVN 2.1.0

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