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

Subversion Repositories pci

[/] [pci/] [tags/] [rel_3/] [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
//
46
//
47
 
48
`include "pci_constants.v"
49
 
50
// synopsys translate_off
51
`include "timescale.v"
52
// synopsys translate_on
53
 
54
// Module is used to switch appropriate reset and interrupt signals with few logic
55
module PCI_RST_INT
56
(
57
        clk_in,
58
        // reset signals
59
        rst_i,
60
        pci_rstn_in,
61
        conf_soft_res_in,
62
        reset,
63
        pci_rstn_out,
64
        pci_rstn_en_out,
65
        rst_o,
66
        // interrupt signals
67
        pci_intan_in,
68
        conf_int_in,
69
        int_i,
70
        out_bckp_perr_en_in,
71
        out_bckp_serr_en_in,
72
        pci_intan_out,
73
        pci_intan_en_out,
74
        int_o,
75
        conf_isr_int_prop_out
76
);
77
 
78
input   clk_in;
79
// RESET inputs and outputs
80
input   rst_i;
81
input   pci_rstn_in;
82
input   conf_soft_res_in;
83
output  reset;
84
output  pci_rstn_out;
85
output  pci_rstn_en_out;
86
output  rst_o;
87
 
88
// INTERRUPT inputs and outputs
89
input   pci_intan_in;
90
input   conf_int_in;
91
input   int_i;
92
input   out_bckp_perr_en_in;
93
input   out_bckp_serr_en_in;
94
output  pci_intan_out;
95
output  pci_intan_en_out;
96
output  int_o;
97
output  conf_isr_int_prop_out;
98
 
99
/*--------------------------------------------------------------------------------------------------------
100
RESET logic
101
--------------------------------------------------------------------------------------------------------*/
102
assign pci_rstn_out                     = 1'b0 ;
103
// host implementation of the bridge gets its reset from WISHBONE bus - RST_I and propagates it to PCI bus
104
`ifdef HOST
105
  assign reset                          = rst_i ;
106
  `ifdef ACTIVE_LOW_OE
107
  assign pci_rstn_en_out        = ~(rst_i || conf_soft_res_in) ;
108
  `else
109
  assign pci_rstn_en_out        = rst_i || conf_soft_res_in ;
110
  `endif
111
  assign rst_o                          = 1'b0 ;
112
`else
113
// guest implementation of the bridge gets its reset from PCI bus - RST# and propagates it to WISHBONE bus
114
`ifdef GUEST
115
  assign reset                          = ~pci_rstn_in ;
116
  assign rst_o                          = (~pci_rstn_in) || conf_soft_res_in ;
117
  `ifdef ACTIVE_LOW_OE
118
  assign pci_rstn_en_out                = 1'b1 ; // disabled
119
  `else
120
  assign pci_rstn_en_out                = 1'b0 ; // disabled
121
  `endif
122
`endif
123
`endif
124
 
125
/*--------------------------------------------------------------------------------------------------------
126
INTERRUPT logic
127
--------------------------------------------------------------------------------------------------------*/
128
assign pci_intan_out = 1'b0 ;
129
// host implementation of the bridge gets its interrupt from PCI bus - INTA# and propagates it to WISHBONE bus
130
`ifdef HOST
131
  assign conf_isr_int_prop_out  = ~pci_intan_in ;
132
  assign int_o                  = conf_int_in ;
133
  `ifdef ACTIVE_LOW_OE
134
  assign pci_intan_en_out       = 1'b1 ; // disabled
135
  `else
136
  assign pci_intan_en_out       = 1'b0 ; // disabled
137
  `endif
138
`else
139
// guest implementation of the bridge gets its interrupt from WISHBONE bus - INT_I and propagates it to PCI bus
140
`ifdef GUEST
141
    wire interrupt_a_en;
142
    OUT_REG inta
143
    (
144
        .reset_in     ( reset ),
145
        .clk_in       ( clk_in) ,
146
        .dat_en_in    ( 1'b1 ),
147
        .en_en_in     ( 1'b1 ),
148
        .dat_in       ( 1'b0 ) , // active low
149
        .en_in        ( conf_int_in ) ,
150
        .en_out       ( interrupt_a_en ),
151
        .dat_out      ( )
152
    );
153
  assign conf_isr_int_prop_out = int_i ;
154
  assign int_o                 = 1'b0 ;
155
  assign pci_intan_en_out      = interrupt_a_en ;
156
`endif
157
`endif
158
 
159
 
160
endmodule

powered by: WebSVN 2.1.0

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