1 |
3 |
dwp |
//////////////////////////////////////////////////////////////////////
|
2 |
|
|
//// ////
|
3 |
|
|
//// File name "ge_1000baseX_constants.v" ////
|
4 |
|
|
//// ////
|
5 |
|
|
//// This file is part of the : ////
|
6 |
|
|
//// ////
|
7 |
|
|
//// "1000BASE-X IEEE 802.3-2008 Clause 36 - PCS project" ////
|
8 |
|
|
//// ////
|
9 |
|
|
//// http://opencores.org/project,1000base-x ////
|
10 |
|
|
//// ////
|
11 |
|
|
//// Author(s): ////
|
12 |
|
|
//// - D.W.Pegler Cambridge Broadband Networks Ltd ////
|
13 |
|
|
//// ////
|
14 |
|
|
//// { peglerd@gmail.com, dwp@cambridgebroadand.com } ////
|
15 |
|
|
//// ////
|
16 |
|
|
//////////////////////////////////////////////////////////////////////
|
17 |
|
|
//// ////
|
18 |
|
|
//// Copyright (C) 2009 AUTHORS. All rights reserved. ////
|
19 |
|
|
//// ////
|
20 |
|
|
//// This source file may be used and distributed without ////
|
21 |
|
|
//// restriction provided that this copyright statement is not ////
|
22 |
|
|
//// removed from the file and that any derivative work contains ////
|
23 |
|
|
//// the original copyright notice and the associated disclaimer. ////
|
24 |
|
|
//// ////
|
25 |
|
|
//// This source file is free software; you can redistribute it ////
|
26 |
|
|
//// and/or modify it under the terms of the GNU Lesser General ////
|
27 |
|
|
//// Public License as published by the Free Software Foundation; ////
|
28 |
|
|
//// either version 2.1 of the License, or (at your option) any ////
|
29 |
|
|
//// later version. ////
|
30 |
|
|
//// ////
|
31 |
|
|
//// This source is distributed in the hope that it will be ////
|
32 |
|
|
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
33 |
|
|
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
34 |
|
|
//// PURPOSE. See the GNU Lesser General Public License for more ////
|
35 |
|
|
//// details. ////
|
36 |
|
|
//// ////
|
37 |
|
|
//// You should have received a copy of the GNU Lesser General ////
|
38 |
|
|
//// Public License along with this source; if not, download it ////
|
39 |
|
|
//// from http://www.opencores.org/lgpl.shtml ////
|
40 |
|
|
//// ////
|
41 |
|
|
//////////////////////////////////////////////////////////////////////
|
42 |
|
|
//// ////
|
43 |
|
|
//// This module is based on the coding method described in ////
|
44 |
|
|
//// IEEE Std 802.3-2008 Clause 36 "Physical Coding Sublayer(PCS) ////
|
45 |
|
|
//// and Physical Medium Attachment (PMA) sublayer, type ////
|
46 |
|
|
//// 1000BASE-X"; see : ////
|
47 |
|
|
//// ////
|
48 |
|
|
//// http://standards.ieee.org/about/get/802/802.3.html ////
|
49 |
|
|
//// and ////
|
50 |
|
|
//// doc/802.3-2008_section3.pdf, Clause/Section 36. ////
|
51 |
|
|
//// ////
|
52 |
|
|
//////////////////////////////////////////////////////////////////////
|
53 |
|
|
|
54 |
|
|
// XMIT Autonegotiation parameter - ctrl for the PCS TX state machine
|
55 |
|
|
`define XMIT_IDLE 0
|
56 |
|
|
`define XMIT_CONFIGURATION 1
|
57 |
|
|
`define XMIT_DATA 2
|
58 |
|
|
|
59 |
|
|
`define RUDI_INVALID 0
|
60 |
|
|
`define RUDI_IDLE 1
|
61 |
|
|
`define RUDI_CONF 2
|
62 |
|
|
|
63 |
|
|
// Special K code-groups - K codes
|
64 |
|
|
`define K28_0_symbol 8'h1c
|
65 |
|
|
`define K28_1_symbol 8'h3c
|
66 |
|
|
`define K28_2_symbol 8'h5c
|
67 |
|
|
`define K28_3_symbol 8'h7c
|
68 |
|
|
`define K28_4_symbol 8'h9c
|
69 |
|
|
`define K28_5_symbol 8'hbc
|
70 |
|
|
`define K28_6_symbol 8'hdc
|
71 |
|
|
`define K28_7_symbol 8'hfc
|
72 |
|
|
`define K23_7_symbol 8'hf7
|
73 |
|
|
`define K27_7_symbol 8'hfb
|
74 |
|
|
`define K29_7_symbol 8'hfd
|
75 |
|
|
`define K30_7_symbol 8'hfe
|
76 |
|
|
|
77 |
|
|
// Special D code-groups - D codes
|
78 |
|
|
`define D21_5_symbol 8'hb5
|
79 |
|
|
`define D2_2_symbol 8'h42
|
80 |
|
|
`define D5_6_symbol 8'hc5
|
81 |
|
|
`define D16_2_symbol 8'h50
|
82 |
|
|
`define D0_0_symbol 8'h00
|
83 |
|
|
|
84 |
|
|
`define D21_2_symbol 8'h55
|
85 |
|
|
`define D21_6_symbol 8'hd5
|
86 |
|
|
|
87 |
|
|
`define D6_6_symbol 8'hc6
|
88 |
|
|
`define D10_1_symbol 8'h2a
|
89 |
|
|
`define D3_3_symbol 8'h63
|
90 |
|
|
`define D27_7_symbol 8'hfb
|
91 |
|
|
`define D3_0_symbol 8'h03
|
92 |
|
|
|
93 |
|
|
`define D30_2_symbol 8'h5e
|
94 |
|
|
`define D12_4_symbol 8'h8c
|
95 |
|
|
`define D8_6_symbol 8'hc8
|
96 |
|
|
`define D13_7_symbol 8'hed
|
97 |
|
|
|
98 |
|
|
// Code group ordered_sets
|
99 |
|
|
`define I_CODE 4'b0001
|
100 |
|
|
`define I1_CODE 4'b0010
|
101 |
|
|
`define I2_CODE 4'b0011
|
102 |
|
|
`define C_CODE 4'b0100
|
103 |
|
|
`define C1_CODE 4'b0101
|
104 |
|
|
`define C2_CODE 4'b0110
|
105 |
|
|
`define R_CODE 4'b0111
|
106 |
|
|
`define S_CODE 4'b1000
|
107 |
|
|
`define T_CODE 4'b1001
|
108 |
|
|
`define V_CODE 4'b1010
|
109 |
|
|
|
110 |
|
|
// -ve and +ve 10b symbols
|
111 |
|
|
`define pK28_5_10b_symbol 10'b1100000101 // 0x305
|
112 |
|
|
`define nK28_5_10b_symbol 10'b0011111010 // 0x0fa
|
113 |
|
|
|
114 |
|
|
`define pD5_6_10b_symbol 10'b1010010110 // 0x296
|
115 |
|
|
`define nD5_6_10b_symbol 10'b1010010110 // 0x296
|
116 |
|
|
|
117 |
|
|
`define pD16_2_10b_symbol 10'b1001000101 // 0x245
|
118 |
|
|
`define nD16_2_10b_symbol 10'b0110110101 // 0x1b5
|
119 |
|
|
|
120 |
|
|
`define pD0_0_10b_symbol 10'b0110001011 // 0x18b
|
121 |
|
|
`define nD0_0_10b_symbol 10'b1001110100 // 0x274
|
122 |
|
|
|
123 |
|
|
`define pK27_7_10b_symbol 10'b0010010111 // 0x097
|
124 |
|
|
`define nK27_7_10b_symbol 10'b1101101000 // 0x368
|
125 |
|
|
|
126 |
|
|
|