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

Subversion Repositories mipsr2000

[/] [mipsr2000/] [trunk/] [RF_mux.vhd] - Blame information for rev 58

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

Line No. Rev Author Line
1 26 jimi39
----------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer: 
4
-- 
5
-- Create Date:    19:02:24 06/24/2012 
6
-- Design Name: 
7
-- Module Name:    RF_mux - Behavioral 
8
-- Project Name: 
9
-- Target Devices: 
10
-- Tool versions: 
11
-- Description: 
12
--
13
-- Dependencies: 
14
--
15
-- Revision: 
16
-- Revision 0.01 - File Created
17
-- Additional Comments: 
18
--
19
----------------------------------------------------------------------------------
20
library IEEE;
21
use IEEE.STD_LOGIC_1164.ALL;
22
 
23
-- Uncomment the following library declaration if using
24
-- arithmetic functions with Signed or Unsigned values
25
--use IEEE.NUMERIC_STD.ALL;
26
 
27
-- Uncomment the following library declaration if instantiating
28
-- any Xilinx primitives in this code.
29
--library UNISIM;
30
--use UNISIM.VComponents.all;
31
 
32
entity RF_mux is
33
port (
34
      clk   : in std_logic;
35
                RFmux : in std_logic_vector(2 downto 0);
36
      Hi_in : in std_logic_vector(31 downto 0);
37
      Lo_in : in std_logic_vector(31 downto 0);
38
      Alu_in: in std_logic_vector(31 downto 0);
39
      From_N : in std_logic_vector(31 downto 0);
40
      Mdr_fr_out : in std_logic_vector(31 downto 0);
41
      RF_out: out std_logic_vector(31 downto 0)
42
      );
43
 
44
end RF_mux;
45
 
46
architecture Behavioral of RF_mux is
47
 
48
begin
49
      process(clk,RFmux)
50
                begin
51
                if (FALLING_EDGE(clk))then
52
                case RFmux is
53
                           when "000" => RF_out <= Hi_in;
54
                                          when "010" => RF_out <= Lo_in;
55
                                          when "100" => RF_out <= Alu_in;
56
                                          when "110" => RF_out <= Mdr_fr_out;
57
                                          when "001" => RF_out <= From_N;
58
                           when others => RF_out <= (others => '0');
59
                end case;
60
                end if;
61
      end process;
62
end Behavioral;
63
 

powered by: WebSVN 2.1.0

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