-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCacheController.vhd
36 lines (29 loc) · 946 Bytes
/
CacheController.vhd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity CacheController is
port (
clk, readmem, writemem : in std_logic;
addressbus: in std_logic_vector (15 downto 0);
databus : inout std_logic_vector (15 downto 0);
memdataready : out std_logic
);
end entity;
architecture behavioral of CacheController is
component RAM
generic (blocksize : integer := 1024);
port (clk, readmem, writemem : in std_logic;
addressbus: in std_logic_vector (15 downto 0);
databus : inout std_logic_vector (15 downto 0);
memdataready : out std_logic);
end component;
component Cache is
port (clk, readmem, writemem : in std_logic;
address: in std_logic_vector (15 downto 0);
wdata : in std_logic_vector (15 downto 0);
data : out std_logic_vector (15 downto 0);
hit : out std_logic);
end component;
begin
MainMemory : RAM port map (clk,readmem,writemem,addressbus,databus,memdataready);
end architecture;