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

Subversion Repositories pcie_sg_dma

[/] [pcie_sg_dma/] [branches/] [Virtex6/] [ML605_ISE13.3/] [ipcore_dir_ISE13.3/] [v6_pcie_v1_6/] [example_design/] [PIO_EP.v] - Blame information for rev 13

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 barabba
//-----------------------------------------------------------------------------
2
//
3
// (c) Copyright 2009-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    : Virtex-6 Integrated Block for PCI Express
51
// File       : PIO_EP.v
52
// Version    : 1.7
53
`ifndef SIMULATION
54
`include "PIO_64.v"
55
`else
56
`include "../../example_design/PIO_64.v"
57
`endif
58
//--
59
//-- Description: Endpoint Programmed I/O module.
60
//--
61
//--------------------------------------------------------------------------------
62
 
63
`timescale 1ns/1ns
64
 
65
module PIO_EP (
66
                        clk,
67
                        rst_n,
68
 
69
                        // LocalLink Tx
70
 
71
                        trn_td,
72
`ifndef PIO_32
73
                        trn_trem_n,
74
`endif // not PIO_32
75
                        trn_tsof_n,
76
                        trn_teof_n,
77
                        trn_tsrc_dsc_n,
78
                        trn_tsrc_rdy_n,
79
                        trn_tdst_dsc_n,
80
                        trn_tdst_rdy_n,
81
 
82
                        // LocalLink Rx
83
 
84
                        trn_rd,
85
`ifndef PIO_32
86
                        trn_rrem_n,
87
`endif // not PIO_32
88
                        trn_rsof_n,
89
                        trn_reof_n,
90
                        trn_rsrc_rdy_n,
91
                        trn_rsrc_dsc_n,
92
                        trn_rbar_hit_n,
93
                        trn_rdst_rdy_n,
94
 
95
                        // Turnoff access
96
 
97
                        req_compl_o,
98
                        compl_done_o,
99
 
100
                        // Configuration access
101
 
102
                        cfg_completer_id,
103
                        cfg_bus_mstr_enable
104
 
105
                       );
106
 
107
    input              clk;
108
    input              rst_n;
109
 
110
    // LocalLink Tx
111
 
112
`ifdef PIO_64
113
    output [63:0]     trn_td;
114
    output [7:0]      trn_trem_n;
115
`else // PIO_64
116
   `ifdef PIO_128
117
       output [127:0]    trn_td;
118
       output [1:0]      trn_trem_n;
119
   `else // PIO_128
120
       output [31:0]     trn_td;
121
   `endif
122
`endif // PIO_64
123
    output            trn_tsof_n;
124
    output            trn_teof_n;
125
    output            trn_tsrc_dsc_n;
126
    output            trn_tsrc_rdy_n;
127
    input             trn_tdst_dsc_n;
128
    input             trn_tdst_rdy_n;
129
 
130
    // LocalLink Rx
131
 
132
`ifdef PIO_64
133
    input [63:0]      trn_rd;
134
    input [7:0]       trn_rrem_n;
135
`else // PIO_64
136
   `ifdef PIO_128
137
       input [127:0]      trn_rd;
138
       input [1:0]       trn_rrem_n;
139
   `else
140
       input [31:0]      trn_rd;
141
   `endif
142
`endif // PIO_64
143
    input             trn_rsof_n;
144
    input             trn_reof_n;
145
    input             trn_rsrc_rdy_n;
146
    input [6:0]       trn_rbar_hit_n;
147
    input             trn_rsrc_dsc_n;
148
    output            trn_rdst_rdy_n;
149
 
150
    output            req_compl_o;
151
    output            compl_done_o;
152
 
153
    input [15:0]      cfg_completer_id;
154
    input             cfg_bus_mstr_enable;
155
 
156
 
157
    // Local wires
158
 
159
    wire  [10:0]      rd_addr;
160
    wire  [3:0]       rd_be;
161
    wire  [31:0]      rd_data;
162
 
163
    wire  [10:0]      wr_addr;
164
    wire  [7:0]       wr_be;
165
    wire  [31:0]      wr_data;
166
    wire              wr_en;
167
    wire              wr_busy;
168
 
169
    wire              req_compl;
170
    wire              compl_done;
171
 
172
    wire  [2:0]       req_tc;
173
    wire              req_td;
174
    wire              req_ep;
175
    wire  [1:0]       req_attr;
176
    wire  [9:0]       req_len;
177
    wire  [15:0]      req_rid;
178
    wire  [7:0]       req_tag;
179
    wire  [7:0]       req_be;
180
    wire  [12:0]      req_addr;
181
 
182
 
183
    //
184
    // ENDPOINT MEMORY : 8KB memory aperture implemented in FPGA BlockRAM(*)
185
    //
186
 
