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

Subversion Repositories pcie_ds_dma

[/] [pcie_ds_dma/] [trunk/] [core/] [ds_dma64/] [pcie_src/] [pcie_core64_m1/] [source_artix7/] [cl_a7pcie_x4_axi_basic_rx.vhd] - Blame information for rev 48

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

Line No. Rev Author Line
1 46 dsmv
-------------------------------------------------------------------------------
2
--
3
-- (c) Copyright 2010-2011 Xilinx, Inc. All rights reserved.
4
--
5
-- This file contains confidential and proprietary information
6
-- of Xilinx, Inc. and is protected under U.S. and
7
-- international copyright and other intellectual property
8
-- laws.
9
--
10
-- DISCLAIMER
11
-- This disclaimer is not a license and does not grant any
12
-- rights to the materials distributed herewith. Except as
13
-- otherwise provided in a valid license issued to you by
14
-- Xilinx, and to the maximum extent permitted by applicable
15
-- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
16
-- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
17
-- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
18
-- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
19
-- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
20
-- (2) Xilinx shall not be liable (whether in contract or tort,
21
-- including negligence, or under any other theory of
22
-- liability) for any loss or damage of any kind or nature
23
-- related to, arising under or in connection with these
24
-- materials, including for any direct, or any indirect,
25
-- special, incidental, or consequential loss or damage
26
-- (including loss of data, profits, goodwill, or any type of
27
-- loss or damage suffered as a result of any action brought
28
-- by a third party) even if such damage or loss was
29
-- reasonably foreseeable or Xilinx had been advised of the
30
-- possibility of the same.
31
--
32
-- CRITICAL APPLICATIONS
33
-- Xilinx products are not designed or intended to be fail-
34
-- safe, or for use in any application requiring fail-safe
35
-- performance, such as life-support or safety devices or
36
-- systems, Class III medical devices, nuclear facilities,
37
-- applications related to the deployment of airbags, or any
38
-- other applications that could lead to death, personal
39
-- injury, or severe property or environmental damage
40
-- (individually and collectively, "Critical
41
-- Applications"). Customer assumes the sole risk and
42
-- liability of any use of Xilinx products in Critical
43
-- Applications, subject only to applicable laws and
44
-- regulations governing limitations on product liability.
45
--
46
-- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
47
-- PART OF THIS FILE AT ALL TIMES.
48
--
49
-------------------------------------------------------------------------------
50
-- Project    : Series-7 Integrated Block for PCI Express
51
-- File       : cl_a7pcie_x4_axi_basic_rx.vhd
52 48 dsmv
-- Version    : 1.10
53 46 dsmv
-- Description:
54
--  TRN to AXI RX module. Instantiates pipeline and null generator RX
55
--  submodules.
56
--
57
--  Notes:
58
--  Optional notes section.
59
--
60
--  Hierarchical:
61
--    axi_basic_top
62
--      axi_basic_rx
63
--------------------------------------------------------------------------------
64
-- Library Declarations
65
--------------------------------------------------------------------------------
66
 
67
LIBRARY ieee;
68
   USE ieee.std_logic_1164.all;
69
   USE ieee.std_logic_unsigned.all;
70
 
71
 
72
ENTITY cl_a7pcie_x4_axi_basic_rx IS
73
   GENERIC (
74
      C_DATA_WIDTH      : INTEGER := 128;           -- RX/TX interface data width
75
      C_FAMILY          : STRING  := "X7";          -- Targeted FPGA family
76
      C_ROOT_PORT       : BOOLEAN := FALSE;       -- PCIe block is in root port mode
77
      C_PM_PRIORITY     : BOOLEAN := FALSE;       -- Disable TX packet boundary thrtl
78
      TCQ               : INTEGER := 1;             -- Clock to Q time
79
 
80
      C_REM_WIDTH       : INTEGER := 1             -- trem/rrem width
81
 
82
   );
83
   PORT (
84
      -------------------------------------------------
85
      -- User Design I/O                             --
86
      -------------------------------------------------
87
      -- AXI RX
88
      -------------
89
 
90
      M_AXIS_RX_TDATA   : OUT STD_LOGIC_VECTOR(C_DATA_WIDTH - 1 DOWNTO 0):=(OTHERS=>'0'); -- RX data to user
91
      M_AXIS_RX_TVALID  : OUT STD_LOGIC                                  :='0';           -- RX data is valid
92
      M_AXIS_RX_TREADY  : IN STD_LOGIC                                   :='0';           -- RX ready for data
93
      m_axis_rx_tkeep   : OUT STD_LOGIC_VECTOR((C_DATA_WIDTH/8)-1 DOWNTO 0):=(OTHERS=>'0'); -- RX strobe byte enables
94
      M_AXIS_RX_TLAST   : OUT STD_LOGIC                                  :='0';           -- RX data is last
95
      M_AXIS_RX_TUSER   : OUT STD_LOGIC_VECTOR(21 DOWNTO 0)              :=(OTHERS=>'0'); -- RX user signals
96
      -------------------------------------------------
97
      -- PCIe Block I/O                              --
98
      -------------------------------------------------
99
      -- TRN RX
100
      -------------
101
      TRN_RD            : IN STD_LOGIC_VECTOR(C_DATA_WIDTH - 1 DOWNTO 0) :=(OTHERS=>'0');   -- RX data from block
102
      TRN_RSOF          : IN STD_LOGIC                                   :='0';             -- RX start of packet
103
      TRN_REOF          : IN STD_LOGIC                                   :='0';             -- RX end of packet
104
      TRN_RSRC_RDY      : IN STD_LOGIC                                   :='0';             -- RX source ready
105
      TRN_RDST_RDY      : OUT STD_LOGIC                                  :='0';             -- RX destination ready
106
      TRN_RSRC_DSC      : IN STD_LOGIC                                   :='0';             -- RX source discontinue
107
      TRN_RREM          : IN STD_LOGIC_VECTOR(C_REM_WIDTH - 1 DOWNTO 0)  :=(OTHERS=>'0');   -- RX remainder
108
      TRN_RERRFWD       : IN STD_LOGIC                                   :='0';             -- RX error forward
109
      TRN_RBAR_HIT      : IN STD_LOGIC_VECTOR(6 DOWNTO 0) :=(OTHERS=>'0');   -- RX BAR hit
110
      TRN_RECRC_ERR     : IN STD_LOGIC                                   :='0';             -- RX ECRC error
111
 
112
      -- System
113
      -------------
114
      NP_COUNTER        : OUT STD_LOGIC_VECTOR(2 DOWNTO 0)               :=(OTHERS=>'0');   -- Non-posted counter
115
      USER_CLK          : IN STD_LOGIC                                   :='0';             -- user clock from block
116
      USER_RST          : IN STD_LOGIC                                   :='0'              -- user reset from block
117
   );
118
END cl_a7pcie_x4_axi_basic_rx;
119
 
120
-------------------------------------------------
121
  -- RX Data Pipeline                            --
122
  -------------------------------------------------
123
 
124
 
125
ARCHITECTURE TRANS OF cl_a7pcie_x4_axi_basic_rx IS
126
 
127
   SIGNAL null_rx_tvalid         : STD_LOGIC;
128
   SIGNAL null_rx_tlast          : STD_LOGIC;
129
   SIGNAL null_rx_tkeep          : STD_LOGIC_VECTOR((C_DATA_WIDTH/8)-1  DOWNTO 0);
130
   SIGNAL null_rdst_rdy          : STD_LOGIC;
131
   SIGNAL null_is_eof            : STD_LOGIC_VECTOR(4 DOWNTO 0);
132
 
133
   -- Declare intermediate signals for referenced outputs
134
   SIGNAL m_axis_rx_tdata_xhdl0  : STD_LOGIC_VECTOR(C_DATA_WIDTH - 1 DOWNTO 0);
135
   SIGNAL m_axis_rx_tvalid_xhdl4 : STD_LOGIC;
136
   SIGNAL m_axis_rx_tkeep_xhdl2  : STD_LOGIC_VECTOR((C_DATA_WIDTH/8)-1 DOWNTO 0);
137
   SIGNAL m_axis_rx_tlast_xhdl1  : STD_LOGIC;
138
   SIGNAL m_axis_rx_tuser_xhdl3  : STD_LOGIC_VECTOR(21 DOWNTO 0);
139
   SIGNAL trn_rdst_rdy_xhdl6     : STD_LOGIC;
140
   SIGNAL np_counter_xhdl5       : STD_LOGIC_VECTOR(2 DOWNTO 0);
141
 
142
   COMPONENT cl_a7pcie_x4_axi_basic_rx_null_gen IS
143
   GENERIC (
144
      C_DATA_WIDTH            : INTEGER := 128;
145
      TCQ                     : INTEGER := 1
146
   );
147
   PORT (
148
      M_AXIS_RX_TDATA         : IN STD_LOGIC_VECTOR(C_DATA_WIDTH - 1 DOWNTO 0)  := (OTHERS=>'0');
149
      M_AXIS_RX_TVALID        : IN STD_LOGIC                                    := '0';
150
      M_AXIS_RX_TREADY        : IN STD_LOGIC                                    := '0';
151
      M_AXIS_RX_TLAST         : IN STD_LOGIC                                    := '0';
152
      M_AXIS_RX_TUSER         : IN STD_LOGIC_VECTOR(21 DOWNTO 0)                := (OTHERS=>'0');
153
 
154
      NULL_RX_TVALID          : OUT STD_LOGIC                                   := '0';
155
      NULL_RX_TLAST           : OUT STD_LOGIC                                   := '0';
156
      NULL_RX_tkeep           : OUT STD_LOGIC_VECTOR((C_DATA_WIDTH/8)-1 DOWNTO 0) := (OTHERS=>'0');
157
      NULL_RDST_RDY           : OUT STD_LOGIC                                   := '0';
158
      NULL_IS_EOF             : OUT STD_LOGIC_VECTOR(4 DOWNTO 0)                := (OTHERS=>'0');
159
 
160
      USER_CLK                : IN STD_LOGIC                                    := '0';
161
      USER_RST                : IN STD_LOGIC                                    := '0'
162
   );
163
END COMPONENT cl_a7pcie_x4_axi_basic_rx_null_gen;
164
 
165
  -------------------------------------------------
166
  -- RX Data Pipeline                            --
167
  -------------------------------------------------
168
   COMPONENT cl_a7pcie_x4_axi_basic_rx_pipeline IS
169
   GENERIC (
170
      C_DATA_WIDTH            : INTEGER := 128;
171
      C_FAMILY                : STRING := "X7";
172
      TCQ                     : INTEGER := 1;
173
 
174
      C_REM_WIDTH             : INTEGER := 1
175
   );
176
   PORT (
177
 
178
      M_AXIS_RX_TDATA         : OUT STD_LOGIC_VECTOR(C_DATA_WIDTH - 1 DOWNTO 0)   := (OTHERS=>'0');
179
      M_AXIS_RX_TVALID        : OUT STD_LOGIC                                     := '0';
180
      M_AXIS_RX_TREADY        : IN STD_LOGIC                                      := '0';
181
      m_axis_rx_tkeep         : OUT STD_LOGIC_VECTOR((C_DATA_WIDTH/8)-1 DOWNTO 0)   := (OTHERS=>'0');
182
      M_AXIS_RX_TLAST         : OUT STD_LOGIC                                     := '0';
183
      M_AXIS_RX_TUSER         : OUT STD_LOGIC_VECTOR(21 DOWNTO 0)                 := (OTHERS=>'0');
184
 
185
      TRN_RD                  : IN STD_LOGIC_VECTOR(C_DATA_WIDTH - 1 DOWNTO 0)    := (OTHERS=>'0');
186
      TRN_RSOF                : IN STD_LOGIC                                      := '0';
187
      TRN_REOF                : IN STD_LOGIC                                      := '0';
188
      TRN_RSRC_RDY            : IN STD_LOGIC                                      := '0';
189
      TRN_RDST_RDY            : OUT STD_LOGIC                                     := '0';
190
      TRN_RSRC_DSC            : IN STD_LOGIC                                      := '0';
191
      TRN_RREM                : IN STD_LOGIC_VECTOR(C_REM_WIDTH - 1 DOWNTO 0)     := (OTHERS=>'0');
192
      TRN_RERRFWD             : IN STD_LOGIC                                      := '0';
193
      TRN_RBAR_HIT            : IN STD_LOGIC_VECTOR(6 DOWNTO 0)                   := (OTHERS=>'0');
194
      TRN_RECRC_ERR           : IN STD_LOGIC                                      := '0';
195
 
196
      NULL_RX_TVALID          : IN STD_LOGIC                                      := '0';
197
      NULL_RX_TLAST           : IN STD_LOGIC                                      := '0';
198
      NULL_RX_tkeep           : IN STD_LOGIC_VECTOR((C_DATA_WIDTH/8)-1 DOWNTO 0)    := (OTHERS=>'0') ;
199
      NULL_RDST_RDY           : IN STD_LOGIC                                      := '0';
200
      NULL_IS_EOF             : IN STD_LOGIC_VECTOR(4 DOWNTO 0)                   := (OTHERS=>'0');
201
 
202
      NP_COUNTER              : OUT STD_LOGIC_VECTOR(2 DOWNTO 0)                  :=(OTHERS=>'0');
203
      USER_CLK                : IN STD_LOGIC                                      :='0';
204
      USER_RST                : IN STD_LOGIC                                      :='0'
205
   );
206
END COMPONENT cl_a7pcie_x4_axi_basic_rx_pipeline;
207
BEGIN
208
   -- Drive referenced outputs
209
   M_AXIS_RX_TDATA     <= m_axis_rx_tdata_xhdl0;
210
   M_AXIS_RX_TVALID    <= m_axis_rx_tvalid_xhdl4;
211
   m_axis_rx_tkeep     <= m_axis_rx_tkeep_xhdl2;
212
   M_AXIS_RX_TLAST     <= m_axis_rx_tlast_xhdl1;
213
   M_AXIS_RX_TUSER     <= m_axis_rx_tuser_xhdl3;
214
   TRN_RDST_RDY        <= trn_rdst_rdy_xhdl6;
215
   NP_COUNTER          <= np_counter_xhdl5;
216
 
217
 
218
   rx_pipeline_inst : cl_a7pcie_x4_axi_basic_rx_pipeline
219
      GENERIC MAP (
220
         C_DATA_WIDTH    => C_DATA_WIDTH,
221
         C_FAMILY        => C_FAMILY,
222
         TCQ             => TCQ,
223
         C_REM_WIDTH     => C_REM_WIDTH
224
      )
225
      PORT MAP (
226
 
227
         ----------------------
228
         -- Outgoing AXI TX
229
         ----------------------
230
         M_AXIS_RX_TDATA   => m_axis_rx_tdata_xhdl0,
231
         M_AXIS_RX_TVALID  => m_axis_rx_tvalid_xhdl4,
232
         M_AXIS_RX_TREADY  => M_AXIS_RX_TREADY,
233
         m_axis_rx_tkeep   => m_axis_rx_tkeep_xhdl2,
234
         M_AXIS_RX_TLAST   => m_axis_rx_tlast_xhdl1,
235
         M_AXIS_RX_TUSER   => m_axis_rx_tuser_xhdl3,
236
 
237
         ----------------------
238
          -- Incoming TRN RX
239
         ----------------------
240
         TRN_RD            => TRN_RD,
241
         TRN_RSOF          => TRN_RSOF,
242
         TRN_REOF          => TRN_REOF,
243
         TRN_RSRC_RDY      => TRN_RSRC_RDY,
244
         TRN_RDST_RDY      => trn_rdst_rdy_xhdl6,
245
         TRN_RSRC_DSC      => TRN_RSRC_DSC,
246
         TRN_RREM          => TRN_RREM,
247
         TRN_RERRFWD       => TRN_RERRFWD,
248
         TRN_RBAR_HIT      => TRN_RBAR_HIT,
249
         TRN_RECRC_ERR     => TRN_RECRC_ERR,
250
 
251
         ----------------------
252
          -- Null Inputs
253
         ----------------------
254
         NULL_RX_TVALID    => null_rx_tvalid,
255
         NULL_RX_TLAST     => null_rx_tlast,
256
         NULL_RX_tkeep     => null_rx_tkeep,
257
         NULL_RDST_RDY     => null_rdst_rdy,
258
         NULL_IS_EOF       => null_is_eof,
259
 
260
         ----------------------
261
         -- System
262
         ----------------------
263
         NP_COUNTER        => np_counter_xhdl5,
264
         USER_CLK          => USER_CLK,
265
         USER_RST          => USER_RST
266
      );
267
 
268
 
269
 
270
   rx_null_gen_inst : cl_a7pcie_x4_axi_basic_rx_null_gen
271
      GENERIC MAP (
272
         C_DATA_WIDTH      => C_DATA_WIDTH,
273
         TCQ               => TCQ
274
      )
275
      PORT MAP (
276
         ----------------------
277
         -- Inputs
278
         ----------------------
279
         M_AXIS_RX_TDATA   => m_axis_rx_tdata_xhdl0,
280
         M_AXIS_RX_TVALID  => m_axis_rx_tvalid_xhdl4,
281
         M_AXIS_RX_TREADY  => M_AXIS_RX_TREADY,
282
         M_AXIS_RX_TLAST   => m_axis_rx_tlast_xhdl1,
283
         M_AXIS_RX_TUSER   => m_axis_rx_tuser_xhdl3,
284
 
285
         ----------------------
286
          -- Null Outputs
287
         ----------------------
288
         NULL_RX_TVALID    => null_rx_tvalid,
289
         NULL_RX_TLAST     => null_rx_tlast,
290
         NULL_RX_tkeep     => null_rx_tkeep,
291
         NULL_RDST_RDY     => null_rdst_rdy,
292
         NULL_IS_EOF       => null_is_eof,
293
 
294
         ----------------------
295
         -- System
296
         ----------------------
297
         USER_CLK          => USER_CLK,
298
         USER_RST          => USER_RST
299
      );
300
 
301
END TRANS;

powered by: WebSVN 2.1.0

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