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

Subversion Repositories mipsr2000

[/] [mipsr2000/] [trunk/] [Reg_block.vhd] - Blame information for rev 24

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 jimi39
----------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer: 
4
-- 
5
-- Create Date:    21:29:54 06/19/2012 
6
-- Design Name: 
7
-- Module Name:    Reg_block - 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 Reg_block is
33
port (
34
      Clk : in std_logic;
35
                rst : in  STD_LOGIC;
36
                vector_on : in std_logic_vector(2 downto 0);
37
                Reg_Write : in std_logic;
38
                Reg_Imm_not : in std_logic;
39
                rs : in std_logic_vector(4 downto 0);
40
                rt : in std_logic_vector(4 downto 0);
41
                rd : in std_logic_vector(4 downto 0);
42
                Ext_sz_c   : in std_logic;
43
                immed_addr : in std_logic_vector(15 downto 0);
44
                Bus_W : in std_logic_vector(31 downto 0);
45
                A2Alu : out std_logic_vector(31 downto 0);
46
                B2Alu : out std_logic_vector(31 downto 0);
47
      I2Alu : out std_logic_vector(31 downto 0)
48
 
49
);
50
end Reg_block;
51
 
52
architecture Behavioral of Reg_block is
53
component reg_file_block is
54
port(
55
                Clk : in std_logic;
56
                rst : in  STD_LOGIC;
57
                vector_on : in std_logic_vector(2 downto 0);
58
                Reg_Write : in std_logic;
59
                Reg_Imm_not : in std_logic;
60
                rs : in std_logic_vector(4 downto 0);
61
                rt : in std_logic_vector(4 downto 0);
62
                rd : in std_logic_vector(4 downto 0);
63
                Bus_W : in std_logic_vector(31 downto 0);
64
                Bus_A : out std_logic_vector(31 downto 0);
65
                Bus_B : out std_logic_vector(31 downto 0)
66
                --result: out std_logic_vector(31 downto 0)
67
);
68
end component;
69
component Ext_sz is
70
port (
71
      clk : in  STD_LOGIC;
72
           rst : in  STD_LOGIC;
73
                immed_addr : in std_logic_vector(15 downto 0);
74
                Ext_sz_c   : in std_logic;
75
      Ext_sz     : out std_logic_vector(31 downto 0)
76
 
77
 
78
);
79
end component;
80
 
81
--signal Bus_A,Bus_B :std_logic_vector(31 downto 0);         
82
begin
83
Reg_block_b:reg_file_block port map(Clk=>Clk,rst=>rst,vector_on=>vector_on,Reg_Write=>Reg_Write,Reg_Imm_not=>Reg_Imm_not,
84
                                    rs=>rs,rt=>rt,rd=>rd,Bus_W=>Bus_W,Bus_A=>A2Alu,Bus_B=>B2Alu);
85
Ext_sz_b:Ext_sz port map (clk=>clk,rst=>rst,immed_addr=>immed_addr,
86
                                    Ext_sz_c =>Ext_sz_c,Ext_sz=>I2Alu);
87
end Behavioral;
88
 

powered by: WebSVN 2.1.0

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