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

Subversion Repositories pci

[/] [pci/] [tags/] [asyst_2/] [rtl/] [verilog/] [pci_rst_int.v] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 18 mihad
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  File name: pci_rst_int.v                                    ////
4
////                                                              ////
5
////  This file is part of the "PCI bridge" project               ////
6
////  http://www.opencores.org/cores/pci/                         ////
7
////                                                              ////
8
////  Author(s):                                                  ////
9
////      - Tadej Markovic, tadej@opencores.org                   ////
10
////                                                              ////
11
////  All additional information is avaliable in the README.txt   ////
12
////  file.                                                       ////
13
////                                                              ////
14
////                                                              ////
15
//////////////////////////////////////////////////////////////////////
16
////                                                              ////
17
//// Copyright (C) 2000 Tadej Markovic, tadej@opencores.org       ////
18
////                                                              ////
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. ////
23
////                                                              ////
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.                                               ////
29
////                                                              ////
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 ////
34
//// details.                                                     ////
35
////                                                              ////
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                     ////
39
////                                                              ////
40
//////////////////////////////////////////////////////////////////////
41
//
42
// CVS Revision History
43
//
44
// $Log: not supported by cvs2svn $
45 132 mihad
// Revision 1.2  2003/01/27 16:49:31  mihad
46
// Changed module and file names. Updated scripts accordingly. FIFO synchronizations changed.
47
//
48 77 mihad
// Revision 1.1  2002/02/01 14:43:31  mihad
49
// *** empty log message ***
50 18 mihad
//
51
//
52 77 mihad
//
53 18 mihad
 
54
`include "pci_constants.v"
55
 
56
// synopsys translate_off
57
`include "timescale.v"
58
// synopsys translate_on
59
 
60
// Module is used to switch appropriate reset and interrupt signals with few logic
61 77 mihad
module pci_rst_int
62 18 mihad
(
63
        clk_in,
64
        // reset signals
65
        rst_i,
66
        pci_rstn_in,
67
        conf_soft_res_in,
68
        reset,
69
        pci_rstn_out,
70
        pci_rstn_en_out,
71
        rst_o,
72
        // interrupt signals
73
        pci_intan_in,
74
        conf_int_in,
75
        int_i,
76
        pci_intan_out,
77
        pci_intan_en_out,
78
        int_o,
79 132 mihad
        conf_isr_int_prop_out,
80
    init_complete_in
81 18 mihad
);
82
 
83
input   clk_in;
84
// RESET inputs and outputs
85
input   rst_i;
86
input   pci_rstn_in;
87
input   conf_soft_res_in;
88
output  reset;
89
output  pci_rstn_out;
90
output  pci_rstn_en_out;
91
output  rst_o;
92
 
93
// INTERRUPT inputs and outputs
94
input   pci_intan_in;
95
input   conf_int_in;
96
input   int_i;
97
output  pci_intan_out;
98
output  pci_intan_en_out;
99
output  int_o;
100
output  conf_isr_int_prop_out;
101
 
102 132 mihad
input   init_complete_in ;
103
 
104 18 mihad
/*--------------------------------------------------------------------------------------------------------
105
RESET logic
106
--------------------------------------------------------------------------------------------------------*/
107
assign pci_rstn_out                     = 1'b0 ;
108
// host implementation of the bridge gets its reset from WISHBONE bus - RST_I and propagates it to PCI bus
109
`ifdef HOST
110
  assign reset                          = rst_i ;
111
  `ifdef ACTIVE_LOW_OE
112
  assign pci_rstn_en_out        = ~(rst_i || conf_soft_res_in) ;
113
  `else
114
  assign pci_rstn_en_out        = rst_i || conf_soft_res_in ;
115
  `endif
116
  assign rst_o                          = 1'b0 ;
117
`else
118
// guest implementation of the bridge gets its reset from PCI bus - RST# and propagates it to WISHBONE bus
119
`ifdef GUEST
120
  assign reset                          = ~pci_rstn_in ;
121
  assign rst_o                          = (~pci_rstn_in) || conf_soft_res_in ;
122
  `ifdef ACTIVE_LOW_OE
123
  assign pci_rstn_en_out                = 1'b1 ; // disabled
124
  `else
125
  assign pci_rstn_en_out                = 1'b0 ; // disabled
126
  `endif
127
`endif
128
`endif
129
 
130
/*--------------------------------------------------------------------------------------------------------
131
INTERRUPT logic
132
--------------------------------------------------------------------------------------------------------*/
133
assign pci_intan_out = 1'b0 ;
134
// host implementation of the bridge gets its interrupt from PCI bus - INTA# and propagates it to WISHBONE bus
135
`ifdef HOST
136
  assign conf_isr_int_prop_out  = ~pci_intan_in ;
137
  assign int_o                  = conf_int_in ;
138
  `ifdef ACTIVE_LOW_OE
139
  assign pci_intan_en_out       = 1'b1 ; // disabled
140
  `else
141
  assign pci_intan_en_out       = 1'b0 ; // disabled
142
  `endif
143
`else
144
// guest implementation of the bridge gets its interrupt from WISHBONE bus - INT_I and propagates it to PCI bus
145
`ifdef GUEST
146
    wire interrupt_a_en;
147 77 mihad
    pci_out_reg inta
148 18 mihad
    (
149
        .reset_in     ( reset ),
150
        .clk_in       ( clk_in) ,
151
        .dat_en_in    ( 1'b1 ),
152 132 mihad
        .en_en_in     ( init_complete_in ),
153 18 mihad
        .dat_in       ( 1'b0 ) , // active low
154
        .en_in        ( conf_int_in ) ,
155
        .en_out       ( interrupt_a_en ),
156
        .dat_out      ( )
157
    );
158
  assign conf_isr_int_prop_out = int_i ;
159
  assign int_o                 = 1'b0 ;
160
  assign pci_intan_en_out      = interrupt_a_en ;
161
`endif
162
`endif
163
 
164
 
165
endmodule

powered by: WebSVN 2.1.0

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