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_pcie_pipe_lane.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_pcie_pipe_lane.vhd
52 48 dsmv
-- Version    : 1.10
53 46 dsmv
--
54
-- Description: PIPE per lane module for 7-Series PCIe Block
55
--
56
--
57
--
58
----------------------------------------------------------------------------------
59
 
60
library ieee;
61
use ieee.std_logic_1164.all;
62
 
63
entity cl_a7pcie_x4_pcie_pipe_lane is
64
  generic
65
  (
66
    PIPE_PIPELINE_STAGES : integer := 0    -- 0 - 0 stages, 1 - 1 stage, 2 - 2 stages
67
  );
68
  port
69
  (
70
    pipe_rx_char_is_k_o      :     out std_logic_vector( 1 downto 0);  -- Pipelined PIPE Rx Char Is K
71
    pipe_rx_data_o           :     out std_logic_vector(15 downto 0);  -- Pipelined PIPE Rx Data
72
    pipe_rx_valid_o          :     out std_logic;                      -- Pipelined PIPE Rx Data Valid
73
    pipe_rx_chanisaligned_o  :     out std_logic;                      -- Pipelined PIPE Rx Chan Is Aligned
74
    pipe_rx_status_o         :     out std_logic_vector( 2 downto 0);  -- Pipelined PIPE Rx Status
75
    pipe_rx_phy_status_o     :     out std_logic;                      -- Pipelined PIPE Rx Phy Status
76
    pipe_rx_elec_idle_o      :     out std_logic;                      -- Pipelined PIPE Rx Electrical Idle
77
    pipe_rx_polarity_i       :     in std_logic;                       -- PIPE Rx Polarity
78
    pipe_tx_compliance_i     :     in std_logic;                       -- PIPE Tx Compliance
79
    pipe_tx_char_is_k_i      :     in std_logic_vector( 1 downto 0);   -- PIPE Tx Char Is K
80
    pipe_tx_data_i           :     in std_logic_vector(15 downto 0);   -- PIPE Tx Data
81
    pipe_tx_elec_idle_i      :     in std_logic;                       -- PIPE Tx Electrical Idle
82
    pipe_tx_powerdown_i      :     in std_logic_vector( 1 downto 0);   -- PIPE Tx Powerdown
83
 
84
    pipe_rx_char_is_k_i      :     in std_logic_vector( 1 downto 0);   -- PIPE Rx Char Is K
85
    pipe_rx_data_i           :     in std_logic_vector(15 downto 0);   -- PIPE Rx Data
86
    pipe_rx_valid_i          :     in std_logic;                       -- PIPE Rx Data Valid
87
    pipe_rx_chanisaligned_i  :     in std_logic;                       -- PIPE Rx Chan Is Aligned
88
    pipe_rx_status_i         :     in std_logic_vector( 2 downto 0);   -- PIPE Rx Status
89
    pipe_rx_phy_status_i     :     in std_logic;                       -- PIPE Rx Phy Status
90
    pipe_rx_elec_idle_i      :     in std_logic;                       -- PIPE Rx Electrical Idle
91
    pipe_rx_polarity_o       :     out std_logic;                      -- Pipelined PIPE Rx Polarity
92
    pipe_tx_compliance_o     :     out std_logic;                      -- Pipelined PIPE Tx Compliance
93
    pipe_tx_char_is_k_o      :     out std_logic_vector( 1 downto 0);  -- Pipelined PIPE Tx Char Is K
94
    pipe_tx_data_o           :     out std_logic_vector(15 downto 0);  -- Pipelined PIPE Tx Data
95
    pipe_tx_elec_idle_o      :     out std_logic;                      -- Pipelined PIPE Tx Electrical
96
    pipe_tx_powerdown_o      :     out std_logic_vector( 1 downto 0);  -- Pipelined PIPE Tx Powerdown
97
 
98
    pipe_clk                 :     in std_logic;                       -- PIPE Clock
99
    rst_n                    :     in std_logic                        -- Reset
100
  );
101
end cl_a7pcie_x4_pcie_pipe_lane;
102
 
103
 
104
architecture rtl of cl_a7pcie_x4_pcie_pipe_lane is
105
 
106
  --******************************************************************--
107
  -- Reality check.                                                   --
108
  --******************************************************************--
109
  constant TCQ     : integer := 1;
110
  signal pipe_rx_char_is_k_q                      : std_logic_vector(1 downto 0);
111
  signal pipe_rx_data_q                           : std_logic_vector(15 downto 0);
112
  signal pipe_rx_valid_q                          : std_logic;
113
  signal pipe_rx_chanisaligned_q                  : std_logic;
