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/] [pcie_soft_int.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dsmv
 
2
//-----------------------------------------------------------------------------
3
//
4
// (c) Copyright 2009-2010 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    : V5-Block Plus for PCI Express
52
// File       : pcie_soft_int.v
53
//--------------------------------------------------------------------------------
54
//--------------------------------------------------------------------------------
55
//--
56
//-- Description: PCIe Interrupt Module Wrapper for Softcore CMM32 Interrupt
57
//--    module
58
//--
59
//--
60
//--
61
//------------------------------------------------------------------------------
62
 
63
`timescale 1ns/1ns
64
 
65
`ifndef Tcq
66
   `define Tcq 1
67
`endif
68
 
69
module pcie_soft_cf_int
70
(
71
       // Clock and reset
72
 
73
       input wire         clk,
74
       input wire         rst_n,
75
 
76
 
77
 
78
 
79
       input  wire        cs_is_intr,
80
       input  wire        grant,
81
       input  wire [31:0] cfg_msguaddr,
82
 
83
       // PCIe Block Interrupt Ports
84
 
85
       input  wire        msi_enable,
86
       output      [3:0]  msi_request,
87
       output wire        legacy_int_request,
88
 
89
       // LocalLink Interrupt Ports
90
 
91
       input  wire        cfg_interrupt_n,
92
       output wire        cfg_interrupt_rdy_n,
93
 
94
 
95
       // NEWINTERRUPT signals
96
       input wire          msi_8bit_en,
97
 
98
       input wire         cfg_interrupt_assert_n,
99
       input wire   [7:0] cfg_interrupt_di,
100
       output       [2:0] cfg_interrupt_mmenable,
101
       output       [7:0] cfg_interrupt_do,
102
       output             cfg_interrupt_msienable,
103
       input wire [31:0]  msi_laddr,
104
       input wire [31:0]  msi_haddr,
105
 
106
       input wire [15:0]  cfg_command,
107
       input wire [15:0]  cfg_msgctrl,
108
       input wire [15:0]  cfg_msgdata,
109
 
110
       // To Arb
111
       output wire        signaledint,
112
       output wire        intr_req_valid,
113
       output wire  [1:0] intr_req_type,
114
       output wire  [7:0] intr_vector
115
 
116
);
117
 
118
 
119
wire intr_rdy;
120
 
121
 
122
 
123
assign cfg_interrupt_rdy_n = ~intr_rdy;
124
 
125
assign cfg_interrupt_msienable = cfg_msgctrl[0]; // adr 0x48
126
assign legacy_int_request = 0;             // tied low to disable in block
127
                                           // legacy will be generated manually
128
assign msi_request = 4'd0;                 // tied low per ug197
129
 
130
assign cfg_interrupt_mmenable = cfg_msgctrl[6:4]; // MSI Cap Structure
131
assign cfg_interrupt_do = cfg_msgdata[7:0];       // MSI Message Data
132
 
133
 
134
// Interrupt controller from softcore
135
  cmm_intr u_cmm_intr (
136
      .clk                           (clk)
137
     ,.rst                           (~rst_n)
138
     ,.signaledint                   (signaledint)            // O
139
     ,.intr_req_valid                (intr_req_valid)         // O 
140
     ,.intr_req_type                 (intr_req_type)          // O [1:0]
141
     ,.intr_rdy                      (intr_rdy)    // O
142
     ,.cfg_interrupt_n               (cfg_interrupt_n)        // I [7:0]
143
 
144
     ,.cfg_interrupt_assert_n        (cfg_interrupt_assert_n) // I
145
     ,.cfg_interrupt_di              (cfg_interrupt_di)       // I [7:0]
146
     ,.cfg_interrupt_mmenable        (cfg_interrupt_mmenable) // I [2:0]
147
     //,.cfg_interrupt_mmenable        (3'b0) // I [2:0]
148
     ,.msi_data                      (cfg_msgdata)               // I[15:0]
149
     ,.intr_vector                   (intr_vector)            // O [7:0]
150
     ,.cfg                           ( {556'd0, msi_8bit_en ,467'd0} )            // I[1023:0] 
151
 
152
     ,.command                       (cfg_command)            // I [15:0]
153
     ,.msi_control                   (cfg_msgctrl)          // I [15:0]
154
     ,.msi_laddr                     (msi_laddr)              // I [31:0]
155
     ,.msi_haddr                     (msi_haddr)              // I [31:0]
156
     //,.intr_grant                    (grant)                  // I 
157
     ,.intr_grant                    (grant & cs_is_intr)                  // I 
158
        );
159
 
160
 
161
 
162
 
163
 
164
 
165
 
166
 
167
endmodule

powered by: WebSVN 2.1.0

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