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 28

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

powered by: WebSVN 2.1.0

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