187
    PIO_EP_MEM_ACCESS EP_MEM (
188
 
189
                   .clk(clk),                           // I
190
                   .rst_n(rst_n),                       // I
191
 
192
                   // Read Port
193
 
194
                   .rd_addr_i(rd_addr),                 // I [10:0]
195
                   .rd_be_i(rd_be),                     // I [3:0]
196
                   .rd_data_o(rd_data),                 // O [31:0]
197
 
198
                   // Write Port
199
 
200
                   .wr_addr_i(wr_addr),                 // I [10:0]
201
                   .wr_be_i(wr_be),                     // I [7:0]
202
                   .wr_data_i(wr_data),                 // I [31:0]
203
                   .wr_en_i(wr_en),                     // I
204
                   .wr_busy_o(wr_busy)                  // O
205
 
206
                   );
207
 
208
    //
209
    // Local-Link Receive Controller
210
    //
211
 
212
    `PIO_RX_ENGINE EP_RX (
213
 
214
                   .clk(clk),                           // I
215
                   .rst_n(rst_n),                       // I
216
 
217
                   // LocalLink Rx
218
                   .trn_rd(trn_rd),                     // I [63/31:0]
219
`ifndef PIO_32
220
                   .trn_rrem_n(trn_rrem_n),             // I [7:0]
221
`endif // not PIO_32
222
                   .trn_rsof_n(trn_rsof_n),             // I
223
                   .trn_reof_n(trn_reof_n),             // I
224
                   .trn_rsrc_rdy_n(trn_rsrc_rdy_n),     // I
225
                   .trn_rsrc_dsc_n(trn_rsrc_dsc_n),     // I
226
                   .trn_rbar_hit_n(trn_rbar_hit_n),     // I [6:0]
227
                   .trn_rdst_rdy_n(trn_rdst_rdy_n),     // O
228
 
229
                   // Handshake with Tx engine
230
 
231
                   .req_compl_o(req_compl),             // O
232
                   .compl_done_i(compl_done),           // I
233
 
234
                   .req_tc_o(req_tc),                   // O [2:0]
235
                   .req_td_o(req_td),                   // O
236
                   .req_ep_o(req_ep),                   // O
237
                   .req_attr_o(req_attr),               // O [1:0]
238
                   .req_len_o(req_len),                 // O [9:0]
239
                   .req_rid_o(req_rid),                 // O [15:0]
240
                   .req_tag_o(req_tag),                 // O [7:0]
241
                   .req_be_o(req_be),                   // O [7:0]
242
                   .req_addr_o(req_addr),               // O [12:0]
243
 
244
                   // Memory Write Port
245
 
246
                   .wr_addr_o(wr_addr),                 // O [10:0]
247
                   .wr_be_o(wr_be),                     // O [7:0]
248
                   .wr_data_o(wr_data),                 // O [31:0]
249
                   .wr_en_o(wr_en),                     // O
250
                   .wr_busy_i(wr_busy)                  // I
251
 
252
                   );
253
 
254
    //
255
    // Local-Link Transmit Controller
256
    //
257
 
258
    `PIO_TX_ENGINE EP_TX (
259
 
260
                   .clk(clk),                         // I
261
                   .rst_n(rst_n),                     // I
262
 
263
                   // LocalLink Tx
264
                   .trn_td(trn_td),                   // O [63/31:0]
265
`ifndef PIO_32
266
                   .trn_trem_n(trn_trem_n),           // O [7:0]
267
`endif // not PIO_32
268
                   .trn_tsof_n(trn_tsof_n),           // O
269
                   .trn_teof_n(trn_teof_n),           // O
270
                   .trn_tsrc_dsc_n(trn_tsrc_dsc_n),   // O
271
                   .trn_tsrc_rdy_n(trn_tsrc_rdy_n),   // O
272
                   .trn_tdst_dsc_n(trn_tdst_dsc_n),   // I
273
                   .trn_tdst_rdy_n(trn_tdst_rdy_n),   // I
274
 
275
 
276
                   // Handshake with Rx engine
277
                   .req_compl_i(req_compl),           // I
278
                   .compl_done_o(compl_done),         // 0
279
 
280
                   .req_tc_i(req_tc),                 // I [2:0]
281
                   .req_td_i(req_td),                 // I
282
                   .req_ep_i(req_ep),                 // I
283
                   .req_attr_i(req_attr),             // I [1:0]
284
                   .req_len_i(req_len),               // I [9:0]
285
                   .req_rid_i(req_rid),               // I [15:0]
286
                   .req_tag_i(req_tag),               // I [7:0]
287
                   .req_be_i(req_be),                 // I [7:0]
288
                   .req_addr_i(req_addr),             // I [12:0]
289
 
290
                   // Read Port
291
 
292
                   .rd_addr_o(rd_addr),              // O [10:0]
293
                   .rd_be_o(rd_be),                  // O [3:0]
294
                   .rd_data_i(rd_data),              // I [31:0]
295
 
296
                   .completer_id_i(cfg_completer_id),          // I [15:0]
297
                   .cfg_bus_mstr_enable_i(cfg_bus_mstr_enable) // I
298
 
299
                   );
300
 
301
  assign req_compl_o  = req_compl;
302
  assign compl_done_o = compl_done;
303
 
304
endmodule // PIO_EP
305
 
306
 

powered by: WebSVN 2.1.0

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