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

Subversion Repositories mipsr2000

[/] [mipsr2000/] [trunk/] [Imem_block.vhd] - Blame information for rev 13

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 jimi39
----------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer:   Lazaridis Dimitris
4
-- 
5
-- Create Date:    01:15:26 06/14/2012 
6
-- Design Name: 
7
-- Module Name:    Imem_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 Imem_block is
33
port (
34
        clk : in std_logic;
35
                  rst : in std_logic;
36
                  npc : in std_logic_vector(31 downto 0);
37
        MemRead : in  STD_LOGIC;
38
                  PCWrite : in  STD_LOGIC;
39
                  IRWrite : in  STD_LOGIC;
40
                  Opcode   : out std_logic_vector(5 downto 0);
41
                  rs       : out std_logic_vector(4 downto 0);
42
                  rt       : out std_logic_vector(4 downto 0);
43
                  rd       : out std_logic_vector(4 downto 0);
44
        immed_addr : out std_logic_vector(15 downto 0);
45
                  Err : out STD_LOGIC;
46
                  N : out std_logic_vector(31 downto 0);
47
                  Ext_sz_c  : out std_logic;
48
                  From_i_op : out std_logic_vector(1 downto 0);
49
                  From_i_mux : out std_logic_vector(1 downto 0);
50
                  lui : out  STD_LOGIC
51
                );
52
end Imem_block;
53
 
54
architecture Behavioral of Imem_block is
55
component pc is
56
Port (     clk : in  STD_LOGIC;
57
           rst : in  STD_LOGIC;
58
                          npc : in std_logic_vector(31 downto 0);
59
                          PCWrite : in  STD_LOGIC;
60
                          Err : out STD_LOGIC;
61
                          N : out std_logic_vector(31 downto 0);
62
                address : out std_logic_vector(12 downto 0)
63
                        );
64
end component;
65
Component Ir is
66
port
67
     (
68
            clk         : in std_logic;
69
                 rst : in  STD_LOGIC;
70
                 imem_to_ir : in std_logic_vector(31 downto 0);
71
                 IRWrite   : in std_logic;
72
                 Opcode      : out std_logic_vector(5 downto 0);
73
                 rs          : out std_logic_vector(4 downto 0);
74
            rt          : out std_logic_vector(4 downto 0);
75
                 rd          : out std_logic_vector(4 downto 0);
76
                 immed_addr  : out std_logic_vector(15 downto 0);
77
                 Ext_sz_c  : out std_logic;
78
                 From_i_op : out std_logic_vector(1 downto 0);
79
                 From_i_mux : out std_logic_vector(1 downto 0);
80
                 lui : out  STD_LOGIC
81
          );
82
end component;
83
Component Imem is
84
port (
85
        clk : in std_logic;
86
                  en : in std_logic;
87
                  address : in std_logic_vector(12 downto 0);
88
                  imem_to_ir : out std_logic_vector(31 downto 0)
89
 
90
                );
91
end component;
92
signal address : std_logic_vector(12 downto 0);
93
signal imem_to_ir: std_logic_vector(31 downto 0);
94
begin
95
Imem_b: Imem port map (clk=>clk,en=>MemRead,address=>address,
96
                       imem_to_ir=>imem_to_ir
97
                                                          );
98
pc_b:pc port map (clk=>clk,rst=>rst,npc=>npc,PCWrite=>PCWrite,Err=>Err,N=>N,
99
                  address=>address);
100
Ir_b:Ir port map(clk=>clk,rst=>rst,imem_to_ir=>imem_to_ir,IRWrite=>IRWrite,Opcode=>Opcode,
101
                  rs=>rs,rt=>rt,rd=>rd,immed_addr=>immed_addr,Ext_sz_c=>Ext_sz_c,From_i_op=>From_i_op,
102
                                                From_i_mux=>From_i_mux,lui=>lui);
103
end Behavioral;
104
 

powered by: WebSVN 2.1.0

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