tdl-xoa-driver 1.5.1__py3-none-any.whl → 1.6.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.1.dist-info}/METADATA +1 -1
- {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.1.dist-info}/RECORD +87 -88
- {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.1.dist-info}/licenses/LICENSE +1 -1
- xoa_driver/__init__.py +2 -2
- xoa_driver/enums.py +10 -10
- xoa_driver/functions/anlt.py +60 -78
- xoa_driver/functions/cli/testbed_config.py +1 -1
- xoa_driver/functions/cmis/_replies.py +4 -4
- xoa_driver/functions/mgmt.py +206 -250
- xoa_driver/functions/tools.py +11 -6
- xoa_driver/internals/commands/c_commands.py +59 -0
- xoa_driver/internals/commands/enums.py +101 -90
- xoa_driver/internals/commands/m4_commands.py +25 -0
- xoa_driver/internals/commands/m4e_commands.py +6 -0
- xoa_driver/internals/commands/m_commands.py +51 -1
- xoa_driver/internals/commands/p4_commands.py +63 -1
- xoa_driver/internals/commands/p4e_commands.py +9 -0
- xoa_driver/internals/commands/p4g_commands.py +139 -0
- xoa_driver/internals/commands/p_commands.py +455 -61
- xoa_driver/internals/commands/pc_commands.py +9 -0
- xoa_driver/internals/commands/pd_commands.py +11 -0
- xoa_driver/internals/commands/pe_commands.py +27 -0
- xoa_driver/internals/commands/pec_commands.py +9 -0
- xoa_driver/internals/commands/ped_commands.py +23 -0
- xoa_driver/internals/commands/pef_commands.py +43 -0
- xoa_driver/internals/commands/pf_commands.py +11 -0
- xoa_driver/internals/commands/pl1_commands.py +315 -48
- xoa_driver/internals/commands/pl_commands.py +8 -0
- xoa_driver/internals/commands/pm_commands.py +11 -0
- xoa_driver/internals/commands/pp_commands.py +84 -27
- xoa_driver/internals/commands/pr_commands.py +25 -0
- xoa_driver/internals/commands/ps_commands.py +47 -1
- xoa_driver/internals/commands/pt_commands.py +15 -0
- xoa_driver/internals/commands/px_commands.py +180 -136
- xoa_driver/internals/commands/subtypes.py +4 -3
- xoa_driver/internals/core/transporter/protocol/payload/base_struct.py +1 -1
- xoa_driver/internals/hli/indices/macsecscs/base_macsecsc.py +41 -3
- xoa_driver/internals/hli/modules/modules_l23/family_combi.py +0 -64
- xoa_driver/internals/hli/modules/modules_l23/family_edun.py +0 -2
- xoa_driver/internals/hli/modules/modules_l23/{family_g.py → family_loki.py} +29 -1
- xoa_driver/internals/hli/modules/modules_l23/family_odin.py +412 -0
- xoa_driver/internals/hli/modules/modules_l23/{family_l.py → family_thor.py} +44 -0
- xoa_driver/internals/hli/ports/port_l23/chimera/port_chimera.py +3 -3
- xoa_driver/internals/hli/ports/port_l23/family_edun.py +8 -43
- xoa_driver/internals/hli/ports/port_l23/{family_l1.py → family_freya.py} +9 -44
- xoa_driver/internals/hli/ports/port_l23/{family_g.py → family_loki.py} +32 -31
- xoa_driver/internals/hli/ports/port_l23/family_odin.py +225 -0
- xoa_driver/internals/hli/ports/port_l23/family_thor.py +67 -0
- xoa_driver/internals/hli/ports/port_l23/layer1/anlt.py +512 -0
- xoa_driver/internals/hli/ports/port_l23/layer1/brr.py +26 -0
- xoa_driver/internals/hli/ports/port_l23/layer1/eye_diagram.py +71 -0
- xoa_driver/internals/hli/ports/port_l23/{pcs_pma_ijkl_chimera.py → layer1/impair.py} +7 -7
- xoa_driver/internals/hli/ports/port_l23/layer1/laser_power.py +28 -0
- xoa_driver/internals/hli/ports/port_l23/{family_e.py → layer1/lower_power.py} +1 -51
- xoa_driver/internals/hli/ports/port_l23/{freya_l1.py → layer1/medium.py} +38 -358
- xoa_driver/internals/hli/ports/port_l23/layer1/pcs_fec.py +219 -0
- xoa_driver/internals/hli/ports/port_l23/layer1/pma.py +43 -0
- xoa_driver/internals/hli/ports/port_l23/layer1/prbs.py +39 -0
- xoa_driver/internals/hli/ports/port_l23/layer1/preamble.py +25 -0
- xoa_driver/internals/hli/ports/port_l23/{fault_jkl.py → layer1/rs_fault.py} +2 -2
- xoa_driver/internals/hli/ports/port_l23/layer1/siv.py +69 -0
- xoa_driver/internals/hli/ports/port_l23/layer1_edun.py +103 -0
- xoa_driver/internals/hli/ports/port_l23/layer1_freya.py +103 -0
- xoa_driver/internals/hli/ports/port_l23/layer1_loki.py +74 -0
- xoa_driver/internals/hli/ports/port_l23/layer1_thor.py +70 -0
- xoa_driver/internals/hli/ports/port_l23/sec/__init__.py +0 -0
- xoa_driver/internals/hli/ports/port_l23/sec/macsec.py +108 -0
- xoa_driver/internals/hli/ports/port_l23/tcvr/__init__.py +0 -0
- xoa_driver/internals/hli/ports/port_l23/{bases/port_transceiver.py → tcvr/cmis.py} +4 -118
- xoa_driver/internals/hli/ports/port_l23/tcvr/transceiver.py +124 -0
- xoa_driver/internals/hli/ports/port_l23/trafficgen/__init__.py +0 -0
- xoa_driver/internals/hli/ports/port_l23/trafficgen/runt.py +32 -0
- xoa_driver/internals/hli/ports/port_l23/{bases/port_reception_statistics.py → trafficgen/rx_stats.py} +0 -21
- xoa_driver/internals/hli/ports/port_l23/{bases/port_l23.py → trafficgen/tgen.py} +31 -213
- xoa_driver/internals/hli/ports/port_l23/{bases/port_transmission_statistics.py → trafficgen/tx_stats.py} +2 -22
- xoa_driver/internals/hli/testers/l23_tester.py +1 -3
- xoa_driver/internals/utils/indices/_interfaces.py +18 -6
- xoa_driver/internals/utils/indices/index_manager.py +8 -2
- xoa_driver/internals/utils/managers/ports_manager.py +5 -2
- xoa_driver/misc.py +6 -6
- xoa_driver/modules.py +31 -47
- xoa_driver/ports.py +10 -29
- xoa_driver/internals/hli/modules/modules_l23/family_d.py +0 -75
- xoa_driver/internals/hli/modules/modules_l23/family_e.py +0 -85
- xoa_driver/internals/hli/modules/modules_l23/family_f.py +0 -145
- xoa_driver/internals/hli/modules/modules_l23/family_h.py +0 -40
- xoa_driver/internals/hli/modules/modules_l23/family_i.py +0 -25
- xoa_driver/internals/hli/modules/modules_l23/family_j.py +0 -25
- xoa_driver/internals/hli/modules/modules_l23/family_k.py +0 -39
- xoa_driver/internals/hli/modules/modules_l23/family_m.py +0 -25
- xoa_driver/internals/hli/modules/modules_l23/family_n.py +0 -40
- xoa_driver/internals/hli/ports/port_l23/bases/port_l23_genuine.py +0 -229
- xoa_driver/internals/hli/ports/port_l23/edun_l1.py +0 -181
- xoa_driver/internals/hli/ports/port_l23/family_combi.py +0 -37
- xoa_driver/internals/hli/ports/port_l23/family_d.py +0 -51
- xoa_driver/internals/hli/ports/port_l23/family_f.py +0 -151
- xoa_driver/internals/hli/ports/port_l23/family_h.py +0 -67
- xoa_driver/internals/hli/ports/port_l23/family_i.py +0 -84
- xoa_driver/internals/hli/ports/port_l23/family_j.py +0 -68
- xoa_driver/internals/hli/ports/port_l23/family_k.py +0 -73
- xoa_driver/internals/hli/ports/port_l23/family_l.py +0 -82
- xoa_driver/internals/hli/ports/port_l23/family_m.py +0 -29
- xoa_driver/internals/hli/ports/port_l23/pcs_pma_ghijkl.py +0 -369
- xoa_driver/internals/hli/ports/port_l23/pcs_pma_l.py +0 -78
- xoa_driver/internals/hli/ports/port_l23/port_l23ve.py +0 -101
- {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.1.dist-info}/WHEEL +0 -0
- {tdl_xoa_driver-1.5.1.dist-info → tdl_xoa_driver-1.6.1.dist-info}/top_level.txt +0 -0
- /xoa_driver/internals/hli/modules/modules_l23/{family_l1.py → family_freya.py} +0 -0
- /xoa_driver/internals/hli/ports/port_l23/{bases → layer1}/__init__.py +0 -0
- /xoa_driver/internals/hli/ports/port_l23/{bases/port_capture.py → trafficgen/capture.py} +0 -0
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
import functools
|
|
2
|
-
from typing import TYPE_CHECKING
|
|
3
|
-
if TYPE_CHECKING:
|
|
4
|
-
from xoa_driver.internals.core import interfaces as itf
|
|
5
|
-
from xoa_driver.internals.commands import (
|
|
6
|
-
P_FLASH,
|
|
7
|
-
P_SPEEDSELECTION,
|
|
8
|
-
P_SPEEDS_SUPPORTED,
|
|
9
|
-
P_UAT_MODE,
|
|
10
|
-
P_UAT_FLR,
|
|
11
|
-
P_STATUS,
|
|
12
|
-
P_TCVRSTATUS,
|
|
13
|
-
P_LOADMODE,
|
|
14
|
-
PP_FECMODE,
|
|
15
|
-
P_MACSEC_RX_ENABLE
|
|
16
|
-
)
|
|
17
|
-
from xoa_driver.internals.utils import attributes as utils
|
|
18
|
-
from xoa_driver.internals.utils.indices import index_manager as idx_mgr
|
|
19
|
-
from xoa_driver.internals.hli.indices.streams.genuine_stream import GenuineStreamIdx
|
|
20
|
-
from xoa_driver.internals.hli.indices.filter.genuine_filter import GenuineFilterIdx
|
|
21
|
-
from xoa_driver.internals.hli.indices.port_dataset import PortDatasetIdx
|
|
22
|
-
from xoa_driver.internals.state_storage import ports_state
|
|
23
|
-
from xoa_driver.internals.hli.indices.macsecscs.genuine_macsecsc import GenuineMacSecTxScIdx, GenuineMacSecRxScIdx
|
|
24
|
-
|
|
25
|
-
from .port_l23 import (
|
|
26
|
-
BasePortL23,
|
|
27
|
-
Speed,
|
|
28
|
-
# TxConfiguration,
|
|
29
|
-
)
|
|
30
|
-
|
|
31
|
-
from .port_transceiver import PortTransceiver
|
|
32
|
-
from .port_reception_statistics import GenuinePortReceptionStatistics
|
|
33
|
-
from .port_transmission_statistics import GenuinePortTransmissionStatistics
|
|
34
|
-
|
|
35
|
-
StreamIndices = idx_mgr.IndexManager[GenuineStreamIdx]
|
|
36
|
-
FilterIndices = idx_mgr.IndexManager[GenuineFilterIdx]
|
|
37
|
-
PortDatasetIndices = idx_mgr.IndexManager[PortDatasetIdx]
|
|
38
|
-
MacSecTxScIndices = idx_mgr.IndexManager[GenuineMacSecTxScIdx]
|
|
39
|
-
MacSecRxScIndices = idx_mgr.IndexManager[GenuineMacSecRxScIdx]
|
|
40
|
-
|
|
41
|
-
class SpeedMode:
|
|
42
|
-
"""L23 port's speed mode"""
|
|
43
|
-
|
|
44
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
45
|
-
self.selection = P_SPEEDSELECTION(conn, module_id, port_id)
|
|
46
|
-
"""L23 port speed mode selection.
|
|
47
|
-
|
|
48
|
-
:type: P_SPEEDSELECTION
|
|
49
|
-
"""
|
|
50
|
-
|
|
51
|
-
self.supported = P_SPEEDS_SUPPORTED(conn, module_id, port_id)
|
|
52
|
-
"""L23 port's supported speed modes.
|
|
53
|
-
|
|
54
|
-
:type: P_SPEEDS_SUPPORTED
|
|
55
|
-
"""
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
class GenuineSpeed(Speed):
|
|
59
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
60
|
-
super().__init__(conn, module_id, port_id)
|
|
61
|
-
self.mode = SpeedMode(conn, module_id, port_id)
|
|
62
|
-
"""L23 port's speed mode."""
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
class UnAvailableTime:
|
|
66
|
-
"""UnAvailable Time"""
|
|
67
|
-
|
|
68
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
69
|
-
self.mode = P_UAT_MODE(conn, module_id, port_id)
|
|
70
|
-
"""L23 port's Unavailable Time mode.
|
|
71
|
-
|
|
72
|
-
:type: P_UAT_MODE
|
|
73
|
-
"""
|
|
74
|
-
|
|
75
|
-
self.frame_loss_ratio = P_UAT_FLR(conn, module_id, port_id)
|
|
76
|
-
"""L23 port's Frame Loss Ratio for UAT.
|
|
77
|
-
|
|
78
|
-
:type: P_UAT_FLR
|
|
79
|
-
"""
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
class PortStatistics:
|
|
83
|
-
"""L23 port statistics"""
|
|
84
|
-
|
|
85
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
86
|
-
self.rx = GenuinePortReceptionStatistics(conn, module_id, port_id)
|
|
87
|
-
"""L23 port's RX statistics."""
|
|
88
|
-
|
|
89
|
-
self.tx = GenuinePortTransmissionStatistics(conn, module_id, port_id)
|
|
90
|
-
"""L23 port's TX statistics."""
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
class BasePortL23Genuine(BasePortL23):
|
|
94
|
-
"""L23 port basic configuration."""
|
|
95
|
-
|
|
96
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
97
|
-
super().__init__(conn, module_id, port_id)
|
|
98
|
-
|
|
99
|
-
self._local_states = ports_state.PortL23GenuineLocalState()
|
|
100
|
-
|
|
101
|
-
self.flash = P_FLASH(conn, module_id, port_id)
|
|
102
|
-
"""L23 port flashes.
|
|
103
|
-
|
|
104
|
-
:type: P_FLASH
|
|
105
|
-
"""
|
|
106
|
-
|
|
107
|
-
self.status = P_STATUS(conn, module_id, port_id)
|
|
108
|
-
"""L23 port's received optical signal level'.
|
|
109
|
-
|
|
110
|
-
:type: P_STATUS
|
|
111
|
-
"""
|
|
112
|
-
|
|
113
|
-
self.config_load_mode = P_LOADMODE(conn, module_id, port_id)
|
|
114
|
-
"""Chimera Port loading mode.
|
|
115
|
-
|
|
116
|
-
:type: P_LOADMODE
|
|
117
|
-
"""
|
|
118
|
-
|
|
119
|
-
self.tcvr_status = P_TCVRSTATUS(conn, module_id, port_id)
|
|
120
|
-
"""L23 port transceiver status information.
|
|
121
|
-
|
|
122
|
-
:type: P_TCVRSTATUS
|
|
123
|
-
"""
|
|
124
|
-
|
|
125
|
-
self.fec_mode = PP_FECMODE(conn, module_id, port_id)
|
|
126
|
-
"""L23 port FEC mode.
|
|
127
|
-
|
|
128
|
-
:type: PP_FECMODE
|
|
129
|
-
"""
|
|
130
|
-
|
|
131
|
-
self.speed = GenuineSpeed(conn, module_id, port_id)
|
|
132
|
-
"""L23 port speed configuration.
|
|
133
|
-
|
|
134
|
-
:type: GenuineSpeed
|
|
135
|
-
"""
|
|
136
|
-
|
|
137
|
-
self.uat = UnAvailableTime(conn, module_id, port_id)
|
|
138
|
-
"""L23 port UnAvailable Time configuration.
|
|
139
|
-
|
|
140
|
-
:type: UnAvailableTime
|
|
141
|
-
"""
|
|
142
|
-
|
|
143
|
-
self.transceiver = PortTransceiver(conn, module_id, port_id)
|
|
144
|
-
"""L23 port transceiver configuration.
|
|
145
|
-
|
|
146
|
-
:type: PortTransceiver
|
|
147
|
-
"""
|
|
148
|
-
|
|
149
|
-
self.statistics = PortStatistics(conn, module_id, port_id)
|
|
150
|
-
"""L23 port statistics.
|
|
151
|
-
|
|
152
|
-
:type: PortStatistics
|
|
153
|
-
"""
|
|
154
|
-
|
|
155
|
-
self.macsec_rx = P_MACSEC_RX_ENABLE(conn, module_id, port_id)
|
|
156
|
-
"""L23 port MACSec RX enable.
|
|
157
|
-
|
|
158
|
-
:type: P_MACSEC_RX_ENABLE
|
|
159
|
-
"""
|
|
160
|
-
|
|
161
|
-
self.streams: StreamIndices = idx_mgr.IndexManager(
|
|
162
|
-
conn,
|
|
163
|
-
GenuineStreamIdx,
|
|
164
|
-
module_id,
|
|
165
|
-
port_id
|
|
166
|
-
)
|
|
167
|
-
"""L23 port stream index manager.
|
|
168
|
-
|
|
169
|
-
:type: StreamIndices
|
|
170
|
-
"""
|
|
171
|
-
|
|
172
|
-
self.filters: FilterIndices = idx_mgr.IndexManager(
|
|
173
|
-
conn,
|
|
174
|
-
GenuineFilterIdx,
|
|
175
|
-
module_id,
|
|
176
|
-
port_id
|
|
177
|
-
)
|
|
178
|
-
"""L23 port filter index manager.
|
|
179
|
-
|
|
180
|
-
:type: FilterIndices
|
|
181
|
-
"""
|
|
182
|
-
|
|
183
|
-
self.datasets: PortDatasetIndices = idx_mgr.IndexManager(
|
|
184
|
-
conn,
|
|
185
|
-
PortDatasetIdx,
|
|
186
|
-
module_id,
|
|
187
|
-
port_id
|
|
188
|
-
)
|
|
189
|
-
"""L23 port histogram index manager.
|
|
190
|
-
|
|
191
|
-
:type: PortDatasetIndices
|
|
192
|
-
"""
|
|
193
|
-
|
|
194
|
-
self.macsec_txscs: MacSecTxScIndices = idx_mgr.IndexManager(
|
|
195
|
-
conn,
|
|
196
|
-
GenuineMacSecTxScIdx,
|
|
197
|
-
module_id,
|
|
198
|
-
port_id
|
|
199
|
-
)
|
|
200
|
-
"""L23 port MACSec TX SC index manager.
|
|
201
|
-
|
|
202
|
-
:type: MacSecTxScIndices
|
|
203
|
-
"""
|
|
204
|
-
|
|
205
|
-
self.macsec_rxscs: MacSecRxScIndices = idx_mgr.IndexManager(
|
|
206
|
-
conn,
|
|
207
|
-
GenuineMacSecRxScIdx,
|
|
208
|
-
module_id,
|
|
209
|
-
port_id
|
|
210
|
-
)
|
|
211
|
-
"""L23 port MACSec RX SC index manager.
|
|
212
|
-
|
|
213
|
-
:type: MacSecRxScIndices
|
|
214
|
-
"""
|
|
215
|
-
|
|
216
|
-
@property
|
|
217
|
-
def info(self) -> ports_state.PortL23GenuineLocalState:
|
|
218
|
-
return self._local_states
|
|
219
|
-
|
|
220
|
-
async def _setup(self):
|
|
221
|
-
await self._local_states.initiate(self)
|
|
222
|
-
self._local_states.register_subscriptions(self)
|
|
223
|
-
return self
|
|
224
|
-
|
|
225
|
-
on_speed_selection_change = functools.partialmethod(utils.on_event, P_SPEEDSELECTION)
|
|
226
|
-
"""Register a callback to the event that the port's speed mode changes."""
|
|
227
|
-
|
|
228
|
-
on_macsec_rx_enable_change = functools.partialmethod(utils.on_event, P_MACSEC_RX_ENABLE)
|
|
229
|
-
"""Register a callback to the event that the port MACsec RX enable status changes."""
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
from typing import (
|
|
2
|
-
TYPE_CHECKING,
|
|
3
|
-
Tuple,
|
|
4
|
-
)
|
|
5
|
-
if TYPE_CHECKING:
|
|
6
|
-
from xoa_driver.internals.core import interfaces as itf
|
|
7
|
-
from xoa_driver.internals.commands import (
|
|
8
|
-
PP_PRECODING,
|
|
9
|
-
PP_GRAYCODING,
|
|
10
|
-
PL1_PHYTXEQ_LEVEL,
|
|
11
|
-
PL1_PHYTXEQ_COEFF,
|
|
12
|
-
PL1_PCS_VARIANT,
|
|
13
|
-
PL1_PHYTXEQ,
|
|
14
|
-
PL1_CWE_CYCLE,
|
|
15
|
-
PL1_CWE_ERR_SYM_INDICES,
|
|
16
|
-
PL1_CWE_BIT_ERR_MASK,
|
|
17
|
-
PL1_CWE_FEC_ENGINE,
|
|
18
|
-
PL1_CWE_FEC_STATS,
|
|
19
|
-
PL1_CWE_CONTROL,
|
|
20
|
-
PL1_CWE_FEC_STATS_CLEAR,
|
|
21
|
-
PP_PRBSTYPE,
|
|
22
|
-
PL1_PNSWAP_RX,
|
|
23
|
-
PL1_PNSWAP_TX,
|
|
24
|
-
PP_AUTONEG,
|
|
25
|
-
PP_AUTONEGSTATUS,
|
|
26
|
-
PP_LINKTRAIN,
|
|
27
|
-
)
|
|
28
|
-
from .pcs_pma_ghijkl import (
|
|
29
|
-
Prbs,
|
|
30
|
-
)
|
|
31
|
-
from xoa_driver import enums
|
|
32
|
-
|
|
33
|
-
class EdunPMA:
|
|
34
|
-
"""Edun PMA"""
|
|
35
|
-
|
|
36
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_xindex: int) -> None:
|
|
37
|
-
self.precoding = PP_PRECODING(conn, module_id, port_id, serdes_xindex)
|
|
38
|
-
"""GET/SET Pre-Coding Configurations.
|
|
39
|
-
|
|
40
|
-
:type: PP_PRECODING
|
|
41
|
-
"""
|
|
42
|
-
|
|
43
|
-
self.graycoding = PP_GRAYCODING(conn, module_id, port_id, serdes_xindex)
|
|
44
|
-
"""GET/SET Gray-Coding Configurations.
|
|
45
|
-
|
|
46
|
-
:type: PP_GRAYCODING
|
|
47
|
-
"""
|
|
48
|
-
|
|
49
|
-
self.pn_swap_rx = PL1_PNSWAP_RX(conn, module_id, port_id, serdes_xindex)
|
|
50
|
-
"""GET/SET PN-Swap RX Configurations.
|
|
51
|
-
|
|
52
|
-
:type: PL1_PNSWAP_RX
|
|
53
|
-
"""
|
|
54
|
-
|
|
55
|
-
self.pn_swap_tx = PL1_PNSWAP_TX(conn, module_id, port_id, serdes_xindex)
|
|
56
|
-
"""GET/SET PN-Swap TX Configurations.
|
|
57
|
-
|
|
58
|
-
:type: PL1_PNSWAP_TX
|
|
59
|
-
"""
|
|
60
|
-
|
|
61
|
-
class EdunTxTap:
|
|
62
|
-
"""Edun Tx Tap"""
|
|
63
|
-
|
|
64
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_xindex: int) -> None:
|
|
65
|
-
self.native = PL1_PHYTXEQ(conn, module_id, port_id, serdes_xindex)
|
|
66
|
-
"""TX tap native value. (only for Edun)
|
|
67
|
-
|
|
68
|
-
:type: PL1_PHYTXEQ
|
|
69
|
-
"""
|
|
70
|
-
|
|
71
|
-
self.level = PL1_PHYTXEQ_LEVEL(conn, module_id, port_id, serdes_xindex)
|
|
72
|
-
"""TX tap mV/dB value. (only for Edun)
|
|
73
|
-
|
|
74
|
-
:type: PL1_PHYTXEQ_LEVEL
|
|
75
|
-
"""
|
|
76
|
-
|
|
77
|
-
self.ieee = PL1_PHYTXEQ_COEFF(conn, module_id, port_id, serdes_xindex)
|
|
78
|
-
"""TX tap IEEE coefficient value. (only for Edun)
|
|
79
|
-
|
|
80
|
-
:type: PL1_PHYTXEQ_COEFF
|
|
81
|
-
"""
|
|
82
|
-
|
|
83
|
-
# class EdunRxTap:
|
|
84
|
-
# """Edun Rx tap
|
|
85
|
-
# """
|
|
86
|
-
# def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_xindex: int) -> None:
|
|
87
|
-
# self.status = P_EDUN_RX_STATUS(conn, module_id, port_id, serdes_xindex)
|
|
88
|
-
# """Edun Rx tap status
|
|
89
|
-
# """
|
|
90
|
-
|
|
91
|
-
class EdunMedium:
|
|
92
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_xindex: int) -> None:
|
|
93
|
-
self.tx = EdunTxTap(conn, module_id, port_id, serdes_xindex)
|
|
94
|
-
"""Edun Tx tap
|
|
95
|
-
"""
|
|
96
|
-
# self.rx = EdunRxTap(conn, module_id, port_id, serdes_xindex)
|
|
97
|
-
# """Edun Rx tap
|
|
98
|
-
# """
|
|
99
|
-
|
|
100
|
-
class SerDesEdun:
|
|
101
|
-
"""L23 high-speed port SerDes configuration and status."""
|
|
102
|
-
|
|
103
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_xindex: int) -> None:
|
|
104
|
-
|
|
105
|
-
self.prbs = Prbs(conn, module_id, port_id, serdes_xindex)
|
|
106
|
-
"""PRBS
|
|
107
|
-
:type: Prbs
|
|
108
|
-
"""
|
|
109
|
-
|
|
110
|
-
self.pma = EdunPMA(conn, module_id, port_id, serdes_xindex)
|
|
111
|
-
"""Edun PMA
|
|
112
|
-
|
|
113
|
-
:type: EdunPMA
|
|
114
|
-
"""
|
|
115
|
-
|
|
116
|
-
self.medium = EdunMedium(conn, module_id, port_id, serdes_xindex)
|
|
117
|
-
"""Edun medium
|
|
118
|
-
|
|
119
|
-
:type: EdunMedium
|
|
120
|
-
"""
|
|
121
|
-
|
|
122
|
-
class EdunAutoneg:
|
|
123
|
-
"""Edun port-level autoneg. For per-serdes configuration and status, use serdes[x]
|
|
124
|
-
"""
|
|
125
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
126
|
-
self.config = PP_AUTONEG(conn, module_id, port_id)
|
|
127
|
-
"""Autoneg config and status
|
|
128
|
-
"""
|
|
129
|
-
self.status = PP_AUTONEGSTATUS(conn, module_id, port_id)
|
|
130
|
-
"""Autoneg status
|
|
131
|
-
"""
|
|
132
|
-
|
|
133
|
-
class EdunFecCodewordErrorInject:
|
|
134
|
-
"""Edun FEC Codeword Error Injection
|
|
135
|
-
"""
|
|
136
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
137
|
-
self.cycle = PL1_CWE_CYCLE(conn, module_id, port_id)
|
|
138
|
-
"""FEC codeword error injection cycle.
|
|
139
|
-
"""
|
|
140
|
-
self.err_symbols = PL1_CWE_ERR_SYM_INDICES(conn, module_id, port_id)
|
|
141
|
-
"""The positions of the errored symbols in errored codewords.
|
|
142
|
-
"""
|
|
143
|
-
self.bit_err_mask = PL1_CWE_BIT_ERR_MASK(conn, module_id, port_id)
|
|
144
|
-
"""The bit error mask for the errored symbols.
|
|
145
|
-
"""
|
|
146
|
-
self.engine = PL1_CWE_FEC_ENGINE(conn, module_id, port_id)
|
|
147
|
-
"""The FEC engines to use.
|
|
148
|
-
"""
|
|
149
|
-
self.statistics = PL1_CWE_FEC_STATS(conn, module_id, port_id)
|
|
150
|
-
"""FEC error injection statistics
|
|
151
|
-
"""
|
|
152
|
-
self.clear_stats = PL1_CWE_FEC_STATS_CLEAR(conn, module_id, port_id)
|
|
153
|
-
"""Clear FEC codeword injection stats
|
|
154
|
-
"""
|
|
155
|
-
self.control = PL1_CWE_CONTROL(conn, module_id, port_id)
|
|
156
|
-
"""Control the FEC codeword error injection
|
|
157
|
-
"""
|
|
158
|
-
|
|
159
|
-
class Layer1:
|
|
160
|
-
def __init__(self, conn: "itf.IConnection", port) -> None:
|
|
161
|
-
self.serdes: Tuple[SerDesEdun, ...] = tuple(
|
|
162
|
-
SerDesEdun(conn, *port.kind, serdes_xindex=idx)
|
|
163
|
-
for idx in range(port.info.capabilities.serdes_count)
|
|
164
|
-
)
|
|
165
|
-
self.autoneg = EdunAutoneg(conn, *port.kind)
|
|
166
|
-
"""Edun port-level autoneg. For per-serdes configuration and status, use serdes[x]
|
|
167
|
-
"""
|
|
168
|
-
self.lt = PP_LINKTRAIN(conn, *port.kind)
|
|
169
|
-
"""Edun Link Training on serdes level
|
|
170
|
-
|
|
171
|
-
:type: PP_LINKTRAIN
|
|
172
|
-
"""
|
|
173
|
-
self.pcs_variant = PL1_PCS_VARIANT(conn, *port.kind)
|
|
174
|
-
"""PCS variant configuration
|
|
175
|
-
"""
|
|
176
|
-
self.fec_error_inject = EdunFecCodewordErrorInject(conn, *port.kind)
|
|
177
|
-
"""FEC codeword error injection
|
|
178
|
-
"""
|
|
179
|
-
self.prbs_config = PP_PRBSTYPE(conn, *port.kind)
|
|
180
|
-
"""PRBS configuration, including PRBS polynomial, invert mode, and statistic collection mode (for RX).
|
|
181
|
-
"""
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING
|
|
2
|
-
from xoa_driver.internals.commands import P_AUTONEGSELECTION
|
|
3
|
-
if TYPE_CHECKING:
|
|
4
|
-
from xoa_driver.internals.core import interfaces as itf
|
|
5
|
-
|
|
6
|
-
from .bases.port_l23_genuine import BasePortL23Genuine
|
|
7
|
-
from . import family_f
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class POdin1G4S4PCombi(BasePortL23Genuine):
|
|
11
|
-
"""L23 ports that supports MDI/MDIX and """
|
|
12
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
13
|
-
super().__init__(conn, module_id, port_id)
|
|
14
|
-
|
|
15
|
-
self.autoneg_selection = P_AUTONEGSELECTION(conn, module_id, port_id)
|
|
16
|
-
"""L23 port's auto-negotiation selection.
|
|
17
|
-
|
|
18
|
-
:type: P_AUTONEGSELECTION`
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class POdin1G4S4PCombi_b(POdin1G4S4PCombi):
|
|
23
|
-
"""L23 port on Odin-1G-4S-2P-Combi_b module.
|
|
24
|
-
"""
|
|
25
|
-
...
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class POdin10G4S2PCombi(family_f.FamilyF):
|
|
29
|
-
"""L23 port on Odin-10G-4S-2P-Combi module.
|
|
30
|
-
"""
|
|
31
|
-
...
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class POdin10G4S2PCombi_b(family_f.FamilyF):
|
|
35
|
-
"""L23 port on Odin-10G-4S-2P-Combi_b module.
|
|
36
|
-
"""
|
|
37
|
-
...
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING
|
|
2
|
-
from xoa_driver.internals.commands import (
|
|
3
|
-
P_MDIXMODE,
|
|
4
|
-
P_AUTONEGSELECTION,
|
|
5
|
-
)
|
|
6
|
-
if TYPE_CHECKING:
|
|
7
|
-
from xoa_driver.internals.core import interfaces as itf
|
|
8
|
-
|
|
9
|
-
from .bases.port_l23_genuine import BasePortL23Genuine
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class FamilyD(BasePortL23Genuine):
|
|
13
|
-
"""L23 ports that supports MDI/MDIX and """
|
|
14
|
-
|
|
15
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
16
|
-
super().__init__(conn, module_id, port_id)
|
|
17
|
-
self.mdix_mode = P_MDIXMODE(conn, module_id, port_id)
|
|
18
|
-
"""L23 port's MDI/MDIX mode.
|
|
19
|
-
|
|
20
|
-
:type: P_MDIXMODE
|
|
21
|
-
"""
|
|
22
|
-
|
|
23
|
-
self.autoneg_selection = P_AUTONEGSELECTION(conn, module_id, port_id)
|
|
24
|
-
"""L23 port's auto-negotiation selection.
|
|
25
|
-
|
|
26
|
-
:type: P_AUTONEGSELECTION
|
|
27
|
-
"""
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class POdin1G3S6P(FamilyD):
|
|
31
|
-
"""L23 port on Odin-1G-3S-6P module.
|
|
32
|
-
"""
|
|
33
|
-
...
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class POdin1G3S6P_b(FamilyD):
|
|
37
|
-
"""L23 port on Odin-1G-3S-6P[b] module.
|
|
38
|
-
"""
|
|
39
|
-
...
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
class POdin1G3S6PE(FamilyD):
|
|
43
|
-
"""L23 port on Odin-1G-3S-6P-E module.
|
|
44
|
-
"""
|
|
45
|
-
...
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
class POdin1G3S2PT(FamilyD):
|
|
49
|
-
"""L23 port on Odin-1G-3S-2P-T module.
|
|
50
|
-
"""
|
|
51
|
-
...
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import functools
|
|
2
|
-
from typing import TYPE_CHECKING
|
|
3
|
-
from xoa_driver.internals.commands import (
|
|
4
|
-
P_DYNAMIC,
|
|
5
|
-
P_TXRUNTLENGTH,
|
|
6
|
-
P_RXRUNTLENGTH,
|
|
7
|
-
P_RXRUNTLEN_ERRS,
|
|
8
|
-
P_TXPREAMBLE_REMOVE,
|
|
9
|
-
P_RXPREAMBLE_INSERT,
|
|
10
|
-
|
|
11
|
-
)
|
|
12
|
-
from xoa_driver.internals.utils import attributes as utils
|
|
13
|
-
if TYPE_CHECKING:
|
|
14
|
-
from xoa_driver.internals.core import interfaces as itf
|
|
15
|
-
|
|
16
|
-
from .bases.port_l23_genuine import BasePortL23Genuine
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class FamilyF(BasePortL23Genuine):
|
|
20
|
-
...
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class POdin10G1S2P(FamilyF):
|
|
24
|
-
"""L23 port on Odin-10G-1S-2P module.
|
|
25
|
-
"""
|
|
26
|
-
...
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class POdin10G1S2P_b(FamilyF):
|
|
30
|
-
"""L23 port on Odin-10G-1S-2P[b] module.
|
|
31
|
-
"""
|
|
32
|
-
...
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
class POdin10G1S2P_c(FamilyF):
|
|
36
|
-
"""L23 port on Odin-10G-1S-2P[c] module.
|
|
37
|
-
"""
|
|
38
|
-
...
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
class POdin10G1S6P(FamilyF):
|
|
42
|
-
"""L23 port on Odin-10G-1S-6P module.
|
|
43
|
-
"""
|
|
44
|
-
...
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
class Runt:
|
|
48
|
-
"""Runt settings."""
|
|
49
|
-
|
|
50
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
51
|
-
self.tx_length = P_TXRUNTLENGTH(conn, module_id, port_id)
|
|
52
|
-
"""L23 port's TX runt length.
|
|
53
|
-
|
|
54
|
-
:type: P_TXRUNTLENGTH
|
|
55
|
-
"""
|
|
56
|
-
|
|
57
|
-
self.rx_length = P_RXRUNTLENGTH(conn, module_id, port_id)
|
|
58
|
-
"""L23 port's RX runt length.
|
|
59
|
-
|
|
60
|
-
:type: P_RXRUNTLENGTH
|
|
61
|
-
"""
|
|
62
|
-
|
|
63
|
-
self.has_length_errors = P_RXRUNTLEN_ERRS(conn, module_id, port_id)
|
|
64
|
-
"""L23 port's RX runt length errors..
|
|
65
|
-
|
|
66
|
-
:type: P_RXRUNTLEN_ERRS
|
|
67
|
-
"""
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
class Preamble:
|
|
71
|
-
"""Preamble settings."""
|
|
72
|
-
|
|
73
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
74
|
-
self.tx_remove = P_TXPREAMBLE_REMOVE(conn, module_id, port_id)
|
|
75
|
-
"""L23 port's removal of preamble from outgoing packets.
|
|
76
|
-
|
|
77
|
-
:type: P_TXPREAMBLE_REMOVE
|
|
78
|
-
"""
|
|
79
|
-
|
|
80
|
-
self.rx_insert = P_RXPREAMBLE_INSERT(conn, module_id, port_id)
|
|
81
|
-
"""L23 port's insertion of preamble into incoming packets.
|
|
82
|
-
|
|
83
|
-
:type: P_RXPREAMBLE_INSERT
|
|
84
|
-
"""
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
class POdin10G1S6P_b(FamilyF):
|
|
88
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
89
|
-
super().__init__(conn, module_id, port_id)
|
|
90
|
-
self.runt = Runt(conn, module_id, port_id)
|
|
91
|
-
"""Runt settings."""
|
|
92
|
-
|
|
93
|
-
self.preamble = Preamble(conn, module_id, port_id)
|
|
94
|
-
"""Preamble settiNgs."""
|
|
95
|
-
|
|
96
|
-
class POdin10G6S6P_a(FamilyF):
|
|
97
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
98
|
-
super().__init__(conn, module_id, port_id)
|
|
99
|
-
self.runt = Runt(conn, module_id, port_id)
|
|
100
|
-
"""Runt settings."""
|
|
101
|
-
|
|
102
|
-
self.preamble = Preamble(conn, module_id, port_id)
|
|
103
|
-
"""Preamble settiNgs."""
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
class POdin10G1S2PT(FamilyF):
|
|
107
|
-
"""L23 port on Odin-10G-1S-2P-T module.
|
|
108
|
-
"""
|
|
109
|
-
...
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
class POdin10G1S2P_d(FamilyF):
|
|
113
|
-
"""L23 port on Odin-10G-1S-2P[d] module.
|
|
114
|
-
"""
|
|
115
|
-
...
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
class POdin10G1S12P(FamilyF):
|
|
119
|
-
"""L23 port on Odin-10G-1S-12P module.
|
|
120
|
-
"""
|
|
121
|
-
...
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
class POdin40G2S2P(FamilyF):
|
|
125
|
-
"""L23 port on Odin-40G-2S-2P module.
|
|
126
|
-
"""
|
|
127
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
128
|
-
super().__init__(conn, module_id, port_id)
|
|
129
|
-
self.dynamic = P_DYNAMIC(conn, module_id, port_id)
|
|
130
|
-
"""L23 port's dynamic traffic change.
|
|
131
|
-
|
|
132
|
-
:type: P_DYNAMIC
|
|
133
|
-
"""
|
|
134
|
-
|
|
135
|
-
on_dynamic_change = functools.partialmethod(utils.on_event, P_DYNAMIC)
|
|
136
|
-
"""Register a callback to the event that the port's dynamic traffic setting changes."""
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
class POdin40G2S2PB(FamilyF):
|
|
140
|
-
"""L23 port on Odin-40G-2S-2P-B module.
|
|
141
|
-
"""
|
|
142
|
-
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
143
|
-
super().__init__(conn, module_id, port_id)
|
|
144
|
-
self.dynamic = P_DYNAMIC(conn, module_id, port_id)
|
|
145
|
-
"""L23 port's dynamic traffic change.
|
|
146
|
-
|
|
147
|
-
:type: P_DYNAMIC
|
|
148
|
-
"""
|
|
149
|
-
|
|
150
|
-
on_dynamic_change = functools.partialmethod(utils.on_event, P_DYNAMIC)
|
|
151
|
-
"""Register a callback to the event that the port's dynamic traffic setting changes."""
|