Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / niu / rtl / fflp_sync2fc_clk.v
CommitLineData
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
54module 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
71input cclk;
72input reset;
73input cpu_fcram_req;
74input cpu_fio_req;
75input fc_fifo_empty;
76input fflp_config_reg_wen_pulse;
77
78output reset_sync;
79output cpu_fcram_req_sync;
80output cpu_fio_req_sync;
81output fc_fifo_empty_sync;
82output fflp_config_reg_wen_pulse_sync;
83
84
85wire reset1;
86wire cpu_fcram_req1;
87wire cpu_fio_req1;
88wire fflp_config_reg_wen_pulse1;
89
90wire reset_sync;
91wire cpu_fcram_req_sync;
92wire cpu_fio_req_sync;
93wire fc_fifo_empty_sync;
94wire fflp_config_reg_wen_pulse_sync;
95
96niu_dff #(1) reset1_reg (cclk, reset, reset1);
97niu_dff #(1) cpu_fcram_req1_reg (cclk, cpu_fcram_req, cpu_fcram_req1);
98niu_dff #(1) cpu_fio_req1_reg (cclk, cpu_fio_req, cpu_fio_req1);
99niu_dff #(1) config_reg_wen1_reg (cclk, fflp_config_reg_wen_pulse, fflp_config_reg_wen_pulse1);
100
101/*
102Need to put it back if fcram_clk is different from niu_clk.
103This is due to cutting fc fifo to two entries to save gates
104for adding one pipeline for new fio read latency.
105
106wire fc_fifo_empty1;
107niu_dff #(1) fc_fifo_empty1_reg (cclk, fc_fifo_empty, fc_fifo_empty1);
108niu_dff #(1) fc_fifo_empty2_reg (cclk, fc_fifo_empty1, fc_fifo_empty_sync);
109*/
110
111assign fc_fifo_empty_sync = fc_fifo_empty;
112
113
114niu_dff #(1) reset2_reg (cclk, reset1, reset_sync);
115niu_dff #(1) cpu_fcram_req2_reg (cclk, cpu_fcram_req1, cpu_fcram_req_sync);
116niu_dff #(1) cpu_fio_req2_reg (cclk, cpu_fio_req1, cpu_fio_req_sync);
117niu_dff #(1) config_reg_wen2_reg (cclk, fflp_config_reg_wen_pulse1, fflp_config_reg_wen_pulse_sync);
118
119
120
121
122
123endmodule