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

Subversion Repositories xge_mac

[/] [xge_mac/] [trunk/] [rtl/] [verilog/] [sync_clk_wb.v] - Blame information for rev 7

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

Line No. Rev Author Line
1 2 antanguay
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  File name "sync_clk_wb.v"                                   ////
4
////                                                              ////
5
////  This file is part of the "10GE MAC" project                 ////
6
////  http://www.opencores.org/cores/xge_mac/                     ////
7
////                                                              ////
8
////  Author(s):                                                  ////
9
////      - A. Tanguay (antanguay@opencores.org)                  ////
10
////                                                              ////
11
//////////////////////////////////////////////////////////////////////
12
////                                                              ////
13
//// Copyright (C) 2008 AUTHORS. All rights reserved.             ////
14
////                                                              ////
15
//// This source file may be used and distributed without         ////
16
//// restriction provided that this copyright statement is not    ////
17
//// removed from the file and that any derivative work contains  ////
18
//// the original copyright notice and the associated disclaimer. ////
19
////                                                              ////
20
//// This source file is free software; you can redistribute it   ////
21
//// and/or modify it under the terms of the GNU Lesser General   ////
22
//// Public License as published by the Free Software Foundation; ////
23
//// either version 2.1 of the License, or (at your option) any   ////
24
//// later version.                                               ////
25
////                                                              ////
26
//// This source is distributed in the hope that it will be       ////
27
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
28
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
29
//// PURPOSE.  See the GNU Lesser General Public License for more ////
30
//// details.                                                     ////
31
////                                                              ////
32
//// You should have received a copy of the GNU Lesser General    ////
33
//// Public License along with this source; if not, download it   ////
34
//// from http://www.opencores.org/lgpl.shtml                     ////
35
////                                                              ////
36
//////////////////////////////////////////////////////////////////////
37
 
38
 
39
`include "defines.v"
40
 
41
module sync_clk_wb(/*AUTOARG*/
42
  // Outputs
43
  status_crc_error, status_fragment_error, status_txdfifo_ovflow,
44
  status_txdfifo_udflow, status_rxdfifo_ovflow,
45
  status_rxdfifo_udflow, status_pause_frame_rx, status_local_fault,
46
  status_remote_fault,
47
  // Inputs
48
  wb_clk_i, wb_rst_i, status_crc_error_tog,
49
  status_fragment_error_tog, status_txdfifo_ovflow_tog,
50
  status_txdfifo_udflow_tog, status_rxdfifo_ovflow_tog,
51
  status_rxdfifo_udflow_tog, status_pause_frame_rx_tog,
52
  status_local_fault_crx, status_remote_fault_crx
53
  );
54
 
55
input         wb_clk_i;
56
input         wb_rst_i;
57
 
58
input         status_crc_error_tog;
59
input         status_fragment_error_tog;
60
 
61
input         status_txdfifo_ovflow_tog;
62
 
63
input         status_txdfifo_udflow_tog;
64
 
65
input         status_rxdfifo_ovflow_tog;
66
 
67
input         status_rxdfifo_udflow_tog;
68
 
69
input         status_pause_frame_rx_tog;
70
 
71
input         status_local_fault_crx;
72
input         status_remote_fault_crx;
73
 
74
output        status_crc_error;
75
output        status_fragment_error;
76
 
77
output        status_txdfifo_ovflow;
78
 
79
output        status_txdfifo_udflow;
80
 
81
output        status_rxdfifo_ovflow;
82
 
83
output        status_rxdfifo_udflow;
84
 
85
output        status_pause_frame_rx;
86
 
87
output        status_local_fault;
88
output        status_remote_fault;
89
 
90
/*AUTOREG*/
91
// Beginning of automatic regs (for this module's undeclared outputs)
92
// End of automatics
93
 
94
/*AUTOWIRE*/
95
// Beginning of automatic wires (for undeclared instantiated-module outputs)
96
// End of automatics
97
 
98
wire  [6:0]             sig_out1;
99
wire  [1:0]             sig_out2;
100
 
101
assign {status_crc_error,
102
        status_fragment_error,
103
        status_txdfifo_ovflow,
104
        status_txdfifo_udflow,
105
        status_rxdfifo_ovflow,
106
        status_rxdfifo_udflow,
107
        status_pause_frame_rx} = sig_out1;
108
 
109
assign {status_local_fault,
110
        status_remote_fault} = sig_out2;
111
 
112
meta_sync #(.DWIDTH (7), .EDGE_DETECT (1)) meta_sync0 (
113
                      // Outputs
114
                      .out              (sig_out1),
115
                      // Inputs
116
                      .clk              (wb_clk_i),
117
                      .reset_n          (~wb_rst_i),
118
                      .in               ({
119
                                          status_crc_error_tog,
120
                                          status_fragment_error_tog,
121
                                          status_txdfifo_ovflow_tog,
122
                                          status_txdfifo_udflow_tog,
123
                                          status_rxdfifo_ovflow_tog,
124
                                          status_rxdfifo_udflow_tog,
125
                                          status_pause_frame_rx_tog
126
                                         }));
127
 
128
meta_sync #(.DWIDTH (2), .EDGE_DETECT (0)) meta_sync1 (
129
                      // Outputs
130
                      .out              (sig_out2),
131
                      // Inputs
132
                      .clk              (wb_clk_i),
133
                      .reset_n          (~wb_rst_i),
134
                      .in               ({
135
                                          status_local_fault_crx,
136
                                          status_remote_fault_crx
137
                                         }));
138
 
139
endmodule
140
 

powered by: WebSVN 2.1.0

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