114
  signal pipe_rx_status_q                         : std_logic_vector(2 downto 0);
115
  signal pipe_rx_phy_status_q                     : std_logic;
116
  signal pipe_rx_elec_idle_q                      : std_logic;
117
 
118
  signal pipe_rx_polarity_q                       : std_logic;
119
  signal pipe_tx_compliance_q                     : std_logic;
120
  signal pipe_tx_char_is_k_q                      : std_logic_vector(1 downto 0);
121
  signal pipe_tx_data_q                           : std_logic_vector(15 downto 0);
122
  signal pipe_tx_elec_idle_q                      : std_logic;
123
  signal pipe_tx_powerdown_q                      : std_logic_vector(1 downto 0);
124
 
125
  signal pipe_rx_char_is_k_qq                     : std_logic_vector(1 downto 0);
126
  signal pipe_rx_data_qq                          : std_logic_vector(15 downto 0);
127
  signal pipe_rx_valid_qq                         : std_logic;
128
  signal pipe_rx_chanisaligned_qq                 : std_logic;
129
  signal pipe_rx_status_qq                        : std_logic_vector(2 downto 0);
130
  signal pipe_rx_phy_status_qq                    : std_logic;
131
  signal pipe_rx_elec_idle_qq                     : std_logic;
132
 
133
  signal pipe_rx_polarity_qq                      : std_logic;
134
  signal pipe_tx_compliance_qq                    : std_logic;
135
  signal pipe_tx_char_is_k_qq                     : std_logic_vector(1 downto 0);
136
  signal pipe_tx_data_qq                          : std_logic_vector(15 downto 0);
137
  signal pipe_tx_elec_idle_qq                     : std_logic;
138
  signal pipe_tx_powerdown_qq                     : std_logic_vector(1 downto 0);
139
 
140
begin  -- rtl
141
 
142
  pipe_stages_0 : if (PIPE_PIPELINE_STAGES = 0) generate
143
 
144
    pipe_rx_char_is_k_o <= pipe_rx_char_is_k_i;
145
    pipe_rx_data_o <= pipe_rx_data_i;
146
    pipe_rx_valid_o <= pipe_rx_valid_i;
147
    pipe_rx_chanisaligned_o <= pipe_rx_chanisaligned_i;
148
    pipe_rx_status_o <= pipe_rx_status_i;
149
    pipe_rx_phy_status_o <= pipe_rx_phy_status_i;
150
    pipe_rx_elec_idle_o <= pipe_rx_elec_idle_i;
151
 
152
    pipe_rx_polarity_o <= pipe_rx_polarity_i;
153
    pipe_tx_compliance_o <= pipe_tx_compliance_i;
154
    pipe_tx_char_is_k_o <= pipe_tx_char_is_k_i;
155
    pipe_tx_data_o <= pipe_tx_data_i;
156
    pipe_tx_elec_idle_o <= pipe_tx_elec_idle_i;
157
    pipe_tx_powerdown_o <= pipe_tx_powerdown_i;
158
 
159
  end generate;  -- pipe_stages_0
160
 
161
  pipe_stages_1 : if (PIPE_PIPELINE_STAGES = 1) generate
162
 
163
    process (pipe_clk)
164
    begin
