1 //////////////////////////////////////////////////////////////////////
3 //// File name: pci_rst_int.v ////
5 //// This file is part of the "PCI bridge" project ////
6 //// http://www.opencores.org/cores/pci/ ////
9 //// - Tadej Markovic, tadej@opencores.org ////
11 //// All additional information is avaliable in the README.txt ////
15 //////////////////////////////////////////////////////////////////////
17 //// Copyright (C) 2000 Tadej Markovic, tadej@opencores.org ////
19 //// This source file may be used and distributed without ////
20 //// restriction provided that this copyright statement is not ////
21 //// removed from the file and that any derivative work contains ////
22 //// the original copyright notice and the associated disclaimer. ////
24 //// This source file is free software; you can redistribute it ////
25 //// and/or modify it under the terms of the GNU Lesser General ////
26 //// Public License as published by the Free Software Foundation; ////
27 //// either version 2.1 of the License, or (at your option) any ////
28 //// later version. ////
30 //// This source is distributed in the hope that it will be ////
31 //// useful, but WITHOUT ANY WARRANTY; without even the implied ////
32 //// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
33 //// PURPOSE. See the GNU Lesser General Public License for more ////
36 //// You should have received a copy of the GNU Lesser General ////
37 //// Public License along with this source; if not, download it ////
38 //// from http://www.opencores.org/lgpl.shtml ////
40 //////////////////////////////////////////////////////////////////////
42 // CVS Revision History
44 // $Log: pci_rst_int.v,v $
45 // Revision 1.1 2007-03-20 17:50:56 sithglan
48 // Revision 1.3 2003/12/19 11:11:30 mihad
49 // Compact PCI Hot Swap support added.
50 // New testcases added.
51 // Specification updated.
52 // Test application changed to support WB B3 cycles.
54 // Revision 1.2 2003/01/27 16:49:31 mihad
55 // Changed module and file names. Updated scripts accordingly. FIFO synchronizations changed.
57 // Revision 1.1 2002/02/01 14:43:31 mihad
58 // *** empty log message ***
63 `include "pci_constants.v"
65 // synopsys translate_off
66 `include "timescale.v"
67 // synopsys translate_on
69 // Module is used to switch appropriate reset and interrupt signals with few logic
88 conf_isr_int_prop_out,
93 // RESET inputs and outputs
96 input conf_soft_res_in;
99 output pci_rstn_en_out;
102 // INTERRUPT inputs and outputs
106 output pci_intan_out;
107 output pci_intan_en_out;
109 output conf_isr_int_prop_out;
111 input init_complete_in ;
113 /*--------------------------------------------------------------------------------------------------------
115 --------------------------------------------------------------------------------------------------------*/
116 assign pci_rstn_out = 1'b0 ;
117 // host implementation of the bridge gets its reset from WISHBONE bus - RST_I and propagates it to PCI bus
119 assign reset = rst_i ;
121 assign pci_rstn_en_out = ~(rst_i || conf_soft_res_in) ;
123 assign pci_rstn_en_out = rst_i || conf_soft_res_in ;
125 assign rst_o = 1'b0 ;
127 // guest implementation of the bridge gets its reset from PCI bus - RST# and propagates it to WISHBONE bus
129 assign reset = ~pci_rstn_in ;
130 assign rst_o = (~pci_rstn_in) || conf_soft_res_in ;
132 assign pci_rstn_en_out = 1'b1 ; // disabled
134 assign pci_rstn_en_out = 1'b0 ; // disabled
139 /*--------------------------------------------------------------------------------------------------------
141 --------------------------------------------------------------------------------------------------------*/
142 assign pci_intan_out = 1'b0 ;
143 // host implementation of the bridge gets its interrupt from PCI bus - INTA# and propagates it to WISHBONE bus
145 assign conf_isr_int_prop_out = ~pci_intan_in ;
146 assign int_o = conf_int_in ;
148 assign pci_intan_en_out = 1'b1 ; // disabled
150 assign pci_intan_en_out = 1'b0 ; // disabled
153 // guest implementation of the bridge gets its interrupt from WISHBONE bus - INT_I and propagates it to PCI bus
161 .en_en_in ( init_complete_in ),
162 .dat_in ( 1'b0 ) , // active low
163 .en_in ( conf_int_in ) ,
164 .en_out ( interrupt_a_en ),
167 assign conf_isr_int_prop_out = int_i ;
168 assign int_o = 1'b0 ;
169 assign pci_intan_en_out = interrupt_a_en ;