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

Subversion Repositories pci

[/] [pci/] [tags/] [rel_3/] [rtl/] [verilog/] [pci_in_reg.v] - Blame information for rev 154

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

powered by: WebSVN 2.1.0

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