-
Notifications
You must be signed in to change notification settings - Fork 0
/
axi_fifo.vhd
95 lines (88 loc) · 3.35 KB
/
axi_fifo.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std_unsigned.all;
library xpm;
use xpm.vcomponents.all;
entity axi_fifo is
generic (
G_DEPTH : natural;
G_FILL_SIZE : natural;
G_DATA_SIZE : natural;
G_USER_SIZE : natural
);
port (
s_aclk_i : in std_logic;
s_aresetn_i : in std_logic;
s_axis_tready_o : out std_logic;
s_axis_tvalid_i : in std_logic;
s_axis_tdata_i : in std_logic_vector(G_DATA_SIZE-1 downto 0);
s_axis_tkeep_i : in std_logic_vector(G_DATA_SIZE/8-1 downto 0);
s_axis_tlast_i : in std_logic;
s_axis_tuser_i : in std_logic_vector(G_USER_SIZE-1 downto 0);
s_fill_o : out std_logic_vector(G_FILL_SIZE-1 downto 0);
m_aclk_i : in std_logic;
m_axis_tready_i : in std_logic;
m_axis_tvalid_o : out std_logic;
m_axis_tdata_o : out std_logic_vector(G_DATA_SIZE-1 downto 0);
m_axis_tkeep_o : out std_logic_vector(G_DATA_SIZE/8-1 downto 0);
m_axis_tlast_o : out std_logic;
m_axis_tuser_o : out std_logic_vector(G_USER_SIZE-1 downto 0);
m_fill_o : out std_logic_vector(G_FILL_SIZE-1 downto 0)
);
end entity axi_fifo;
architecture synthesis of axi_fifo is
begin
i_xpm_fifo_axis : xpm_fifo_axis
generic map (
CDC_SYNC_STAGES => 2,
CLOCKING_MODE => "independent_clock",
ECC_MODE => "no_ecc",
FIFO_DEPTH => G_DEPTH,
FIFO_MEMORY_TYPE => "auto",
PACKET_FIFO => "false",
PROG_EMPTY_THRESH => 10,
PROG_FULL_THRESH => 10,
RD_DATA_COUNT_WIDTH => G_FILL_SIZE,
RELATED_CLOCKS => 0,
SIM_ASSERT_CHK => 0,
TDATA_WIDTH => G_DATA_SIZE,
TDEST_WIDTH => 1,
TID_WIDTH => 1,
TUSER_WIDTH => G_USER_SIZE,
USE_ADV_FEATURES => "1404",
WR_DATA_COUNT_WIDTH => G_FILL_SIZE
)
port map (
almost_empty_axis => open,
almost_full_axis => open,
dbiterr_axis => open,
injectdbiterr_axis => '0',
injectsbiterr_axis => '0',
m_aclk => m_aclk_i,
m_axis_tdata => m_axis_tdata_o,
m_axis_tdest => open,
m_axis_tid => open,
m_axis_tkeep => m_axis_tkeep_o,
m_axis_tlast => m_axis_tlast_o,
m_axis_tready => m_axis_tready_i,
m_axis_tstrb => open,
m_axis_tuser => m_axis_tuser_o,
m_axis_tvalid => m_axis_tvalid_o,
prog_empty_axis => open,
prog_full_axis => open,
rd_data_count_axis => m_fill_o,
s_aclk => s_aclk_i,
s_aresetn => s_aresetn_i,
s_axis_tdata => s_axis_tdata_i,
s_axis_tdest => (others => '0'),
s_axis_tid => (others => '0'),
s_axis_tkeep => s_axis_tkeep_i,
s_axis_tlast => s_axis_tlast_i,
s_axis_tready => s_axis_tready_o,
s_axis_tstrb => (others => '0'),
s_axis_tuser => s_axis_tuser_i,
s_axis_tvalid => s_axis_tvalid_i,
sbiterr_axis => open,
wr_data_count_axis => s_fill_o
); -- i_xpm_fifo_axis
end architecture synthesis;