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

Subversion Repositories pci

[/] [pci/] [tags/] [rel_11/] [rtl/] [verilog/] [pci_in_reg.v] - Blame information for rev 6

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

powered by: WebSVN 2.1.0

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