165
      if (pipe_clk'event and pipe_clk = '1') then
166
 
167
        if (rst_n = '1') then
168
 
169
          pipe_rx_char_is_k_q <= "00" after (TCQ)*1 ps;
170
          pipe_rx_data_q <= (others => '0') after (TCQ)*1 ps;
171
          pipe_rx_valid_q <= '0' after (TCQ)*1 ps;
172
          pipe_rx_chanisaligned_q <= '0' after (TCQ)*1 ps;
173
          pipe_rx_status_q <= "000" after (TCQ)*1 ps;
174
          pipe_rx_phy_status_q <= '0' after (TCQ)*1 ps;
175
 
176
          pipe_rx_elec_idle_q <= '0' after (TCQ)*1 ps;
177
          pipe_rx_polarity_q <= '0' after (TCQ)*1 ps;
178
          pipe_tx_compliance_q <= '0' after (TCQ)*1 ps;
179
          pipe_tx_char_is_k_q <= "00" after (TCQ)*1 ps;
180
          pipe_tx_data_q <= (others => '0') after (TCQ)*1 ps;
181
          pipe_tx_elec_idle_q <= '1' after (TCQ)*1 ps;
182
          pipe_tx_powerdown_q <= "10" after (TCQ)*1 ps;
183
 
184
        else
185
 
186
          pipe_rx_char_is_k_q <= pipe_rx_char_is_k_i after (TCQ)*1 ps;
187
          pipe_rx_data_q <= pipe_rx_data_i after (TCQ)*1 ps;
188
          pipe_rx_valid_q <= pipe_rx_valid_i after (TCQ)*1 ps;
189
          pipe_rx_chanisaligned_q <= pipe_rx_chanisaligned_i after (TCQ)*1 ps;
190
          pipe_rx_status_q <= pipe_rx_status_i after (TCQ)*1 ps;
191
          pipe_rx_phy_status_q <= pipe_rx_phy_status_i after (TCQ)*1 ps;
192
 
193
          pipe_rx_elec_idle_q <= pipe_rx_elec_idle_i after (TCQ)*1 ps;
194
          pipe_rx_polarity_q <= pipe_rx_polarity_i after (TCQ)*1 ps;
195
          pipe_tx_compliance_q <= pipe_tx_compliance_i after (TCQ)*1 ps;
196
          pipe_tx_char_is_k_q <= pipe_tx_char_is_k_i after (TCQ)*1 ps;
197
          pipe_tx_data_q <= pipe_tx_data_i after (TCQ)*1 ps;
198
          pipe_tx_elec_idle_q <= pipe_tx_elec_idle_i after (TCQ)*1 ps;
199
          pipe_tx_powerdown_q <= pipe_tx_powerdown_i after (TCQ)*1 ps;
200
 
201
        end if;
202
      end if;
203
    end process;
204
 
205
    pipe_rx_char_is_k_o <= pipe_rx_char_is_k_q;
206
    pipe_rx_data_o <= pipe_rx_data_q;
207
    pipe_rx_valid_o <= pipe_rx_valid_q;
208
    pipe_rx_chanisaligned_o <= pipe_rx_chanisaligned_q;
209
    pipe_rx_status_o <= pipe_rx_status_q;
210
    pipe_rx_phy_status_o <= pipe_rx_phy_status_q;
211
    pipe_rx_elec_idle_o <= pipe_rx_elec_idle_q;
212
 
213
    pipe_rx_polarity_o <= pipe_rx_polarity_q;
214
    pipe_tx_compliance_o <= pipe_tx_compliance_q;
215
    pipe_tx_char_is_k_o <= pipe_tx_char_is_k_q;
216
    pipe_tx_data_o <= pipe_tx_data_q;
217
    pipe_tx_elec_idle_o <= pipe_tx_elec_idle_q;
218
    pipe_tx_powerdown_o <= pipe_tx_powerdown_q;
219
 
220
  end generate;                         -- pipe_stages_1
221
 
222
  pipe_stages_2 : if (PIPE_PIPELINE_STAGES = 2) generate
223
 
224
    process (pipe_clk)
225
    begin
226
      if (pipe_clk'event and pipe_clk = '1') then
227
 
228
        if (rst_n = '1') then
229
 
230
          pipe_rx_char_is_k_q <= "00" after (TCQ)*1 ps;
231
          pipe_rx_data_q <= (others => '0') after (TCQ)*1 ps;
232
          pipe_rx_valid_q <= '0' after (TCQ)*1 ps;
233
          pipe_rx_chanisaligned_q <= '0' after (TCQ)*1 ps;
234
          pipe_rx_status_q <= "000" after (TCQ)*1 ps;
235
          pipe_rx_phy_status_q <= '0' after (TCQ)*1 ps;
236
 
237
          pipe_rx_elec_idle_q <= '0' after (TCQ)*1 ps;
238
          pipe_rx_polarity_q <= '0' after (TCQ)*1 ps;
239
          pipe_tx_compliance_q <= '0' after (TCQ)*1 ps;
240
          pipe_tx_char_is_k_q <= "00" after (TCQ)*1 ps;
241
          pipe_tx_data_q <= (others => '0') after (TCQ)*1 ps;
242
          pipe_tx_elec_idle_q <= '1' after (TCQ)*1 ps;
243
          pipe_tx_powerdown_q <= "10" after (TCQ)*1 ps;
244
 
245
          pipe_rx_char_is_k_qq <= "00" after (TCQ)*1 ps;
246
          pipe_rx_data_qq <= (others => '0') after (TCQ)*1 ps;
247
          pipe_rx_valid_qq <= '0' after (TCQ)*1 ps;
248
          pipe_rx_chanisaligned_qq <= '0' after (TCQ)*1 ps;
249
          pipe_rx_status_qq <= "000" after (TCQ)*1 ps;
250
          pipe_rx_phy_status_qq <= '0' after (TCQ)*1 ps;
251
 
252
          pipe_rx_elec_idle_qq <= '0' after (TCQ)*1 ps;
253
          pipe_rx_polarity_qq <= '0' after (TCQ)*1 ps;
254
          pipe_tx_compliance_qq <= '0' after (TCQ)*1 ps;
255
          pipe_tx_char_is_k_qq <= "00" after (TCQ)*1 ps;
256
          pipe_tx_data_qq <= (others => '0') after (TCQ)*1 ps;
257
          pipe_tx_elec_idle_qq <= '1' after (TCQ)*1 ps;
258
          pipe_tx_powerdown_qq <= "10" after (TCQ)*1 ps;
259
        else
260
 
261
          pipe_rx_char_is_k_q <= pipe_rx_char_is_k_i after (TCQ)*1 ps;
262
          pipe_rx_data_q <= pipe_rx_data_i after (TCQ)*1 ps;
263
          pipe_rx_valid_q <= pipe_rx_valid_i after (TCQ)*1 ps;
264
          pipe_rx_chanisaligned_q <= pipe_rx_chanisaligned_i after (TCQ)*1 ps;
265
          pipe_rx_status_q <= pipe_rx_status_i after (TCQ)*1 ps;
266
          pipe_rx_phy_status_q <= pipe_rx_phy_status_i after (TCQ)*1 ps;
267
 
268
          pipe_rx_elec_idle_q <= pipe_rx_elec_idle_i after (TCQ)*1 ps;
269
          pipe_rx_polarity_q <= pipe_rx_polarity_i after (TCQ)*1 ps;
270
          pipe_tx_compliance_q <= pipe_tx_compliance_i after (TCQ)*1 ps;
271
          pipe_tx_char_is_k_q <= pipe_tx_char_is_k_i after (TCQ)*1 ps;
272
          pipe_tx_data_q <= pipe_tx_data_i after (TCQ)*1 ps;
273
          pipe_tx_elec_idle_q <= pipe_tx_elec_idle_i after (TCQ)*1 ps;
274
          pipe_tx_powerdown_q <= pipe_tx_powerdown_i after (TCQ)*1 ps;
275
 
276
          pipe_rx_char_is_k_qq <= pipe_rx_char_is_k_q after (TCQ)*1 ps;
277
          pipe_rx_data_qq <= pipe_rx_data_q after (TCQ)*1 ps;
278
          pipe_rx_valid_qq <= pipe_rx_valid_q after (TCQ)*1 ps;
279
          pipe_rx_chanisaligned_qq <= pipe_rx_chanisaligned_q after (TCQ)*1 ps;
280
          pipe_rx_status_qq <= pipe_rx_status_q after (TCQ)*1 ps;
281
          pipe_rx_phy_status_qq <= pipe_rx_phy_status_q after (TCQ)*1 ps;
282
 
283
          pipe_rx_elec_idle_qq <= pipe_rx_elec_idle_q after (TCQ)*1 ps;
284
          pipe_rx_polarity_qq <= pipe_rx_polarity_q after (TCQ)*1 ps;
285
          pipe_tx_compliance_qq <= pipe_tx_compliance_q after (TCQ)*1 ps;
286
          pipe_tx_char_is_k_qq <= pipe_tx_char_is_k_q after (TCQ)*1 ps;
287
          pipe_tx_data_qq <= pipe_tx_data_q after (TCQ)*1 ps;
288
          pipe_tx_elec_idle_qq <= pipe_tx_elec_idle_q after (TCQ)*1 ps;
289
          pipe_tx_powerdown_qq <= pipe_tx_powerdown_q after (TCQ)*1 ps;
290
        end if;
291
      end if;
292
    end process;
293
 
294
    pipe_rx_char_is_k_o <= pipe_rx_char_is_k_qq;
295
    pipe_rx_data_o <= pipe_rx_data_qq;
296
    pipe_rx_valid_o <= pipe_rx_valid_qq;
297
    pipe_rx_chanisaligned_o <= pipe_rx_chanisaligned_qq;
298
    pipe_rx_status_o <= pipe_rx_status_qq;
299
    pipe_rx_phy_status_o <= pipe_rx_phy_status_qq;
300
    pipe_rx_elec_idle_o <= pipe_rx_elec_idle_qq;
301
 
302
    pipe_rx_polarity_o <= pipe_rx_polarity_qq;
303
    pipe_tx_compliance_o <= pipe_tx_compliance_qq;
304
    pipe_tx_char_is_k_o <= pipe_tx_char_is_k_qq;
305
    pipe_tx_data_o <= pipe_tx_data_qq;
306
    pipe_tx_elec_idle_o <= pipe_tx_elec_idle_qq;
307
    pipe_tx_powerdown_o <= pipe_tx_powerdown_qq;
308
 
309
  end generate;                         -- pipe_stages_2
310
 
311
end rtl;
312
 

powered by: WebSVN 2.1.0

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