-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfifo_controller.vhd
64 lines (57 loc) · 1.64 KB
/
fifo_controller.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.numeric_std.all;
use IEEE.std_logic_unsigned.all;
entity fifo_controller is
Port (
clk : IN STD_LOGIC;
rst : IN STD_LOGIC;
din : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
wr_en : IN STD_LOGIC;
rd_en : IN STD_LOGIC;
dout : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
full : OUT STD_LOGIC;
wr_ack : OUT STD_LOGIC;
empty : OUT STD_LOGIC;
valid : OUT STD_LOGIC;
data_count : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
wr_rst_busy : OUT STD_LOGIC;
rd_rst_busy : OUT STD_LOGIC
);
end fifo_controller;
architecture Behavioral of fifo_controller is
component fifo_generator_0 IS
PORT (
clk : IN STD_LOGIC;
rst : IN STD_LOGIC;
din : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
wr_en : IN STD_LOGIC;
rd_en : IN STD_LOGIC;
dout : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
full : OUT STD_LOGIC;
wr_ack : OUT STD_LOGIC;
empty : OUT STD_LOGIC;
valid : OUT STD_LOGIC;
data_count : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
wr_rst_busy : OUT STD_LOGIC;
rd_rst_busy : OUT STD_LOGIC
);
END component;
begin
fifo_ip: fifo_generator_0 port map
(
clk => clk ,
rst => rst ,
din => din ,
wr_en => wr_en ,
rd_en => rd_en ,
dout => dout ,
full => full ,
wr_ack => wr_ack ,
empty => empty ,
valid => valid ,
data_count => data_count ,
wr_rst_busy => wr_rst_busy ,
rd_rst_busy => rd_rst_busy
);
end Behavioral;