tdl-xoa-driver 1.5.0b1__py3-none-any.whl → 1.5.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.0b1.dist-info → tdl_xoa_driver-1.5.1.dist-info}/METADATA +8 -8
- {tdl_xoa_driver-1.5.0b1.dist-info → tdl_xoa_driver-1.5.1.dist-info}/RECORD +16 -15
- xoa_driver/__init__.py +1 -1
- xoa_driver/functions/cli/__init__.py +5 -5
- xoa_driver/functions/cli/_cli_manager.py +2 -2
- xoa_driver/functions/cli/port_config.py +17 -8
- xoa_driver/functions/cli/{test_case_config.py → testbed_config.py} +55 -48
- xoa_driver/internals/commands/p_commands.py +38 -2
- xoa_driver/internals/commands/pl1_commands.py +130 -73
- xoa_driver/internals/commands/pp_commands.py +44 -55
- xoa_driver/internals/hli/ports/port_l23/edun_l1.py +181 -0
- xoa_driver/internals/hli/ports/port_l23/family_edun.py +9 -9
- xoa_driver/internals/hli/ports/port_l23/family_l1.py +8 -8
- {tdl_xoa_driver-1.5.0b1.dist-info → tdl_xoa_driver-1.5.1.dist-info}/WHEEL +0 -0
- {tdl_xoa_driver-1.5.0b1.dist-info → tdl_xoa_driver-1.5.1.dist-info}/licenses/LICENSE +0 -0
- {tdl_xoa_driver-1.5.0b1.dist-info → tdl_xoa_driver-1.5.1.dist-info}/top_level.txt +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tdl-xoa-driver
|
|
3
|
-
Version: 1.5.
|
|
4
|
-
Summary: XOA
|
|
3
|
+
Version: 1.5.1
|
|
4
|
+
Summary: TDL XOA Python API is a Python library providing user-friendly communication interfaces to Teledyne LeCroy Xena Ethernet traffic generation test equipment. It provides a rich collection of APIs that can be used to either write test scripts or develop applications.
|
|
5
5
|
Home-page: https://github.com/xenanetworks/tdl-xoa-driver
|
|
6
6
|
Author: Leonard Yu, Zoltan Hanisch
|
|
7
7
|
Author-email: Leonard.Yu@teledyne.com, Zoltan.Hanisch@teledyne.com
|
|
8
8
|
Maintainer: Teledyne LeCroy Xena
|
|
9
9
|
Maintainer-email: xena-sales@teledyne.com
|
|
10
10
|
License: Apache 2.0
|
|
11
|
-
Classifier: Development Status ::
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
14
14
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
@@ -33,15 +33,15 @@ Dynamic: requires-python
|
|
|
33
33
|
Dynamic: summary
|
|
34
34
|
|
|
35
35
|
 [](https://pypi.python.org/pypi/tdl-xoa-driver) [](https://docs.xenanetworks.com/projects/tdl-xoa-driver/en/latest/?badge=latest)
|
|
36
|
-
# XOA
|
|
37
|
-
XOA
|
|
36
|
+
# TDL XOA Python API
|
|
37
|
+
TDL XOA Python API is a standalone Python library that provides a user-friendly and powerful interface for automating network testing tasks using Xena Networks test equipment. Xena test equipment is a high-performance network test device designed for testing and measuring the performance of network equipment and applications.
|
|
38
38
|
|
|
39
39
|
## Introduction
|
|
40
|
-
The XOA
|
|
40
|
+
The TDL XOA Python API is designed to be easy to use and integrate with other automation tools and frameworks. It provides a comprehensive set of methods and classes for interacting with Xena test equipment, including the ability to create and run complex test scenarios, generate and analyze traffic at line rate, and perform detailed analysis of network performance and behavior.
|
|
41
41
|
|
|
42
|
-
The XOA
|
|
42
|
+
The TDL XOA Python API simplifies the process of automating network testing tasks using Xena test equipment. It provides a simple, yet powerful, interface for interacting with Xena test equipment using the Python programming language. With the TDL XOA Python API, network engineers and testing professionals can easily create and execute test scenarios, generate and analyze traffic, and perform detailed analysis of network performance and behavior, all while leveraging the power and flexibility of the Python programming language.
|
|
43
43
|
|
|
44
|
-
Overall, the XOA
|
|
44
|
+
Overall, the TDL XOA Python API is a valuable tool for anyone looking to automate their network testing tasks using Xena test equipment. With its simple, yet powerful, interface and support for the Python programming language, the TDL XOA Python API provides a flexible and extensible framework for automating network testing tasks and improving the quality of network infrastructure.
|
|
45
45
|
|
|
46
46
|
## Documentation
|
|
47
47
|
The user documentation is hosted:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
tdl_xoa_driver-1.5.
|
|
2
|
-
xoa_driver/__init__.py,sha256=
|
|
1
|
+
tdl_xoa_driver-1.5.1.dist-info/licenses/LICENSE,sha256=Oc3Sih78tKR5tfTaIGcU3qytyX6JAzzAUlwW-qQaRaQ,11351
|
|
2
|
+
xoa_driver/__init__.py,sha256=MoOXtGN9R7FyYbx-Vk03Fpdi6RNSyOSebZNGDSn2Xls,48
|
|
3
3
|
xoa_driver/enums.py,sha256=SgwfIdPYol1AOZ-vl0ZtV3pRc3qXjm6QMq8ryOzjmuY,8559
|
|
4
4
|
xoa_driver/exceptions.py,sha256=baNpophPmeNujMTSfL9TsYHa3Gju2-ozNOg78n8tqN8,1957
|
|
5
5
|
xoa_driver/hlfuncs.py,sha256=tfyhbYX86XWpc4yFoBrj1OYqVJJfDnoxC6tHLlWTHkQ,311
|
|
@@ -16,12 +16,12 @@ xoa_driver/functions/exceptions.py,sha256=JlQSHNmiSS_mOQygqituLQF5fFVg38LG4Ktz7q
|
|
|
16
16
|
xoa_driver/functions/headers.py,sha256=Rf_em8LqCZOz0oxiqvtAFwx71_CtD9_I0p-vEZWtc6E,33886
|
|
17
17
|
xoa_driver/functions/mgmt.py,sha256=njuTrUDgtXwNk0OllFjCObVJXwQ4l4-a2RA7KAORpZU,16513
|
|
18
18
|
xoa_driver/functions/tools.py,sha256=d4p-v49qwXCQW1NFKRhLmT7Lje2H8EGaRy2inDmLJ18,9786
|
|
19
|
-
xoa_driver/functions/cli/__init__.py,sha256=
|
|
20
|
-
xoa_driver/functions/cli/_cli_manager.py,sha256=
|
|
19
|
+
xoa_driver/functions/cli/__init__.py,sha256=1qCG8oiucQ51v8tS6mAvu9MpBDQ4dqDhzx-EvdhDTQQ,458
|
|
20
|
+
xoa_driver/functions/cli/_cli_manager.py,sha256=MKU2wS0Gxd514zvyWsm4qiYg-WLPA6vrHZy2QFcqpsU,22166
|
|
21
21
|
xoa_driver/functions/cli/_config_block.py,sha256=KaNiAq4ht6Hfoo7iE2h03SAXhE3WX5efyHJcE74dYto,12245
|
|
22
22
|
xoa_driver/functions/cli/_socket_driver.py,sha256=rVmkSQZr4Ygu8NNkOSuW9_5dqaSc0kpF1SUaV2jPwJs,3334
|
|
23
|
-
xoa_driver/functions/cli/port_config.py,sha256=
|
|
24
|
-
xoa_driver/functions/cli/
|
|
23
|
+
xoa_driver/functions/cli/port_config.py,sha256=VYsrRyuB7gctUlNLb2gqYXz_slj41lkdAGsj8AePqCU,4534
|
|
24
|
+
xoa_driver/functions/cli/testbed_config.py,sha256=EU2xZHFO4ugWK-cEg9IA2foNON2-n2RjTej0cN68M-U,8229
|
|
25
25
|
xoa_driver/functions/cmis/__init__.py,sha256=AWHrzTQYDJFmC_7vkZfin6AhehyQRojxbWLUNhCIlzc,113
|
|
26
26
|
xoa_driver/functions/cmis/_constants.py,sha256=VqjqpeByPEHMnMNdEeQe8hwUe6-QwtOMDwusiay638g,645
|
|
27
27
|
xoa_driver/functions/cmis/_replies.py,sha256=kw-7Ua_Ddu5_9fjVwQfEI-AlyPy6-c7uS7HyPKgNHHQ,22975
|
|
@@ -38,7 +38,7 @@ xoa_driver/internals/commands/m_commands.py,sha256=gslylrFybNN4juTqNkCENiGWvosWz
|
|
|
38
38
|
xoa_driver/internals/commands/p4_commands.py,sha256=3nj6suKf0PCC7jMSGidzeAmm4VTpFd5qz2FukuF5R40,78768
|
|
39
39
|
xoa_driver/internals/commands/p4e_commands.py,sha256=2hIa6S5aHY_Bht1QQ3ql3cFTLoWwwcGzvslAXeXc6rg,5056
|
|
40
40
|
xoa_driver/internals/commands/p4g_commands.py,sha256=noIrvLYsjrc_t9hQ0msOCaOA0NsVNdTIySIjHoJEnOM,292438
|
|
41
|
-
xoa_driver/internals/commands/p_commands.py,sha256=
|
|
41
|
+
xoa_driver/internals/commands/p_commands.py,sha256=GlZ1P2zAlKZPlePs-apRyYEjsKreKbdHg4NuCsl02Uw,230083
|
|
42
42
|
xoa_driver/internals/commands/pc_commands.py,sha256=uJe-wTla8vVDFChfSqpDNbpxCwx9OJ7WET2oM5KNHOs,11060
|
|
43
43
|
xoa_driver/internals/commands/pd_commands.py,sha256=s0Ts7RN6WASyUGuuGmlxEPxDKSsnM50SXRbIFhTtsiQ,12492
|
|
44
44
|
xoa_driver/internals/commands/pe_commands.py,sha256=z5YgV85RMw6CFYQF5Z8qKyCujiGk1psV-KYEdZeIBkU,38690
|
|
@@ -46,10 +46,10 @@ xoa_driver/internals/commands/pec_commands.py,sha256=bu2uSpMObsGob1QM4YzyhVAW6aN
|
|
|
46
46
|
xoa_driver/internals/commands/ped_commands.py,sha256=J_QQxgrun71UWFpOQTFBxZe5tK-hOPxtCWiAGFKSc8Y,39736
|
|
47
47
|
xoa_driver/internals/commands/pef_commands.py,sha256=q-JLQ2-JOHwfu-Ku28cc89mwJtKP_rJ9-QtFvOOxNVk,82219
|
|
48
48
|
xoa_driver/internals/commands/pf_commands.py,sha256=5PVBA8N6G-1O6PN1l1XmmKKYS8DkGRz2NV6z6NuppKU,14540
|
|
49
|
-
xoa_driver/internals/commands/pl1_commands.py,sha256=
|
|
49
|
+
xoa_driver/internals/commands/pl1_commands.py,sha256=oJVLGGoSDyL3X8Llmhm36Ajp38gsJgQLcI69RXZEHnE,69312
|
|
50
50
|
xoa_driver/internals/commands/pl_commands.py,sha256=znhmeTgPlqURsJ2dxIvQnOioE-qU2650fLtHaK0ZiMs,6382
|
|
51
51
|
xoa_driver/internals/commands/pm_commands.py,sha256=tlt3yoEpCnjRmJ2EEq-BCOeBH4oppXvl5mea172Z_KA,9514
|
|
52
|
-
xoa_driver/internals/commands/pp_commands.py,sha256=
|
|
52
|
+
xoa_driver/internals/commands/pp_commands.py,sha256=VK03-T3695ehn9l_tBNmKYf4L7qo-mxUAcpxLalq_Vk,82448
|
|
53
53
|
xoa_driver/internals/commands/pr_commands.py,sha256=CeDP8ZJPGiwFUKkgFfYN84loNwWDxQdHV4Fi2JVuYZI,31871
|
|
54
54
|
xoa_driver/internals/commands/ps_commands.py,sha256=o5x24Z7kz-3jXRsTxmehkmG_0pbeYLldFbtPgu6fEZQ,96440
|
|
55
55
|
xoa_driver/internals/commands/pt_commands.py,sha256=bBWPSppymycMH3CDZLQJoDXR2YdRsGJpVB3MVRNa81Q,15187
|
|
@@ -147,10 +147,11 @@ xoa_driver/internals/hli/modules/modules_l23/module_l23_base.py,sha256=TIB77QUNf
|
|
|
147
147
|
xoa_driver/internals/hli/ports/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
148
148
|
xoa_driver/internals/hli/ports/base_port.py,sha256=8p25Wh2lTd9CEFueuhm-y8yvNMIW8yoz6oUxVbWlFC8,3646
|
|
149
149
|
xoa_driver/internals/hli/ports/port_l23/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
150
|
+
xoa_driver/internals/hli/ports/port_l23/edun_l1.py,sha256=bXOzhk_TByWdmaTQf4ZlpEdvJBKNtxMsSJnEd2V4dBs,5853
|
|
150
151
|
xoa_driver/internals/hli/ports/port_l23/family_combi.py,sha256=0FCeQ0B2Jjth7jqvJexSI6ODCZk6Rm48_Vr_edZBRyI,1001
|
|
151
152
|
xoa_driver/internals/hli/ports/port_l23/family_d.py,sha256=o9QzNcBORpAbsFSl_MN83J4Tjhmk7w77bAN2FlRyyWQ,1166
|
|
152
153
|
xoa_driver/internals/hli/ports/port_l23/family_e.py,sha256=s7aL5b9d9E8Zsm63oIqA6ZUZ74PPug8GPWpsHQsJRCs,2678
|
|
153
|
-
xoa_driver/internals/hli/ports/port_l23/family_edun.py,sha256=
|
|
154
|
+
xoa_driver/internals/hli/ports/port_l23/family_edun.py,sha256=Rm95n8z6qLNTE41nbhr_VaK8tJ4yy8boKyIWgQwOZbs,2275
|
|
154
155
|
xoa_driver/internals/hli/ports/port_l23/family_f.py,sha256=vx0rN-vQP7v8m5Pcc6RvlisNui0IxMxKvab54Iwn2_4,4007
|
|
155
156
|
xoa_driver/internals/hli/ports/port_l23/family_g.py,sha256=OeDpsOr-65V_FWuhifeXH3gaJpKbyftdtWgU8X-_ous,2011
|
|
156
157
|
xoa_driver/internals/hli/ports/port_l23/family_h.py,sha256=MeUehj0unvHX9W3glfVORKdqX8kbu-hmZvMtwJbE-go,1840
|
|
@@ -158,7 +159,7 @@ xoa_driver/internals/hli/ports/port_l23/family_i.py,sha256=ZHXXiO0LOUbRCSXcYize1
|
|
|
158
159
|
xoa_driver/internals/hli/ports/port_l23/family_j.py,sha256=SZ2RYsI63Z6xatcfIcyLobrpuuofdEFty3JU51s2tcY,1858
|
|
159
160
|
xoa_driver/internals/hli/ports/port_l23/family_k.py,sha256=X8l9kZe58dizhzNbC-JY3z2m-_YwsGdE_tf_73NiZw0,1952
|
|
160
161
|
xoa_driver/internals/hli/ports/port_l23/family_l.py,sha256=Ao3-XNKpBi-4s49guS5Yc8Hk0DWX0yJ40YMnL0KjzdU,2148
|
|
161
|
-
xoa_driver/internals/hli/ports/port_l23/family_l1.py,sha256=
|
|
162
|
+
xoa_driver/internals/hli/ports/port_l23/family_l1.py,sha256=DifAvVGI48gx4ps1syQJ1B1FnxYz9gkLhQVqcCv1pxc,3867
|
|
162
163
|
xoa_driver/internals/hli/ports/port_l23/family_m.py,sha256=rvYpgYvN9Mrb_abxW-J1Zwn-36nCh_oBrNF0IV2qcIE,779
|
|
163
164
|
xoa_driver/internals/hli/ports/port_l23/fault_jkl.py,sha256=vsbpTsBGhQJHlb6cdhaKIIosif4Vh5mn5luYO_tOPtk,641
|
|
164
165
|
xoa_driver/internals/hli/ports/port_l23/freya_l1.py,sha256=wdNZDLHrSd3SxFVR3-C3ZPcE4SzjfcdsoLeKjV6_UuI,28777
|
|
@@ -224,7 +225,7 @@ xoa_driver/internals/utils/managers/abc.py,sha256=M3XgI2FVQLUXixS5SKnZTm0MweHY6D
|
|
|
224
225
|
xoa_driver/internals/utils/managers/exceptions.py,sha256=fqLSin-OQCIKuhpzvK6RZThF3FJ8FsHers4EmqM9gSs,628
|
|
225
226
|
xoa_driver/internals/utils/managers/modules_manager.py,sha256=sCEhqUu7Waot16rucJ5nI9FyHuFEeU_sBx1JjZdhDJg,3236
|
|
226
227
|
xoa_driver/internals/utils/managers/ports_manager.py,sha256=FRizJ4-V0iE66cSuswW01-6QvXhCuGxHGvmtaDVOeFg,3484
|
|
227
|
-
tdl_xoa_driver-1.5.
|
|
228
|
-
tdl_xoa_driver-1.5.
|
|
229
|
-
tdl_xoa_driver-1.5.
|
|
230
|
-
tdl_xoa_driver-1.5.
|
|
228
|
+
tdl_xoa_driver-1.5.1.dist-info/METADATA,sha256=YTQ9KKaQNsNZ7N8dr5OOY_4tmPzxbsM9J9ln3ve6Huo,4176
|
|
229
|
+
tdl_xoa_driver-1.5.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
230
|
+
tdl_xoa_driver-1.5.1.dist-info/top_level.txt,sha256=sBbN3hwpa4s2VxsUBoWJ5jIqqDr50vgcEb-V8kL7pvE,11
|
|
231
|
+
tdl_xoa_driver-1.5.1.dist-info/RECORD,,
|
xoa_driver/__init__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = "1.5.
|
|
1
|
+
__version__ = "1.5.1"
|
|
2
2
|
__short_version__ = "1.5"
|
|
@@ -6,16 +6,16 @@ from .port_config import (
|
|
|
6
6
|
load_port_config,
|
|
7
7
|
port_config_from_file,
|
|
8
8
|
)
|
|
9
|
-
from .
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
from .testbed_config import (
|
|
10
|
+
save_testbed_config,
|
|
11
|
+
load_testbed_config,
|
|
12
12
|
module_config_from_file,
|
|
13
13
|
)
|
|
14
14
|
__all__ = (
|
|
15
15
|
"save_port_config",
|
|
16
16
|
"load_port_config",
|
|
17
17
|
"port_config_from_file",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
18
|
+
"save_testbed_config",
|
|
19
|
+
"load_testbed_config",
|
|
20
20
|
"module_config_from_file",
|
|
21
21
|
)
|
|
@@ -150,12 +150,12 @@ class XOACLIManager:
|
|
|
150
150
|
# Check for C_LOGON or password in string, as a safeguard
|
|
151
151
|
if re.search(r'C_LOGON\s*".*"', msg) or re.search(r'password\s*=\s*".*"', msg, flags=re.IGNORECASE) or re.search(r'--password=\S+', msg, flags=re.IGNORECASE):
|
|
152
152
|
logging.info(f"{time.time()} [Sensitive command redacted]")
|
|
153
|
-
print(f"{time.time()} [Sensitive command redacted]")
|
|
153
|
+
# print(f"{time.time()} [Sensitive command redacted]")
|
|
154
154
|
return
|
|
155
155
|
# Redact as an additional precaution
|
|
156
156
|
safe_msg = _redact_sensitive(msg)
|
|
157
157
|
logging.info(f"{time.time()} {safe_msg}")
|
|
158
|
-
print(f"{time.time()} {safe_msg}")
|
|
158
|
+
# print(f"{time.time()} {safe_msg}")
|
|
159
159
|
def log_command(self, cmd:str) -> None:
|
|
160
160
|
"""Place the command in the log cmd list for later logging
|
|
161
161
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import asyncio
|
|
2
2
|
from xoa_driver import testers, ports
|
|
3
|
+
from typing import List, Tuple
|
|
3
4
|
from ._cli_manager import XOACLIManager
|
|
4
5
|
from ._config_block import *
|
|
5
6
|
|
|
6
7
|
async def save_port_config(tester: testers.L23Tester, port: ports.GenericL23Port, path: str, debug=False, halt_on_error=False) -> str:
|
|
7
|
-
"""Save
|
|
8
|
+
"""Save port config to the specified filepath
|
|
8
9
|
|
|
9
10
|
:param tester: Chassis object
|
|
10
11
|
:type tester: testers.L23Tester
|
|
@@ -48,12 +49,12 @@ async def save_port_config(tester: testers.L23Tester, port: ports.GenericL23Port
|
|
|
48
49
|
|
|
49
50
|
# Save configuration to file
|
|
50
51
|
result = port_config_block.config_block_str
|
|
51
|
-
with open(path, 'w+'
|
|
52
|
+
with open(path, 'w+') as xpcfile:
|
|
52
53
|
xpcfile.write(result)
|
|
53
54
|
return result
|
|
54
55
|
|
|
55
|
-
async def load_port_config(tester: testers.L23Tester, port: ports.GenericL23Port, path: str, debug=False, halt_on_error=False) ->
|
|
56
|
-
"""Load
|
|
56
|
+
async def load_port_config(tester: testers.L23Tester, port: ports.GenericL23Port, path: str, debug=False, halt_on_error=False) -> List[Tuple[str, str]]:
|
|
57
|
+
"""Load port config from the specified filepath
|
|
57
58
|
|
|
58
59
|
:param tester: Chassis object
|
|
59
60
|
:type tester: testers.L23Tester
|
|
@@ -61,6 +62,8 @@ async def load_port_config(tester: testers.L23Tester, port: ports.GenericL23Port
|
|
|
61
62
|
:type port: ports.GenericL23Port
|
|
62
63
|
:param load_path: File path to load the port configuration from
|
|
63
64
|
:type load_path: str
|
|
65
|
+
:return: List of tuples containing response and the corresponding command sent
|
|
66
|
+
:rtype: List[Tuple[str, str]]
|
|
64
67
|
"""
|
|
65
68
|
|
|
66
69
|
tester_ip = tester.info.host
|
|
@@ -77,8 +80,10 @@ async def load_port_config(tester: testers.L23Tester, port: ports.GenericL23Port
|
|
|
77
80
|
# Reserve the port before applying configuration
|
|
78
81
|
xm.reserve_port(port_index)
|
|
79
82
|
|
|
83
|
+
result: List[Tuple[str, str]] = []
|
|
84
|
+
|
|
80
85
|
# Read configuration from file
|
|
81
|
-
with open(path, 'r',
|
|
86
|
+
with open(path, 'r', encoding='utf-8') as xpcfile:
|
|
82
87
|
config_data = xpcfile.read()
|
|
83
88
|
|
|
84
89
|
# Deserialize config block and send CLI commands
|
|
@@ -87,12 +92,14 @@ async def load_port_config(tester: testers.L23Tester, port: ports.GenericL23Port
|
|
|
87
92
|
cli_cmds = config_block.commands
|
|
88
93
|
for cmd in cli_cmds:
|
|
89
94
|
if cmd.strip(): # Ensure the command is not empty
|
|
90
|
-
xm.send(cmd=f"{port_index} {cmd}", sync_on=False)
|
|
95
|
+
resp = xm.send(cmd=f"{port_index} {cmd}", sync_on=False)
|
|
96
|
+
result.append((resp, f"{port_index} {cmd}"))
|
|
91
97
|
|
|
92
98
|
# Free the port after applying configuration
|
|
93
99
|
xm.free_port(port_index)
|
|
100
|
+
return result
|
|
94
101
|
|
|
95
|
-
async def port_config_from_file(tester: testers.L23Tester, port: ports.GenericL23Port, path: str, debug=False, halt_on_error=False) ->
|
|
102
|
+
async def port_config_from_file(tester: testers.L23Tester, port: ports.GenericL23Port, path: str, debug=False, halt_on_error=False) -> List[Tuple[str, str]]:
|
|
96
103
|
"""Load port configuration from the specifiied filepath. This function is a wrapper around load_port_config to provide backward compatibility.
|
|
97
104
|
|
|
98
105
|
:param tester: Chassis object
|
|
@@ -101,7 +108,9 @@ async def port_config_from_file(tester: testers.L23Tester, port: ports.GenericL2
|
|
|
101
108
|
:type port: ports.GenericL23Port
|
|
102
109
|
:param load_path: File path to load the port configuration from
|
|
103
110
|
:type load_path: str
|
|
111
|
+
:return: List of tuples containing response and command sent
|
|
112
|
+
:rtype: List[Tuple[str, str]]
|
|
104
113
|
"""
|
|
105
|
-
await load_port_config(tester, port, path, debug=debug, halt_on_error=halt_on_error)
|
|
114
|
+
return await load_port_config(tester, port, path, debug=debug, halt_on_error=halt_on_error)
|
|
106
115
|
|
|
107
116
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import asyncio
|
|
2
2
|
from xoa_driver import testers, modules, ports
|
|
3
3
|
from ._cli_manager import XOACLIManager
|
|
4
|
-
from typing import List
|
|
4
|
+
from typing import List, Tuple
|
|
5
5
|
from ..mgmt import *
|
|
6
6
|
from ._config_block import *
|
|
7
7
|
|
|
8
|
-
async def
|
|
9
|
-
"""Save
|
|
8
|
+
async def save_testbed_config(tester: testers.L23Tester, ports: List[ports.GenericL23Port], path: str, testbed_name: str = "<testbed>", with_module_config: bool = True, debug=False, halt_on_error=False) -> str:
|
|
9
|
+
"""Save testbed configuration to the specifiied filepath
|
|
10
10
|
|
|
11
11
|
:param tester: Chassis object
|
|
12
12
|
:type tester: testers.L23Tester
|
|
@@ -90,13 +90,13 @@ async def save_test_case_config(tester: testers.L23Tester, ports: List[ports.Gen
|
|
|
90
90
|
port_config_block.commands = raw_resp[0]
|
|
91
91
|
result += "\n" + ";\n" + port_config_block.config_block_str
|
|
92
92
|
|
|
93
|
-
with open(path, 'w+'
|
|
93
|
+
with open(path, 'w+') as xtcfile:
|
|
94
94
|
xtcfile.write(result)
|
|
95
95
|
|
|
96
96
|
return result
|
|
97
97
|
|
|
98
|
-
async def
|
|
99
|
-
"""Load
|
|
98
|
+
async def load_testbed_config(tester: testers.L23Tester, path: str, mode: str = "default", delay_after_module_config: int = 5, debug=False, halt_on_error=False) -> List[Tuple[str, str]]:
|
|
99
|
+
"""Load testbed configuration from the specifiied filepath
|
|
100
100
|
|
|
101
101
|
:param tester: Chassis object
|
|
102
102
|
:type tester: testers.L23Tester
|
|
@@ -106,6 +106,8 @@ async def load_test_case_config(tester: testers.L23Tester, path: str, mode: str
|
|
|
106
106
|
:type mode: str
|
|
107
107
|
:param delay_after_module_config: Delay in seconds after configuring each module to ensure proper configuration
|
|
108
108
|
:type delay_after_module_config: int
|
|
109
|
+
:return: List of tuples containing response and the corresponding command sent
|
|
110
|
+
:rtype: List[Tuple[str, str]]
|
|
109
111
|
"""
|
|
110
112
|
|
|
111
113
|
tester_ip = tester.info.host
|
|
@@ -118,50 +120,55 @@ async def load_test_case_config(tester: testers.L23Tester, path: str, mode: str
|
|
|
118
120
|
# Log on and set username
|
|
119
121
|
xm.logon_set_owner(tester_password)
|
|
120
122
|
|
|
123
|
+
result: List[Tuple[str, str]] = []
|
|
124
|
+
|
|
121
125
|
# Read configuration from file
|
|
122
|
-
with open(path, 'r'
|
|
126
|
+
with open(path, 'r') as xpcfile:
|
|
123
127
|
config_data = xpcfile.read()
|
|
124
128
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
129
|
+
# Parse the config data to configure modules and ports block by block
|
|
130
|
+
config_datas = config_data.split(f";\n")
|
|
131
|
+
for block in config_datas:
|
|
132
|
+
if config_block_type(config_block_str=block) == ConfigMetadataType.MODULE and mode in ["default", "module"]:
|
|
133
|
+
module_block = ConfigBlock()
|
|
134
|
+
module_block.config_block_str = block
|
|
135
|
+
module_index = module_block.module_id
|
|
136
|
+
|
|
137
|
+
# Free the module before applying configuration
|
|
138
|
+
module = tester.modules.obtain(int(module_index))
|
|
139
|
+
await release_module(module=module, should_release_ports=True)
|
|
140
|
+
# Reserve the module before applying configuration
|
|
141
|
+
xm.reserve_module(module_index)
|
|
142
|
+
|
|
143
|
+
# Send each command to the tester
|
|
144
|
+
for cmd in module_block.commands:
|
|
145
|
+
if cmd.strip(): # Ensure the command is not empty
|
|
146
|
+
# print(f"Applying command: {module_index} {cmd}")
|
|
147
|
+
resp = xm.send(cmd=f"{module_index} {cmd}", sync_on=False)
|
|
148
|
+
result.append((resp, f"{module_index} {cmd}"))
|
|
149
|
+
# Free the module after applying configuration
|
|
150
|
+
xm.free_module(module_index)
|
|
151
|
+
await asyncio.sleep(delay_after_module_config) # Small delay to ensure proper module configuration
|
|
152
|
+
|
|
153
|
+
elif config_block_type(config_block_str=block) == ConfigMetadataType.PORT and mode in ["default", "port"]:
|
|
154
|
+
port_block = ConfigBlock()
|
|
155
|
+
port_block.config_block_str = block
|
|
156
|
+
port_index = port_block.port_id
|
|
157
|
+
|
|
158
|
+
# Reserve the port before applying configuration
|
|
159
|
+
xm.reserve_port(port_index)
|
|
160
|
+
|
|
161
|
+
# Send each command to the tester
|
|
162
|
+
for cmd in port_block.commands:
|
|
163
|
+
if cmd.strip(): # Ensure the command is not empty
|
|
164
|
+
# print(f"Applying command: {port_index} {cmd}")
|
|
165
|
+
resp = xm.send(cmd=f"{port_index} {cmd}", sync_on=False)
|
|
166
|
+
result.append((resp, f"{port_index} {cmd}"))
|
|
167
|
+
# Free the port after applying configuration
|
|
168
|
+
xm.free_port(port_index)
|
|
169
|
+
return result
|
|
170
|
+
|
|
171
|
+
async def module_config_from_file(tester: testers.L23Tester, path: str, debug=False, halt_on_error=False) -> List[Tuple[str, str]]:
|
|
165
172
|
"""Load module configuration from the specifiied filepath. This function is a wrapper around load_module_config to provide backward compatibility.
|
|
166
173
|
|
|
167
174
|
:param tester: Chassis object
|
|
@@ -169,4 +176,4 @@ async def module_config_from_file(tester: testers.L23Tester, path: str, debug=Fa
|
|
|
169
176
|
:param path: File path to load the module configuration from
|
|
170
177
|
:type path: str
|
|
171
178
|
"""
|
|
172
|
-
await
|
|
179
|
+
return await load_testbed_config(tester, path, mode="module", debug=debug, halt_on_error=halt_on_error)
|
|
@@ -601,7 +601,44 @@ class P_CAPABILITIES:
|
|
|
601
601
|
* Bit 0: Normal modifier (16/24-bit) supports little-endian
|
|
602
602
|
* Bit 1: Extended modifier (32-bit) supports little-endian
|
|
603
603
|
"""
|
|
604
|
-
|
|
604
|
+
capture_bitmask: int = field(XmpInt(), min_version=470)
|
|
605
|
+
"""integer, bitmask indicating capture capabilities.
|
|
606
|
+
|
|
607
|
+
If all bits are 0: CAPTURE_NOT_SUPPORTED
|
|
608
|
+
|
|
609
|
+
Bits [0:11] are for Start triggers:
|
|
610
|
+
|
|
611
|
+
* Bit 0: CAPTURE_START_ON
|
|
612
|
+
* Bit 1: CAPTURE_START_FCSERROR
|
|
613
|
+
* Bit 2: CAPTURE_START_FILTER
|
|
614
|
+
* Bit 3: CAPTURE_START_PLDERROR
|
|
615
|
+
* Bit 4-11: Reserved
|
|
616
|
+
|
|
617
|
+
Bits [12:23] are for Stop triggers:
|
|
618
|
+
|
|
619
|
+
* Bit 12: CAPTURE_STOP_FULL
|
|
620
|
+
* Bit 13: CAPTURE_STOP_FCSERROR
|
|
621
|
+
* Bit 14: CAPTURE_STOP_FILTER
|
|
622
|
+
* Bit 15: CAPTURE_STOP_PLDERROR
|
|
623
|
+
* Bit 16: CAPTURE_STOP_USERSTOP
|
|
624
|
+
* Bit 17-23: Reserved
|
|
625
|
+
|
|
626
|
+
Bits [24:31] are for Keep modes:
|
|
627
|
+
|
|
628
|
+
* Bit 24: CAPTURE_KEEP_ALL
|
|
629
|
+
* Bit 25: CAPTURE_KEEP_FCSERR
|
|
630
|
+
* Bit 26: CAPTURE_KEEP_NOTPLD
|
|
631
|
+
* Bit 27: CAPTURE_KEEP_TPLD
|
|
632
|
+
* Bit 28: CAPTURE_KEEP_FILTER
|
|
633
|
+
* Bit 29: CAPTURE_KEEP_PLDERR
|
|
634
|
+
* Bit 30-31: Reserved
|
|
635
|
+
"""
|
|
636
|
+
num_txeq_pre: int = field(XmpInt(), min_version=470)
|
|
637
|
+
"""The number of postcursors = num_txeq - num_txeq_pre - 1."""
|
|
638
|
+
txeq_max_seq: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()], length=10), min_version=470)
|
|
639
|
+
"""max value of individual TXEQ taps, SEQuential: <pre-n> <pre-(n-q)> ... <prr1> <main> <post1> <post2> ...."""
|
|
640
|
+
txeq_min_seq: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()], length=10), min_version=470)
|
|
641
|
+
"""min-value of individual TXEQ taps, SEQuential: <pre-n> <pre-(n-q)> ... <prr1> <main> <post1> <post2> ...."""
|
|
605
642
|
|
|
606
643
|
|
|
607
644
|
def get(self) -> Token[GetDataAttr]:
|
|
@@ -1512,7 +1549,6 @@ class P_XMITONE:
|
|
|
1512
1549
|
A valid Frame Check Sum is written into the final four bytes.
|
|
1513
1550
|
|
|
1514
1551
|
:param hex_data: raw bytes of the packet in hex to transmit
|
|
1515
|
-
:rtype: typing.List[str]
|
|
1516
1552
|
"""
|
|
1517
1553
|
|
|
1518
1554
|
return Token(self._connection, build_set_request(self, module=self._module, port=self._port, hex_data=hex_data))
|
|
@@ -832,7 +832,16 @@ class PL1_PRESET_CONFIG_COEFF:
|
|
|
832
832
|
@dataclass
|
|
833
833
|
class PL1_PHYTXEQ_LEVEL:
|
|
834
834
|
"""
|
|
835
|
-
Control and monitor the equalizer settings of the on-board PHY in the transmission direction (towards the transceiver cage).
|
|
835
|
+
Control and monitor the equalizer settings (mV/dB values) of the on-board PHY in the transmission direction (towards the transceiver cage).
|
|
836
|
+
|
|
837
|
+
This command returns a variable number of tap values with module-dependent ordering:
|
|
838
|
+
|
|
839
|
+
- **Regular Freya**: Original fixed format [pre3, pre2, pre, main, post]
|
|
840
|
+
- **Loki-4P and H-Freya/Edun**: Variable number in N*pre, main, M*post layout
|
|
841
|
+
[pre_n, pre_n-1, ..., pre_1, main, post_1, post_2, ..., post_m]
|
|
842
|
+
|
|
843
|
+
Use P_CAPABILITIES to query ``numtxeqtaps`` and ``numtxeqpretaps`` to determine
|
|
844
|
+
the number of taps and layout.
|
|
836
845
|
|
|
837
846
|
.. note::
|
|
838
847
|
|
|
@@ -849,44 +858,63 @@ class PL1_PHYTXEQ_LEVEL:
|
|
|
849
858
|
_serdes_xindex: int
|
|
850
859
|
|
|
851
860
|
class GetDataAttr(ResponseBodyStruct):
|
|
852
|
-
|
|
853
|
-
"""
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
post: int = field(XmpInt())
|
|
861
|
-
"""integer, post tap value in dB/10, ranges from 0 to 187 Default = 0 (neutral)"""
|
|
862
|
-
|
|
861
|
+
tap_values: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
|
|
862
|
+
"""list of integers, TX EQ tap values in mV/dB. The number and layout depend on the platform:
|
|
863
|
+
|
|
864
|
+
- Regular Freya: [pre3, pre2, pre, main, post] where pre3/pre2 in dB/10 (0-71), pre/post in dB/10 (0-187), main in mV (507-998)
|
|
865
|
+
- Loki-4P and H-Freya/Edun: [pre_n, ..., pre_1, main, post_1, post_2, ..., post_m]
|
|
866
|
+
where N = numtxeqpretaps and M = numtxeqtaps - numtxeqpretaps - 1
|
|
867
|
+
"""
|
|
868
|
+
|
|
863
869
|
class SetDataAttr(RequestBodyStruct):
|
|
864
|
-
|
|
865
|
-
"""
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
"""integer, main tap value in mV, ranges from 507 to 998."""
|
|
872
|
-
post: int = field(XmpInt())
|
|
873
|
-
"""integer, post tap value in dB/10, ranges from 0 to 187 Default = 0 (neutral)"""
|
|
870
|
+
tap_values: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
|
|
871
|
+
"""list of integers, TX EQ tap values in mV/dB. The number and layout depend on the platform:
|
|
872
|
+
|
|
873
|
+
- Regular Freya: [pre3, pre2, pre, main, post] where pre3/pre2 in dB/10 (0-71), pre/post in dB/10 (0-187), main in mV (507-998)
|
|
874
|
+
- Loki-4P and H-Freya/Edun: [pre_n, ..., pre_1, main, post_1, post_2, ..., post_m]
|
|
875
|
+
where N = numtxeqpretaps and M = numtxeqtaps - numtxeqpretaps - 1
|
|
876
|
+
"""
|
|
874
877
|
|
|
875
878
|
def get(self) -> Token[GetDataAttr]:
|
|
879
|
+
"""Get the TX equalizer settings (mV/dB values) of the on-board PHY.
|
|
880
|
+
|
|
881
|
+
The returned tap values layout depends on the platform. Query P_CAPABILITIES
|
|
882
|
+
for ``numtxeqtaps`` and ``numtxeqpretaps`` to determine the format.
|
|
883
|
+
|
|
884
|
+
:return: list of TX EQ tap values in mV/dB
|
|
885
|
+
:rtype: PL1_PHYTXEQ_LEVEL.GetDataAttr
|
|
886
|
+
"""
|
|
876
887
|
|
|
877
888
|
return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
|
|
878
889
|
|
|
879
|
-
def set(self,
|
|
890
|
+
def set(self, tap_values: typing.List[int]) -> Token[None]:
|
|
891
|
+
"""Set the TX equalizer settings (mV/dB values) of the on-board PHY.
|
|
892
|
+
|
|
893
|
+
The tap values layout depends on the platform. Query P_CAPABILITIES
|
|
894
|
+
for ``numtxeqtaps`` and ``numtxeqpretaps`` to determine the required format.
|
|
895
|
+
|
|
896
|
+
:param tap_values: list of TX EQ tap values in mV/dB in platform-specific order
|
|
897
|
+
:type tap_values: typing.List[int]
|
|
898
|
+
"""
|
|
880
899
|
|
|
881
900
|
return Token(
|
|
882
901
|
self._connection,
|
|
883
|
-
build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex],
|
|
884
|
-
|
|
902
|
+
build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex], tap_values=tap_values))
|
|
903
|
+
|
|
885
904
|
@register_command
|
|
886
905
|
@dataclass
|
|
887
906
|
class PL1_PHYTXEQ_COEFF:
|
|
888
907
|
"""
|
|
889
|
-
Control and monitor the equalizer settings of the on-board PHY in the transmission direction (towards the transceiver cage).
|
|
908
|
+
Control and monitor the equalizer settings (IEEE coefficient values) of the on-board PHY in the transmission direction (towards the transceiver cage).
|
|
909
|
+
|
|
910
|
+
This command returns a variable number of tap values with module-dependent ordering:
|
|
911
|
+
|
|
912
|
+
- **Regular Freya**: Original fixed format [pre3, pre2, pre, main, post]
|
|
913
|
+
- **Loki-4P and H-Freya/Edun**: Variable number in N*pre, main, M*post layout
|
|
914
|
+
[pre_n, pre_n-1, ..., pre_1, main, post_1, post_2, ..., post_m]
|
|
915
|
+
|
|
916
|
+
Use P_CAPABILITIES to query ``numtxeqtaps`` and ``numtxeqpretaps`` to determine
|
|
917
|
+
the number of taps and layout.
|
|
890
918
|
|
|
891
919
|
.. note::
|
|
892
920
|
|
|
@@ -913,38 +941,48 @@ class PL1_PHYTXEQ_COEFF:
|
|
|
913
941
|
_serdes_xindex: int
|
|
914
942
|
|
|
915
943
|
class GetDataAttr(ResponseBodyStruct):
|
|
916
|
-
|
|
917
|
-
"""
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
post: int = field(XmpInt())
|
|
925
|
-
"""integer, post tap value, negative, scaled by 1E3. Default = 0 (neutral)"""
|
|
926
|
-
|
|
944
|
+
tap_values: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
|
|
945
|
+
"""list of integers, TX EQ tap values as IEEE coefficients scaled by 1E3. The number and layout depend on the platform:
|
|
946
|
+
|
|
947
|
+
- Regular Freya: [pre3, pre2, pre, main, post] where pre3/pre/post are negative, pre2/main are positive
|
|
948
|
+
- Loki-4P and H-Freya/Edun: [pre_n, ..., pre_1, main, post_1, ..., post_m]
|
|
949
|
+
where N = numtxeqpretaps and M = numtxeqtaps - numtxeqpretaps - 1
|
|
950
|
+
"""
|
|
951
|
+
|
|
927
952
|
class SetDataAttr(RequestBodyStruct):
|
|
928
|
-
|
|
929
|
-
"""
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
"""integer, main tap value, positive, scaled by 1E3. Default = 1000"""
|
|
936
|
-
post: int = field(XmpInt())
|
|
937
|
-
"""integer, post tap value, negative, scaled by 1E3. Default = 0 (neutral)"""
|
|
953
|
+
tap_values: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
|
|
954
|
+
"""list of integers, TX EQ tap values as IEEE coefficients scaled by 1E3. The number and layout depend on the platform:
|
|
955
|
+
|
|
956
|
+
- Regular Freya: [pre3, pre2, pre, main, post] where pre3/pre/post are negative, pre2/main are positive
|
|
957
|
+
- Loki-4P and H-Freya/Edun: [pre_n, ..., pre_1, main, post_1, ..., post_m]
|
|
958
|
+
where N = numtxeqpretaps and M = numtxeqtaps - numtxeqpretaps - 1
|
|
959
|
+
"""
|
|
938
960
|
|
|
939
961
|
def get(self) -> Token[GetDataAttr]:
|
|
962
|
+
"""Get the TX equalizer settings (IEEE coefficient values) of the on-board PHY.
|
|
963
|
+
|
|
964
|
+
The returned tap values layout depends on the platform. Query P_CAPABILITIES
|
|
965
|
+
for ``numtxeqtaps`` and ``numtxeqpretaps`` to determine the format.
|
|
966
|
+
|
|
967
|
+
:return: list of TX EQ tap values as IEEE coefficients scaled by 1E3
|
|
968
|
+
:rtype: PL1_PHYTXEQ_COEFF.GetDataAttr
|
|
969
|
+
"""
|
|
940
970
|
|
|
941
971
|
return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
|
|
942
972
|
|
|
943
|
-
def set(self,
|
|
973
|
+
def set(self, tap_values: typing.List[int]) -> Token[None]:
|
|
974
|
+
"""Set the TX equalizer settings (IEEE coefficient values) of the on-board PHY.
|
|
975
|
+
|
|
976
|
+
The tap values layout depends on the platform. Query P_CAPABILITIES
|
|
977
|
+
for ``numtxeqtaps`` and ``numtxeqpretaps`` to determine the required format.
|
|
978
|
+
|
|
979
|
+
:param tap_values: list of TX EQ tap values as IEEE coefficients scaled by 1E3 in platform-specific order
|
|
980
|
+
:type tap_values: typing.List[int]
|
|
981
|
+
"""
|
|
944
982
|
|
|
945
983
|
return Token(
|
|
946
984
|
self._connection,
|
|
947
|
-
build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex],
|
|
985
|
+
build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex], tap_values=tap_values))
|
|
948
986
|
|
|
949
987
|
@register_command
|
|
950
988
|
@dataclass
|
|
@@ -1345,7 +1383,16 @@ class PL1_ANLT:
|
|
|
1345
1383
|
@dataclass
|
|
1346
1384
|
class PL1_PHYTXEQ:
|
|
1347
1385
|
"""
|
|
1348
|
-
Control and monitor the equalizer settings of the on-board PHY in the transmission direction (towards the transceiver cage).
|
|
1386
|
+
Control and monitor the equalizer settings (native values) of the on-board PHY in the transmission direction (towards the transceiver cage).
|
|
1387
|
+
|
|
1388
|
+
This command returns a variable number of tap values with module-dependent ordering:
|
|
1389
|
+
|
|
1390
|
+
- **Regular Freya**: Original fixed format [pre3, pre2, pre, main, post]
|
|
1391
|
+
- **Loki-4P and H-Freya/Edun**: Variable number in N*pre, main, M*post layout
|
|
1392
|
+
[pre_n, pre_n-1, ..., pre_1, main, post_1, post_2, ..., post_m]
|
|
1393
|
+
|
|
1394
|
+
Use P_CAPABILITIES to query ``numtxeqtaps`` and ``numtxeqpretaps`` to determine
|
|
1395
|
+
the number of taps and layout.
|
|
1349
1396
|
|
|
1350
1397
|
.. note::
|
|
1351
1398
|
|
|
@@ -1362,38 +1409,48 @@ class PL1_PHYTXEQ:
|
|
|
1362
1409
|
_serdes_xindex: int
|
|
1363
1410
|
|
|
1364
1411
|
class GetDataAttr(ResponseBodyStruct):
|
|
1365
|
-
|
|
1366
|
-
"""
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
post: int = field(XmpInt())
|
|
1374
|
-
"""integer, post tap value. Default = 0 (neutral)"""
|
|
1375
|
-
|
|
1412
|
+
tap_values: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
|
|
1413
|
+
"""list of integers, TX EQ tap values (native values). The number and layout depend on the platform:
|
|
1414
|
+
|
|
1415
|
+
- Regular Freya: [pre3, pre2, pre, main, post]
|
|
1416
|
+
- Loki-4P and H-Freya/Edun: [pre_n, ..., pre_1, main, post_1, ..., post_m]
|
|
1417
|
+
where N = numtxeqpretaps and M = numtxeqtaps - numtxeqpretaps - 1
|
|
1418
|
+
"""
|
|
1419
|
+
|
|
1376
1420
|
class SetDataAttr(RequestBodyStruct):
|
|
1377
|
-
|
|
1378
|
-
"""
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
"""integer, main tap value."""
|
|
1385
|
-
post: int = field(XmpInt())
|
|
1386
|
-
"""integer, post tap value. Default = 0 (neutral)"""
|
|
1421
|
+
tap_values: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
|
|
1422
|
+
"""list of integers, TX EQ tap values (native values). The number and layout depend on the platform:
|
|
1423
|
+
|
|
1424
|
+
- Regular Freya: [pre3, pre2, pre, main, post]
|
|
1425
|
+
- Loki-4P and H-Freya/Edun: [pre_n, ..., pre_1, main, post_1, ..., post_m]
|
|
1426
|
+
where N = numtxeqpretaps and M = numtxeqtaps - numtxeqpretaps - 1
|
|
1427
|
+
"""
|
|
1387
1428
|
|
|
1388
1429
|
def get(self) -> Token[GetDataAttr]:
|
|
1430
|
+
"""Get the TX equalizer settings (native values) of the on-board PHY.
|
|
1431
|
+
|
|
1432
|
+
The returned tap values layout depends on the platform. Query P_CAPABILITIES
|
|
1433
|
+
for ``numtxeqtaps`` and ``numtxeqpretaps`` to determine the format.
|
|
1434
|
+
|
|
1435
|
+
:return: list of TX EQ tap values (native values)
|
|
1436
|
+
:rtype: PL1_PHYTXEQ.GetDataAttr
|
|
1437
|
+
"""
|
|
1389
1438
|
|
|
1390
1439
|
return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
|
|
1391
1440
|
|
|
1392
|
-
def set(self,
|
|
1441
|
+
def set(self, tap_values: typing.List[int]) -> Token[None]:
|
|
1442
|
+
"""Set the TX equalizer settings (native values) of the on-board PHY.
|
|
1443
|
+
|
|
1444
|
+
The tap values layout depends on the platform. Query P_CAPABILITIES
|
|
1445
|
+
for ``numtxeqtaps`` and ``numtxeqpretaps`` to determine the required format.
|
|
1446
|
+
|
|
1447
|
+
:param tap_values: list of TX EQ tap values (native values) in platform-specific order
|
|
1448
|
+
:type tap_values: typing.List[int]
|
|
1449
|
+
"""
|
|
1393
1450
|
|
|
1394
1451
|
return Token(
|
|
1395
1452
|
self._connection,
|
|
1396
|
-
build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex],
|
|
1453
|
+
build_set_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex], tap_values=tap_values))
|
|
1397
1454
|
|
|
1398
1455
|
@register_command
|
|
1399
1456
|
@dataclass
|
|
@@ -595,7 +595,7 @@ class PP_PMAERRPUL_PARAMS:
|
|
|
595
595
|
def set(self, duration: int, period: int, repetition: int, coeff: int, exp: int) -> Token[None]:
|
|
596
596
|
"""Set PMA pulse error injection settings.
|
|
597
597
|
|
|
598
|
-
:param duration: 0 ms -
|
|
598
|
+
:param duration: 0 ms - 5000 ms; increments of 1 ms; 0 = constant BER
|
|
599
599
|
:type duration: int
|
|
600
600
|
:param period: 10 ms - 50000 ms; number of ms - must be multiple of 10 ms
|
|
601
601
|
:type period: int
|
|
@@ -1117,7 +1117,19 @@ class PP_EYEINFO:
|
|
|
1117
1117
|
class PP_PHYTXEQ:
|
|
1118
1118
|
"""
|
|
1119
1119
|
Control and monitor the equalizer settings of the on-board PHY in the
|
|
1120
|
-
transmission direction (towards the transceiver cage)
|
|
1120
|
+
transmission direction (towards the transceiver cage).
|
|
1121
|
+
|
|
1122
|
+
This command returns a variable number of tap values with module-dependent ordering:
|
|
1123
|
+
|
|
1124
|
+
- **Legacy Loki-2P/Thor**: Original fixed format [pre, main, post, pre2, pre3, mode]
|
|
1125
|
+
- **Regular Freya**: Original fixed format [pre, main, post, pre2, pre3, mode]
|
|
1126
|
+
- **Loki-4P and H-Freya/Edun**: Variable number in N*pre, main, M*post layout
|
|
1127
|
+
[pre_n, pre_n-1, ..., pre_1, main, post_1, post_2, ..., post_m]
|
|
1128
|
+
|
|
1129
|
+
Use P_CAPABILITIES to query ``numtxeqtaps`` and ``numtxeqpretaps`` to determine
|
|
1130
|
+
the number of taps and layout:
|
|
1131
|
+
- ``numtxeqpretaps``: Number of precursor taps (N)
|
|
1132
|
+
- ``numtxeqtaps - numtxeqpretaps - 1``: Number of postcursor taps (M)
|
|
1121
1133
|
|
|
1122
1134
|
.. versionchanged:: 1.1
|
|
1123
1135
|
|
|
@@ -1132,63 +1144,46 @@ class PP_PHYTXEQ:
|
|
|
1132
1144
|
_serdes_xindex: int
|
|
1133
1145
|
|
|
1134
1146
|
class GetDataAttr(ResponseBodyStruct):
|
|
1135
|
-
|
|
1136
|
-
"""
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
"""integer, preemphasis, (range: Module dependent), default = 0 (neutral)."""
|
|
1143
|
-
pre3_post2: int = field(XmpInt())
|
|
1144
|
-
"""integer, postemphasis, (range: Module dependent), default = 0 (neutral)."""
|
|
1145
|
-
post3: int = field(XmpInt())
|
|
1146
|
-
"""integer, postemphasis, (range: Module dependent), default = 0 (neutral)."""
|
|
1147
|
-
mode: int = field(XmpInt())
|
|
1148
|
-
"""integer, value must be 4"""
|
|
1147
|
+
tap_values: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
|
|
1148
|
+
"""list of integers, TX EQ tap values. The number and layout depend on the platform:
|
|
1149
|
+
|
|
1150
|
+
- Legacy Loki-2P/Thor and Regular Freya: [pre, main, post, pre2, pre3, mode]
|
|
1151
|
+
- Loki-4P and H-Freya/Edun: [pre_n, ..., pre_1, main, post_1, ..., post_m]
|
|
1152
|
+
where N = numtxeqpretaps and M = numtxeqtaps - numtxeqpretaps - 1
|
|
1153
|
+
"""
|
|
1149
1154
|
|
|
1150
1155
|
class SetDataAttr(RequestBodyStruct):
|
|
1151
|
-
|
|
1152
|
-
"""
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
"""integer, preemphasis, (range: Module dependent), default = 0 (neutral)."""
|
|
1159
|
-
pre3_post2: int = field(XmpInt())
|
|
1160
|
-
"""integer, postemphasis, (range: Module dependent), default = 0 (neutral)."""
|
|
1161
|
-
post3: int = field(XmpInt())
|
|
1162
|
-
"""integer, postemphasis, (range: Module dependent), default = 0 (neutral)."""
|
|
1163
|
-
mode: int = field(XmpInt())
|
|
1164
|
-
"""integer, value must be 4"""
|
|
1156
|
+
tap_values: typing.List[int] = field(XmpSequence(types_chunk=[XmpInt()]))
|
|
1157
|
+
"""list of integers, TX EQ tap values. The number and layout depend on the platform:
|
|
1158
|
+
|
|
1159
|
+
- Legacy Loki-2P/Thor and Regular Freya: [pre, main, post, pre2, pre3, mode]
|
|
1160
|
+
- Loki-4P and H-Freya/Edun: [pre_n, ..., pre_1, main, post_1, ..., post_m]
|
|
1161
|
+
where N = numtxeqpretaps and M = numtxeqtaps - numtxeqpretaps - 1
|
|
1162
|
+
"""
|
|
1165
1163
|
|
|
1166
1164
|
def get(self) -> Token[GetDataAttr]:
|
|
1167
|
-
"""Get the equalizer settings of the on-board PHY
|
|
1168
|
-
|
|
1165
|
+
"""Get the TX equalizer settings of the on-board PHY.
|
|
1166
|
+
|
|
1167
|
+
The returned tap values layout depends on the platform. Query P_CAPABILITIES
|
|
1168
|
+
for ``numtxeqtaps`` and ``numtxeqpretaps`` to determine the format.
|
|
1169
1169
|
|
|
1170
|
-
:return:
|
|
1170
|
+
:return: list of TX EQ tap values
|
|
1171
1171
|
:rtype: PP_PHYTXEQ.GetDataAttr
|
|
1172
1172
|
"""
|
|
1173
1173
|
|
|
1174
1174
|
return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._serdes_xindex]))
|
|
1175
1175
|
|
|
1176
|
-
def set(self,
|
|
1177
|
-
"""Set the equalizer settings of the on-board PHY
|
|
1178
|
-
|
|
1176
|
+
def set(self, tap_values: typing.List[int]) -> Token[None]:
|
|
1177
|
+
"""Set the TX equalizer settings of the on-board PHY.
|
|
1178
|
+
|
|
1179
|
+
The tap values layout depends on the platform. Query P_CAPABILITIES
|
|
1180
|
+
for ``numtxeqtaps`` and ``numtxeqpretaps`` to determine the required format:
|
|
1181
|
+
|
|
1182
|
+
- Legacy Loki-2P/Thor and Regular Freya: [pre, main, post, pre2, pre3, mode]
|
|
1183
|
+
- Loki-4P and H-Freya/Edun: [pre_n, ..., pre_1, main, post_1, ..., post_m]
|
|
1179
1184
|
|
|
1180
|
-
:param
|
|
1181
|
-
:type
|
|
1182
|
-
:param pre: pre emphasis
|
|
1183
|
-
:type pre: int
|
|
1184
|
-
:param main: main emphasis
|
|
1185
|
-
:type main: int
|
|
1186
|
-
:param post: post emphasis
|
|
1187
|
-
:type post: int
|
|
1188
|
-
:param pre3_post2: post2 or pre3 emphasis
|
|
1189
|
-
:type pre3_post2: int
|
|
1190
|
-
:param post3: post3 emphasis
|
|
1191
|
-
:type post3: int
|
|
1185
|
+
:param tap_values: list of TX EQ tap values in platform-specific order
|
|
1186
|
+
:type tap_values: typing.List[int]
|
|
1192
1187
|
"""
|
|
1193
1188
|
|
|
1194
1189
|
return Token(
|
|
@@ -1198,13 +1193,7 @@ class PP_PHYTXEQ:
|
|
|
1198
1193
|
module=self._module,
|
|
1199
1194
|
port=self._port,
|
|
1200
1195
|
indices=[self._serdes_xindex],
|
|
1201
|
-
|
|
1202
|
-
pre=pre,
|
|
1203
|
-
main=main,
|
|
1204
|
-
post=post,
|
|
1205
|
-
pre3_post2=pre3_post2,
|
|
1206
|
-
post3=post3,
|
|
1207
|
-
mode=4))
|
|
1196
|
+
tap_values=tap_values))
|
|
1208
1197
|
|
|
1209
1198
|
|
|
1210
1199
|
@register_command
|
|
@@ -0,0 +1,181 @@
|
|
|
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
|
+
"""
|
|
@@ -17,7 +17,7 @@ from .pcs_pma_ghijkl import (
|
|
|
17
17
|
SerDes,
|
|
18
18
|
)
|
|
19
19
|
from .pcs_pma_l import PcsPma as PcsPma3
|
|
20
|
-
from .
|
|
20
|
+
from .edun_l1 import Layer1
|
|
21
21
|
|
|
22
22
|
class PcsPma(PcsPma1, PcsPma2, PcsPma3):
|
|
23
23
|
"""Edun PCS/PMA
|
|
@@ -41,11 +41,11 @@ class FamilyEdun(BasePortL23Genuine):
|
|
|
41
41
|
:type: PcsPma
|
|
42
42
|
"""
|
|
43
43
|
|
|
44
|
-
serdes: Tuple[SerDes, ...]
|
|
45
|
-
"""SerDes index
|
|
44
|
+
# serdes: Tuple[SerDes, ...]
|
|
45
|
+
# """SerDes index
|
|
46
46
|
|
|
47
|
-
:type: Tuple[SerDes, ...]
|
|
48
|
-
"""
|
|
47
|
+
# :type: Tuple[SerDes, ...]
|
|
48
|
+
# """
|
|
49
49
|
|
|
50
50
|
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
51
51
|
super().__init__(conn, module_id, port_id)
|
|
@@ -60,10 +60,10 @@ class FamilyEdun(BasePortL23Genuine):
|
|
|
60
60
|
async def _setup(self) -> Self:
|
|
61
61
|
await super()._setup()
|
|
62
62
|
self.pcs_pma = PcsPma(self._conn, self)
|
|
63
|
-
self.serdes = tuple(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
)
|
|
63
|
+
# self.serdes = tuple(
|
|
64
|
+
# SerDes(self._conn, *self.kind, serdes_xindex=serdes_xindex)
|
|
65
|
+
# for serdes_xindex in range(self.info.capabilities.serdes_count)
|
|
66
|
+
# )
|
|
67
67
|
self.l1 = L1(self._conn, self)
|
|
68
68
|
return self
|
|
69
69
|
|
|
@@ -41,11 +41,11 @@ class FamilyFreya(BasePortL23Genuine):
|
|
|
41
41
|
:type: PcsPma
|
|
42
42
|
"""
|
|
43
43
|
|
|
44
|
-
serdes: Tuple[SerDes, ...]
|
|
45
|
-
"""SerDes index
|
|
44
|
+
# serdes: Tuple[SerDes, ...]
|
|
45
|
+
# """SerDes index
|
|
46
46
|
|
|
47
|
-
:type: Tuple[SerDes, ...]
|
|
48
|
-
"""
|
|
47
|
+
# :type: Tuple[SerDes, ...]
|
|
48
|
+
# """
|
|
49
49
|
|
|
50
50
|
def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
|
|
51
51
|
super().__init__(conn, module_id, port_id)
|
|
@@ -60,10 +60,10 @@ class FamilyFreya(BasePortL23Genuine):
|
|
|
60
60
|
async def _setup(self) -> Self:
|
|
61
61
|
await super()._setup()
|
|
62
62
|
self.pcs_pma = PcsPma(self._conn, self)
|
|
63
|
-
self.serdes = tuple(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
)
|
|
63
|
+
# self.serdes = tuple(
|
|
64
|
+
# SerDes(self._conn, *self.kind, serdes_xindex=serdes_xindex)
|
|
65
|
+
# for serdes_xindex in range(self.info.capabilities.serdes_count)
|
|
66
|
+
# )
|
|
67
67
|
self.l1 = L1(self._conn, self)
|
|
68
68
|
return self
|
|
69
69
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|