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 13

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 12 antanguay
  status_crc_error, status_fragment_error, status_txdfifo_ovflow,
44
  status_txdfifo_udflow, status_rxdfifo_ovflow, status_rxdfifo_udflow,
45
  status_pause_frame_rx, status_local_fault, status_remote_fault,
46 2 antanguay
  // Inputs
47 12 antanguay
  wb_clk_i, wb_rst_i, status_crc_error_tog, status_fragment_error_tog,
48
  status_txdfifo_ovflow_tog, status_txdfifo_udflow_tog,
49
  status_rxdfifo_ovflow_tog, status_rxdfifo_udflow_tog,
50
  status_pause_frame_rx_tog, status_local_fault_crx,
51
  status_remote_fault_crx
52 2 antanguay
  );
53
 
54
input         wb_clk_i;
55
input         wb_rst_i;
56
 
57 12 antanguay
input         status_crc_error_tog;
58
input         status_fragment_error_tog;
59
 
60 2 antanguay
input         status_txdfifo_ovflow_tog;
61
 
62
input         status_txdfifo_udflow_tog;
63
 
64
input         status_rxdfifo_ovflow_tog;
65
 
66
input         status_rxdfifo_udflow_tog;
67
 
68
input         status_pause_frame_rx_tog;
69
 
70
input         status_local_fault_crx;
71
input         status_remote_fault_crx;
72
 
73
output        status_crc_error;
74
output        status_fragment_error;
75 12 antanguay
 
76 2 antanguay
output        status_txdfifo_ovflow;
77
 
78
output        status_txdfifo_udflow;
79
 
80
output        status_rxdfifo_ovflow;
81
 
82
output        status_rxdfifo_udflow;
83
 
84
output        status_pause_frame_rx;
85
 
86
output        status_local_fault;
87
output        status_remote_fault;
88
 
89
/*AUTOREG*/
90
 
91
/*AUTOWIRE*/
92
 
93
wire  [6:0]             sig_out1;
94
wire  [1:0]             sig_out2;
95
 
96 12 antanguay
assign status_crc_error = sig_out1[6];
97
assign status_fragment_error = sig_out1[5];
98
assign status_txdfifo_ovflow = sig_out1[4];
99
assign status_txdfifo_udflow = sig_out1[3];
100
assign status_rxdfifo_ovflow = sig_out1[2];
101
assign status_rxdfifo_udflow = sig_out1[1];
102
assign status_pause_frame_rx = sig_out1[0];
103 2 antanguay
 
104 12 antanguay
assign status_local_fault = sig_out2[1];
105
assign status_remote_fault = sig_out2[0];
106 2 antanguay
 
107
meta_sync #(.DWIDTH (7), .EDGE_DETECT (1)) meta_sync0 (
108
                      // Outputs
109
                      .out              (sig_out1),
110
                      // Inputs
111
                      .clk              (wb_clk_i),
112
                      .reset_n          (~wb_rst_i),
113
                      .in               ({
114
                                          status_crc_error_tog,
115
                                          status_fragment_error_tog,
116
                                          status_txdfifo_ovflow_tog,
117
                                          status_txdfifo_udflow_tog,
118
                                          status_rxdfifo_ovflow_tog,
119
                                          status_rxdfifo_udflow_tog,
120
                                          status_pause_frame_rx_tog
121
                                         }));
122
 
123
meta_sync #(.DWIDTH (2), .EDGE_DETECT (0)) meta_sync1 (
124
                      // Outputs
125
                      .out              (sig_out2),
126
                      // Inputs
127
                      .clk              (wb_clk_i),
128
                      .reset_n          (~wb_rst_i),
129
                      .in               ({
130
                                          status_local_fault_crx,
131
                                          status_remote_fault_crx
132
                                         }));
133
 
134
endmodule

powered by: WebSVN 2.1.0

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