Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: fflp_sync2fc_clk.v | |
4 | // Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved | |
5 | // 4150 Network Circle, Santa Clara, California 95054, U.S.A. | |
6 | // | |
7 | // * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
8 | // | |
9 | // This program is free software; you can redistribute it and/or modify | |
10 | // it under the terms of the GNU General Public License as published by | |
11 | // the Free Software Foundation; version 2 of the License. | |
12 | // | |
13 | // This program is distributed in the hope that it will be useful, | |
14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | // GNU General Public License for more details. | |
17 | // | |
18 | // You should have received a copy of the GNU General Public License | |
19 | // along with this program; if not, write to the Free Software | |
20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 | // | |
22 | // For the avoidance of doubt, and except that if any non-GPL license | |
23 | // choice is available it will apply instead, Sun elects to use only | |
24 | // the General Public License version 2 (GPLv2) at this time for any | |
25 | // software where a choice of GPL license versions is made | |
26 | // available with the language indicating that GPLv2 or any later version | |
27 | // may be used, or where a choice of which version of the GPL is applied is | |
28 | // otherwise unspecified. | |
29 | // | |
30 | // Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | |
31 | // CA 95054 USA or visit www.sun.com if you need additional information or | |
32 | // have any questions. | |
33 | // | |
34 | // ========== Copyright Header End ============================================ | |
35 | /**********************************************************************/ | |
36 | /*project name: N2 */ | |
37 | /*module name: fflp_sync2fc_clk */ | |
38 | /*description: syncronization between core clk and fcram clk */ | |
39 | /* */ | |
40 | /*parent module in: */ | |
41 | /*child modules in: */ | |
42 | /* */ | |
43 | /*interface modules: */ | |
44 | /*author name: Jeanne Cai */ | |
45 | /*date created: 04-08-04 */ | |
46 | /* */ | |
47 | /* Copyright (c) 2004, Sun Microsystems, Inc. */ | |
48 | /* Sun Proprietary and Confidential */ | |
49 | /* */ | |
50 | /*modifications: */ | |
51 | /* */ | |
52 | /* */ | |
53 | ||
54 | module fflp_sync2fc_clk ( | |
55 | cclk, //fcram_clk | |
56 | reset, | |
57 | cpu_fcram_req, | |
58 | cpu_fio_req, | |
59 | fc_fifo_empty, | |
60 | fflp_config_reg_wen_pulse, | |
61 | ||
62 | reset_sync, | |
63 | cpu_fcram_req_sync, | |
64 | cpu_fio_req_sync, | |
65 | fc_fifo_empty_sync, | |
66 | fflp_config_reg_wen_pulse_sync | |
67 | ||
68 | ); | |
69 | ||
70 | ||
71 | input cclk; | |
72 | input reset; | |
73 | input cpu_fcram_req; | |
74 | input cpu_fio_req; | |
75 | input fc_fifo_empty; | |
76 | input fflp_config_reg_wen_pulse; | |
77 | ||
78 | output reset_sync; | |
79 | output cpu_fcram_req_sync; | |
80 | output cpu_fio_req_sync; | |
81 | output fc_fifo_empty_sync; | |
82 | output fflp_config_reg_wen_pulse_sync; | |
83 | ||
84 | ||
85 | wire reset1; | |
86 | wire cpu_fcram_req1; | |
87 | wire cpu_fio_req1; | |
88 | wire fflp_config_reg_wen_pulse1; | |
89 | ||
90 | wire reset_sync; | |
91 | wire cpu_fcram_req_sync; | |
92 | wire cpu_fio_req_sync; | |
93 | wire fc_fifo_empty_sync; | |
94 | wire fflp_config_reg_wen_pulse_sync; | |
95 | ||
96 | niu_dff #(1) reset1_reg (cclk, reset, reset1); | |
97 | niu_dff #(1) cpu_fcram_req1_reg (cclk, cpu_fcram_req, cpu_fcram_req1); | |
98 | niu_dff #(1) cpu_fio_req1_reg (cclk, cpu_fio_req, cpu_fio_req1); | |
99 | niu_dff #(1) config_reg_wen1_reg (cclk, fflp_config_reg_wen_pulse, fflp_config_reg_wen_pulse1); | |
100 | ||
101 | /* | |
102 | Need to put it back if fcram_clk is different from niu_clk. | |
103 | This is due to cutting fc fifo to two entries to save gates | |
104 | for adding one pipeline for new fio read latency. | |
105 | ||
106 | wire fc_fifo_empty1; | |
107 | niu_dff #(1) fc_fifo_empty1_reg (cclk, fc_fifo_empty, fc_fifo_empty1); | |
108 | niu_dff #(1) fc_fifo_empty2_reg (cclk, fc_fifo_empty1, fc_fifo_empty_sync); | |
109 | */ | |
110 | ||
111 | assign fc_fifo_empty_sync = fc_fifo_empty; | |
112 | ||
113 | ||
114 | niu_dff #(1) reset2_reg (cclk, reset1, reset_sync); | |
115 | niu_dff #(1) cpu_fcram_req2_reg (cclk, cpu_fcram_req1, cpu_fcram_req_sync); | |
116 | niu_dff #(1) cpu_fio_req2_reg (cclk, cpu_fio_req1, cpu_fio_req_sync); | |
117 | niu_dff #(1) config_reg_wen2_reg (cclk, fflp_config_reg_wen_pulse1, fflp_config_reg_wen_pulse_sync); | |
118 | ||
119 | ||
120 | ||
121 | ||
122 | ||
123 | endmodule |