1 //////////////////////////////////////////////////////////////////////
3 //// File name: pci_in_reg.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_in_reg.v,v $
45 // Revision 1.1 2007-03-20 17:50:56 sithglan
48 // Revision 1.5 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.4 2003/01/27 16:49:31 mihad
55 // Changed module and file names. Updated scripts accordingly. FIFO synchronizations changed.
57 // Revision 1.3 2002/02/01 15:25:12 mihad
58 // Repaired a few bugs, updated specification, added test bench files and design document
60 // Revision 1.2 2001/10/05 08:14:29 mihad
61 // Updated all files with inclusion of timescale file for simulation purposes.
63 // Revision 1.1.1.1 2001/10/02 15:33:46 mihad
64 // New project directory structure
68 // synopsys translate_off
69 `include "timescale.v"
70 // synopsys translate_on
71 `include "pci_constants.v"
72 // Module is used for registering PCI input signals
73 // It provides data flip flops with reset
102 input reset_in, clk_in, init_complete_in ;
109 input pci_devsel_in ;
111 input [31:0] pci_ad_in ;
112 input [3:0] pci_cbe_in ;
114 output pci_gnt_reg_out ;
115 output pci_frame_reg_out ;
116 output pci_irdy_reg_out ;
117 output pci_trdy_reg_out ;
118 output pci_stop_reg_out ;
119 output pci_devsel_reg_out ;
120 output pci_idsel_reg_out ;
121 output [31:0] pci_ad_reg_out ;
122 output [3:0] pci_cbe_reg_out ;
125 reg pci_gnt_reg_out ;
126 reg pci_frame_reg_out ;
127 reg pci_irdy_reg_out ;
128 reg pci_trdy_reg_out ;
129 reg pci_stop_reg_out ;
130 reg pci_devsel_reg_out ;
131 reg pci_idsel_reg_out ;
132 reg [31:0] pci_ad_reg_out ;
133 reg [3:0] pci_cbe_reg_out ;
135 always@(posedge reset_in or posedge clk_in)
139 pci_gnt_reg_out <= #`FF_DELAY 1'b1 ;
140 pci_frame_reg_out <= #`FF_DELAY 1'b0 ;
141 pci_irdy_reg_out <= #`FF_DELAY 1'b1 ;
142 pci_trdy_reg_out <= #`FF_DELAY 1'b1 ;
143 pci_stop_reg_out <= #`FF_DELAY 1'b1 ;
144 pci_devsel_reg_out <= #`FF_DELAY 1'b1 ;
145 pci_idsel_reg_out <= #`FF_DELAY 1'b0 ; // active high!
146 pci_ad_reg_out <= #`FF_DELAY 32'h0000_0000 ;
147 pci_cbe_reg_out <= #`FF_DELAY 4'h0 ;
149 else if (init_complete_in)
151 pci_gnt_reg_out <= #`FF_DELAY pci_gnt_in ;
152 pci_frame_reg_out <= #`FF_DELAY pci_frame_in ;
153 pci_irdy_reg_out <= #`FF_DELAY pci_irdy_in ;
154 pci_trdy_reg_out <= #`FF_DELAY pci_trdy_in ;
155 pci_stop_reg_out <= #`FF_DELAY pci_stop_in ;
156 pci_devsel_reg_out <= #`FF_DELAY pci_devsel_in ;
157 pci_idsel_reg_out <= #`FF_DELAY pci_idsel_in ;
158 pci_ad_reg_out <= #`FF_DELAY pci_ad_in ;
159 pci_cbe_reg_out <= #`FF_DELAY pci_cbe_in ;