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

Subversion Repositories pci

[/] [pci/] [trunk/] [rtl/] [verilog/] [pci_in_reg.v] - Blame information for rev 132

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mihad
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  File name: pci_in_reg.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.4  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.3  2002/02/01 15:25:12  mihad
49
// Repaired a few bugs, updated specification, added test bench files and design document
50
//
51 21 mihad
// Revision 1.2  2001/10/05 08:14:29  mihad
52
// Updated all files with inclusion of timescale file for simulation purposes.
53
//
54 6 mihad
// Revision 1.1.1.1  2001/10/02 15:33:46  mihad
55
// New project directory structure
56 2 mihad
//
57 6 mihad
//
58 2 mihad
 
59 21 mihad
// synopsys translate_off
60 6 mihad
`include "timescale.v"
61 21 mihad
// synopsys translate_on
62
`include "pci_constants.v"
63
// Module is used for registering PCI input signals
64 2 mihad
// It provides data flip flops with reset
65 77 mihad
module pci_in_reg
66 132 mihad
(
67 2 mihad
    reset_in,
68
    clk_in,
69 132 mihad
    init_complete_in,
70 2 mihad
 
71
    pci_gnt_in,
72
    pci_frame_in,
73
    pci_irdy_in,
74
    pci_trdy_in,
75
    pci_stop_in,
76
    pci_devsel_in,
77
    pci_idsel_in,
78
    pci_ad_in,
79
    pci_cbe_in,
80 21 mihad
 
81 2 mihad
    pci_gnt_reg_out,
82
    pci_frame_reg_out,
83
    pci_irdy_reg_out,
84
    pci_trdy_reg_out,
85
    pci_stop_reg_out,
86
    pci_devsel_reg_out,
87
    pci_idsel_reg_out,
88
    pci_ad_reg_out,
89
    pci_cbe_reg_out
90
 
91
);
92
 
93 132 mihad
input                   reset_in, clk_in, init_complete_in  ;
94 2 mihad
 
95
input           pci_gnt_in ;
96
input           pci_frame_in ;
97
input           pci_irdy_in ;
98
input           pci_trdy_in ;
99
input           pci_stop_in ;
100
input           pci_devsel_in ;
101
input                   pci_idsel_in ;
102
input [31:0]    pci_ad_in ;
103
input [3:0]     pci_cbe_in ;
104
 
105
output          pci_gnt_reg_out ;
106
output          pci_frame_reg_out ;
107
output          pci_irdy_reg_out ;
108
output          pci_trdy_reg_out ;
109
output          pci_stop_reg_out ;
110
output          pci_devsel_reg_out ;
111
output                  pci_idsel_reg_out ;
112
output [31:0]   pci_ad_reg_out ;
113
output [3:0]    pci_cbe_reg_out ;
114
 
115
 
116
reg             pci_gnt_reg_out ;
117
reg             pci_frame_reg_out ;
118
reg             pci_irdy_reg_out ;
119
reg             pci_trdy_reg_out ;
120
reg             pci_stop_reg_out ;
121
reg             pci_devsel_reg_out ;
122
reg                             pci_idsel_reg_out ;
123
reg    [31:0]   pci_ad_reg_out ;
124
reg    [3:0]    pci_cbe_reg_out ;
125
 
126
always@(posedge reset_in or posedge clk_in)
127
begin
128
    if ( reset_in )
129
    begin
130
                pci_gnt_reg_out         <= #`FF_DELAY 1'b1 ;
131 132 mihad
                pci_frame_reg_out       <= #`FF_DELAY 1'b0 ;
132 2 mihad
                pci_irdy_reg_out        <= #`FF_DELAY 1'b1 ;
133
                pci_trdy_reg_out        <= #`FF_DELAY 1'b1 ;
134
                pci_stop_reg_out        <= #`FF_DELAY 1'b1 ;
135
                pci_devsel_reg_out      <= #`FF_DELAY 1'b1 ;
136
                pci_idsel_reg_out       <= #`FF_DELAY 1'b0 ; // active high!
137 21 mihad
                pci_ad_reg_out      <= #`FF_DELAY 32'h0000_0000 ;
138
                pci_cbe_reg_out     <= #`FF_DELAY 4'h0 ;
139 2 mihad
    end
140 132 mihad
    else if (init_complete_in)
141 2 mihad
        begin
142
                pci_gnt_reg_out         <= #`FF_DELAY pci_gnt_in ;
143
                pci_frame_reg_out       <= #`FF_DELAY pci_frame_in ;
144
                pci_irdy_reg_out        <= #`FF_DELAY pci_irdy_in ;
145
                pci_trdy_reg_out        <= #`FF_DELAY pci_trdy_in ;
146
                pci_stop_reg_out        <= #`FF_DELAY pci_stop_in ;
147
                pci_devsel_reg_out      <= #`FF_DELAY pci_devsel_in ;
148
                pci_idsel_reg_out       <= #`FF_DELAY pci_idsel_in ;
149 21 mihad
                pci_ad_reg_out      <= #`FF_DELAY pci_ad_in ;
150
                pci_cbe_reg_out     <= #`FF_DELAY pci_cbe_in ;
151 2 mihad
        end
152
end
153
 
154 77 mihad
endmodule

powered by: WebSVN 2.1.0

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