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

Subversion Repositories pci

[/] [pci/] [trunk/] [rtl/] [verilog/] [pci_target32_clk_en.v] - Blame information for rev 2

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

Line No. Rev Author Line
1 2 mihad
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  File name: pci_target32_clk_en.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
// module is used to separate logic which uses criticaly constrained inputs from slower logic.
48
// It is used to synthesize critical timing logic separately with faster cells or without optimization
49
 
50
`include "constants.v"
51
 
52
module PCI_TARGET32_CLK_EN
53
(
54
    addr_phase,
55
    config_access,
56
    addr_claim_in,
57
    disconect_wo_data_in,
58
    pcir_fifo_data_err_in,
59
    rw_cbe0,
60
    pci_frame_in,
61
    pci_irdy_in,
62
    state_wait,
63
    state_transfere,
64
    state_backoff,
65
    state_default,
66
    clk_enable
67
);
68
 
69
input           addr_phase ;                    // indicates registered address phase on PCI bus
70
input           config_access ;                 // indicates configuration access
71
input           addr_claim_in ;                 // indicates claimed input PCI address
72
input           disconect_wo_data_in ;  // indicates disconnect without data termination from backend
73
input           pcir_fifo_data_err_in ; // indicates FIFO data error termination from backend
74
input           rw_cbe0 ;                               // registered (through all cycle) RW (CBE[0]) input signal from PCI bus
75
input           pci_frame_in ;                  // critical constrained input signal
76
input                   pci_irdy_in ;                   // critical constrained input signal
77
input                   state_wait ;                    // indicates WAIT state of FSM
78
input                   state_transfere ;               // indicates TRANSFERE state of FSM
79
input                   state_backoff ;                 // indicates BACKOFF state of FSM
80
input                   state_default ;                 // indicates DEFAULT state of FSM
81
 
82
output                  clk_enable ;                    // FSM clock enable output
83
 
84
 
85
// clock enable signal when FSM is in IDLE state
86
wire s_idle_clk_en      =       ((addr_phase && config_access) ||
87
                                                (addr_phase && ~config_access && addr_claim_in)) ;
88
 
89
// clock enable signal when FSM is in WAIT state or in DEFAULT state    
90
wire s_wait_clk_en      =       (state_wait || state_default) ;
91
 
92
// clock enable signal when FSM is in TRANSFERE state
93
wire s_tran_clk_en      =       state_transfere &&
94
                                                ((disconect_wo_data_in && ~pci_irdy_in && ~pci_frame_in) || (pci_frame_in) ||
95
                                                (~rw_cbe0 && pcir_fifo_data_err_in && ~pci_irdy_in && ~pci_frame_in)) ;
96
 
97
// clock enable signal when FSM is in BACKOFF state     
98
wire s_bcko_clk_en      =       (state_backoff && pci_frame_in) ;
99
 
100
// Clock enable signal for FSM with preserved hierarchy for minimum delay!
101
assign clk_enable       =       (s_idle_clk_en || s_wait_clk_en || s_tran_clk_en || s_bcko_clk_en) ;
102
 
103
 
104
endmodule

powered by: WebSVN 2.1.0

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