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

Subversion Repositories mipsr2000

[/] [mipsr2000/] [trunk/] [Dm.vhd] - Blame information for rev 27

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

Line No. Rev Author Line
1 7 jimi39
----------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer:     Lazaridis Dimitris
4
-- 
5
-- Create Date:    21:37:47 06/13/2012 
6
-- Design Name: 
7
-- Module Name:    Dm - 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 Dm is
33
port (
34
      clk    : in std_logic;
35
                rst : in std_logic;
36
      Alu_in :in std_logic_vector(31 downto 0);
37
                MDR_in : in std_logic_vector(31 downto 0);
38
                --op_code: in std_logic_vector(5 downto 0);
39
                MemWrite : in std_logic;
40
                MemRead : in std_logic;
41
                IorD : in std_logic;
42
                MDR_out : out std_logic_vector(31 downto 0)
43
      --E  : out std_logic_vector(1 downto 0) 
44
);
45
end Dm;
46
 
47
architecture Behavioral of Dm is
48
component dmem is
49
port (
50
               clk : in std_logic;
51
                                        rst : in std_logic;
52
                                        IorD : in std_logic;
53
                                        we : in std_logic_vector(3 downto 0);
54
               en : in std_logic_vector(3 downto 0);
55
               ssr : in std_logic_vector(3 downto 0);
56
               address : in std_logic_vector(10 downto 0);
57
               data_in : in std_logic_vector(31 downto 0);
58
               data_out : out std_logic_vector(31 downto 0)
59
                                        );
60
end component;
61
component DMcontrol is
62
port (
63
      --clk : in std_logic;
64
      --From_Alu : in std_logic_vector(31 downto 0);
65
                --op_code: in std_logic_vector(5 downto 0);
66
                MemRead: in std_logic;
67
                MemWrite : in std_logic;
68
                --IorD : in std_logic;
69
                --E : out std_logic_vector(1 downto 0);
70
                We_c : out std_logic_vector(3 downto 0);
71
                Re_c :out std_logic_vector(3 downto 0);
72
                Ssr_c:out std_logic_vector(3 downto 0)
73
);
74
end component;
75
signal We_c,Re_c,Ssr_c : std_logic_vector(3 downto 0);
76
 
77
begin
78
 
79
 
80
dmem_d:dmem port map(clk=>clk,rst=>rst,IorD=>IorD,we=>We_c,en=>Re_c,ssr=>Ssr_c,address=>Alu_in(10 downto 0),
81
                    data_in=>MDR_in,data_out=>MDR_out);
82
DMcont_d:DMcontrol port map(MemRead=>MemRead,MemWrite=>MemWrite,
83
                            We_c=>We_c,Re_c=>Re_c,Ssr_c=>Ssr_c);
84
end Behavioral;
85
 

powered by: WebSVN 2.1.0

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