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_7_x4/] [example_design/] [PIO.v] - Blame information for rev 13

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 barabba
 
2
//-----------------------------------------------------------------------------
3
//
4
// (c) Copyright 2009-2011 Xilinx, Inc. All rights reserved.
5
//
6
// This file contains confidential and proprietary information
7
// of Xilinx, Inc. and is protected under U.S. and
8
// international copyright and other intellectual property
9
// laws.
10
//
11
// DISCLAIMER
12
// This disclaimer is not a license and does not grant any
13
// rights to the materials distributed herewith. Except as
14
// otherwise provided in a valid license issued to you by
15
// Xilinx, and to the maximum extent permitted by applicable
16
// law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
17
// WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
18
// AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
19
// BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
20
// INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
21
// (2) Xilinx shall not be liable (whether in contract or tort,
22
// including negligence, or under any other theory of
23
// liability) for any loss or damage of any kind or nature
24
// related to, arising under or in connection with these
25
// materials, including for any direct, or any indirect,
26
// special, incidental, or consequential loss or damage
27
// (including loss of data, profits, goodwill, or any type of
28
// loss or damage suffered as a result of any action brought
29
// by a third party) even if such damage or loss was
30
// reasonably foreseeable or Xilinx had been advised of the
31
// possibility of the same.
32
//
33
// CRITICAL APPLICATIONS
34
// Xilinx products are not designed or intended to be fail-
35
// safe, or for use in any application requiring fail-safe
36
// performance, such as life-support or safety devices or
37
// systems, Class III medical devices, nuclear facilities,
38
// applications related to the deployment of airbags, or any
39
// other applications that could lead to death, personal
40
// injury, or severe property or environmental damage
41
// (individually and collectively, "Critical
42
// Applications"). Customer assumes the sole risk and
43
// liability of any use of Xilinx products in Critical
44
// Applications, subject only to applicable laws and
45
// regulations governing limitations on product liability.
46
//
47
// THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
48
// PART OF THIS FILE AT ALL TIMES.
49
//
50
//-----------------------------------------------------------------------------
51
// Project    : Virtex-6 Integrated Block for PCI Express
52
// File       : PIO.v
53
// Version    : 1.7
54
//
55
// Description:  Programmed I/O module. Design implements 8 KBytes of programmable
56
//--              memory space. Host processor can access this memory space using
57
//--              Memory Read 32 and Memory Write 32 TLPs. Design accepts 
58
//--              1 Double Word (DW) payload length on Memory Write 32 TLP and
59
//--              responds to 1 DW length Memory Read 32 TLPs with a Completion
60
//--              with Data TLP (1DW payload).
61
//--
62
//--              The module designed to operate with 32 bit and 64 bit interfaces.
63
//--
64
//--------------------------------------------------------------------------------
65
 
66
`timescale 1ns/1ns
67
 
68
module PIO (
69
 
70
                  trn_clk,
71
                  trn_reset_n,
72
                  trn_lnk_up_n,
73
 
74
                  trn_td,
75
`ifndef PIO_32
76
                  trn_trem_n,
77
`endif // not PIO_32
78
                  trn_tsof_n,
79
                  trn_teof_n,
80
                  trn_tsrc_rdy_n,
81
                  trn_tsrc_dsc_n,
82
                  trn_tdst_rdy_n,
83
                  trn_tdst_dsc_n,
84
 
85
                  trn_rd,
86
`ifndef PIO_32
87
                  trn_rrem_n,
88
`endif // not PIO_32
89
                  trn_rsof_n,
90
                  trn_reof_n,
91
                  trn_rsrc_rdy_n,
92
                  trn_rsrc_dsc_n,
93
                  trn_rbar_hit_n,
94
                  trn_rdst_rdy_n,
95
 
96
 
97
                  cfg_to_turnoff_n,
98
                  cfg_turnoff_ok_n,
99
 
100
                  cfg_completer_id,
101
                  cfg_bus_mstr_enable
102
 
103
                  ); // synthesis syn_hier = "hard"
104
 
105
 
106
    ///////////////////////////////////////////////////////////////////////////////
107
    // Port Declarations
108
    ///////////////////////////////////////////////////////////////////////////////
109
 
110
    input         trn_clk;
111
    input         trn_reset_n;
112
    input         trn_lnk_up_n;
113
 
114
 
115
`ifdef PIO_64
116
    output [63:0] trn_td;
117
    output [7:0]  trn_trem_n;
