]> sigrok.org Git - libsigrokdecode.git/blob - common/plugtrx/mod.py
3d1b66ddfbde2145e6b2f20c211db9bbd5e5a23c
[libsigrokdecode.git] / common / plugtrx / mod.py
1 ##
2 ## This file is part of the libsigrokdecode project.
3 ##
4 ## Copyright (C) 2016 Bert Vermeulen <bert@biot.com>
5 ##
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; either version 3 of the License, or
9 ## (at your option) any later version.
10 ##
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ## GNU General Public License for more details.
15 ##
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program; if not, see <http://www.gnu.org/licenses/>.
18 ##
19
20 # This module contains definitions for use by pluggable network adapters,
21 # such as SFP, XFP etc.
22
23 MODULE_ID = {
24     0x01: 'GBIC',
25     0x02: 'Integrated module/connector',
26     0x03: 'SFP',
27     0x04: '300-pin XBI',
28     0x05: 'XENPAK',
29     0x06: 'XFP',
30     0x07: 'XFF',
31     0x08: 'XFP-E',
32     0x09: 'XPAK',
33     0x0a: 'X2',
34 }
35
36 ALARM_THRESHOLDS = {
37     0:  'Temp high alarm',
38     2:  'Temp low alarm',
39     4:  'Temp high warning',
40     6:  'Temp low warning',
41     16: 'Bias high alarm',
42     18: 'Bias low alarm',
43     20: 'Bias high warning',
44     22: 'Bias low warning',
45     24: 'TX power high alarm',
46     26: 'TX power low alarm',
47     28: 'TX power high warning',
48     30: 'TX power low warning',
49     32: 'RX power high alarm',
50     34: 'RX power low alarm',
51     36: 'RX power high warning',
52     38: 'RX power low warning',
53     40: 'AUX 1 high alarm',
54     42: 'AUX 1 low alarm',
55     44: 'AUX 1 high warning',
56     46: 'AUX 1 low warning',
57     48: 'AUX 2 high alarm',
58     50: 'AUX 2 low alarm',
59     52: 'AUX 2 high warning',
60     54: 'AUX 2 low warning',
61 }
62
63 AD_READOUTS = {
64     0:  'Module temperature',
65     4:  'TX bias current',
66     6:  'Measured TX output power',
67     8:  'Measured RX input power',
68     10: 'AUX 1 measurement',
69     12: 'AUX 2 measurement',
70 }
71
72 GCS_BITS = [
73     'TX disable',
74     'Soft TX disable',
75     'MOD_NR',
76     'P_Down',
77     'Soft P_Down',
78     'Interrupt',
79     'RX_LOS',
80     'Data_Not_Ready',
81     'TX_NR',
82     'TX_Fault',
83     'TX_CDR not locked',
84     'RX_NR',
85     'RX_CDR not locked',
86 ]
87
88 CONNECTOR = {
89     0x01:   'SC',
90     0x02:   'Fibre Channel style 1 copper',
91     0x03:   'Fibre Channel style 2 copper',
92     0x04:   'BNC/TNC',
93     0x05:   'Fibre Channel coax',
94     0x06:   'FiberJack',
95     0x07:   'LC',
96     0x08:   'MT-RJ',
97     0x09:   'MU',
98     0x0a:   'SG',
99     0x0b:   'Optical pigtail',
100     0x20:   'HSSDC II',
101     0x21:   'Copper pigtail',
102 }
103
104 TRANSCEIVER = [
105     # 10GB Ethernet
106     ['10GBASE-SR', '10GBASE-LR', '10GBASE-ER', '10GBASE-LRM', '10GBASE-SW',
107         '10GBASE-LW',   '10GBASE-EW'],
108     # 10GB Fibre Channel
109     ['1200-MX-SN-I', '1200-SM-LL-L', 'Extended Reach 1550 nm',
110         'Intermediate reach 1300 nm FP'],
111     # 10GB Copper
112     [],
113     # 10GB low speed
114     ['1000BASE-SX / 1xFC MMF', '1000BASE-LX / 1xFC SMF', '2xFC MMF',
115         '2xFC SMF', 'OC48-SR', 'OC48-IR', 'OC48-LR'],
116     # 10GB SONET/SDH interconnect
117     ['I-64.1r', 'I-64.1', 'I-64.2r', 'I-64.2', 'I-64.3', 'I-64.5'],
118     # 10GB SONET/SDH short haul
119     ['S-64.1', 'S-64.2a', 'S-64.2b', 'S-64.3a', 'S-64.3b', 'S-64.5a', 'S-64.5b'],
120     # 10GB SONET/SDH long haul
121     ['L-64.1', 'L-64.2a', 'L-64.2b', 'L-64.2c', 'L-64.3', 'G.959.1 P1L1-2D2'],
122     # 10GB SONET/SDH very long haul
123     ['V-64.2a', 'V-64.2b', 'V-64.3'],
124 ]
125
126 SERIAL_ENCODING = [
127     '64B/66B',
128     '8B/10B',
129     'SONET scrambled',
130     'NRZ',
131     'RZ',
132 ]
133
134 XMIT_TECH = [
135     '850 nm VCSEL',
136     '1310 nm VCSEL',
137     '1550 nm VCSEL',
138     '1310 nm FP',
139     '1310 nm DFB',
140     '1550 nm DFB',
141     '1310 nm EML'
142     '1550 nm EML'
143     'copper',
144 ]
145
146 CDR = [
147     '9.95Gb/s',
148     '10.3Gb/s',
149     '10.5Gb/s',
150     '10.7Gb/s',
151     '11.1Gb/s',
152     '(unknown)',
153     'lineside loopback mode',
154     'XFI loopback mode',
155 ]
156
157 DEVICE_TECH = [
158     ['no wavelength control', 'sctive wavelength control'],
159     ['uncooled transmitter device', 'cooled transmitter'],
160     ['PIN detector', 'APD detector'],
161     ['transmitter not tunable', 'transmitter tunable'],
162 ]
163
164 ENHANCED_OPTS = [
165     'VPS',
166     'soft TX_DISABLE',
167     'soft P_Down',
168     'VPS LV regulator mode',
169     'VPS bypassed regulator mode',
170     'active FEC control',
171     'wavelength tunability',
172     'CMU',
173 ]
174
175 AUX_TYPES = [
176     'not implemented',
177     'APD bias voltage',
178     '(unknown)',
179     'TEC current',
180     'laser temperature',
181     'laser wavelength',
182     '5V supply voltage',
183     '3.3V supply voltage',
184     '1.8V supply voltage',
185     '-5.2V supply voltage',
186     '5V supply current',
187     '(unknown)',
188     '(unknown)',
189     '3.3V supply current',
190     '1.8V supply current',
191     '-5.2V supply current',
192 ]