118
`else // PIO_64
119
   `ifdef PIO_128
120
       output [127:0] trn_td;
121
       output [1:0]  trn_trem_n;
122
   `else
123
       output [31:0] trn_td;
124
   `endif
125
`endif // PIO_64
126
    output        trn_tsof_n;
127
    output        trn_teof_n;
128
    output        trn_tsrc_rdy_n;
129
    output        trn_tsrc_dsc_n;
130
    input         trn_tdst_rdy_n;
131
    input         trn_tdst_dsc_n;
132
 
133
`ifdef PIO_64
134
    input [63:0]  trn_rd;
135
    input [7:0]   trn_rrem_n;
136
`else // PIO_64
137
   `ifdef PIO_128
138
       input [127:0]  trn_rd;
139
       input [1:0]   trn_rrem_n;
140
   `else
141
       input [31:0]  trn_rd;
142
   `endif
143
`endif // PIO_64
144
    input         trn_rsof_n;
145
    input         trn_reof_n;
146
    input         trn_rsrc_rdy_n;
147
    input         trn_rsrc_dsc_n;
148
    input [6:0]   trn_rbar_hit_n;
149
    output        trn_rdst_rdy_n;
150
 
151
    input         cfg_to_turnoff_n;
152
    output        cfg_turnoff_ok_n;
153
 
154
    input [15:0]  cfg_completer_id;
155
    input         cfg_bus_mstr_enable;
156
 
157
 
158
 
159
    // Local wires
160
 
161
    wire          req_compl;
162
    wire          compl_done;
163
    wire          pio_reset_n = ~trn_lnk_up_n;
164
 
165
 
166
    //
167
    // PIO instance
168
    //
169
 
170
    PIO_EP PIO_EP (
171
 
172
                        .clk  ( trn_clk ),                           // I
173
                        .rst_n ( pio_reset_n ),                      // I
174
 
175
                        .trn_td ( trn_td ),                          // O [63/31:0]
176
`ifndef PIO_32
177
                        .trn_trem_n ( trn_trem_n ),                  // O [7:0]
178
`endif // not PIO_32
179
                        .trn_tsof_n ( trn_tsof_n ),                  // O
180
                        .trn_teof_n ( trn_teof_n ),                  // O
181
                        .trn_tsrc_rdy_n ( trn_tsrc_rdy_n ),          // O
182
                        .trn_tsrc_dsc_n ( trn_tsrc_dsc_n ),          // O
183
                        .trn_tdst_rdy_n ( trn_tdst_rdy_n ),          // I
184
                        .trn_tdst_dsc_n ( trn_tdst_dsc_n ),          // I
185
 
186
                        .trn_rd ( trn_rd ),                          // I [63/31:0]
187
`ifndef PIO_32
188
                        .trn_rrem_n ( trn_rrem_n ),                  // I
189
`endif // not PIO_32
190
                        .trn_rsof_n ( trn_rsof_n ),                  // I
191
                        .trn_reof_n ( trn_reof_n ),                  // I
192
                        .trn_rsrc_rdy_n ( trn_rsrc_rdy_n ),          // I
193
                        .trn_rsrc_dsc_n ( trn_rsrc_dsc_n ),          // I
194
                        .trn_rbar_hit_n ( trn_rbar_hit_n ),          // I [6:0]
195
                        .trn_rdst_rdy_n ( trn_rdst_rdy_n ),          // O
196
 
197
                        .req_compl_o(req_compl),                     // O
198
                        .compl_done_o(compl_done),                   // O
199
 
200
                        .cfg_completer_id ( cfg_completer_id ),      // I [15:0]
201
                        .cfg_bus_mstr_enable ( cfg_bus_mstr_enable ) // I
202
 
203
                       );
204
 
205
 
206
    //
207
    // Turn-Off controller
208
    //
209
 
210
    PIO_TO_CTRL PIO_TO  (
211
 
212
                        .clk( trn_clk ),                             // I
213
                        .rst_n( pio_reset_n ),                       // I
214
 
215
                        .req_compl_i( req_compl ),                   // I
216
                        .compl_done_i( compl_done ),                 // I
217
 
218
                        .cfg_to_turnoff_n( cfg_to_turnoff_n ),       // I
219
                        .cfg_turnoff_ok_n( cfg_turnoff_ok_n )        // O
220
 
221
                       );
222
 
223
 
224
endmodule // PIO
225
 

powered by: WebSVN 2.1.0

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