tdl-xoa-driver 1.5.0b2__py3-none-any.whl → 1.6.0__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.
Files changed (111) hide show
  1. {tdl_xoa_driver-1.5.0b2.dist-info → tdl_xoa_driver-1.6.0.dist-info}/METADATA +8 -8
  2. {tdl_xoa_driver-1.5.0b2.dist-info → tdl_xoa_driver-1.6.0.dist-info}/RECORD +91 -89
  3. xoa_driver/__init__.py +2 -2
  4. xoa_driver/enums.py +10 -10
  5. xoa_driver/functions/anlt.py +60 -78
  6. xoa_driver/functions/cli/__init__.py +5 -5
  7. xoa_driver/functions/cli/port_config.py +16 -7
  8. xoa_driver/functions/cli/{test_case_config.py → testbed_config.py} +53 -46
  9. xoa_driver/functions/cmis/_replies.py +4 -4
  10. xoa_driver/functions/mgmt.py +206 -250
  11. xoa_driver/functions/tools.py +11 -6
  12. xoa_driver/internals/commands/c_commands.py +59 -0
  13. xoa_driver/internals/commands/enums.py +101 -90
  14. xoa_driver/internals/commands/m4_commands.py +25 -0
  15. xoa_driver/internals/commands/m4e_commands.py +6 -0
  16. xoa_driver/internals/commands/m_commands.py +51 -1
  17. xoa_driver/internals/commands/p4_commands.py +63 -1
  18. xoa_driver/internals/commands/p4e_commands.py +9 -0
  19. xoa_driver/internals/commands/p4g_commands.py +139 -0
  20. xoa_driver/internals/commands/p_commands.py +493 -63
  21. xoa_driver/internals/commands/pc_commands.py +9 -0
  22. xoa_driver/internals/commands/pd_commands.py +11 -0
  23. xoa_driver/internals/commands/pe_commands.py +27 -0
  24. xoa_driver/internals/commands/pec_commands.py +9 -0
  25. xoa_driver/internals/commands/ped_commands.py +23 -0
  26. xoa_driver/internals/commands/pef_commands.py +43 -0
  27. xoa_driver/internals/commands/pf_commands.py +11 -0
  28. xoa_driver/internals/commands/pl1_commands.py +442 -118
  29. xoa_driver/internals/commands/pl_commands.py +8 -0
  30. xoa_driver/internals/commands/pm_commands.py +11 -0
  31. xoa_driver/internals/commands/pp_commands.py +128 -82
  32. xoa_driver/internals/commands/pr_commands.py +25 -0
  33. xoa_driver/internals/commands/ps_commands.py +47 -1
  34. xoa_driver/internals/commands/pt_commands.py +15 -0
  35. xoa_driver/internals/commands/px_commands.py +180 -136
  36. xoa_driver/internals/commands/subtypes.py +4 -3
  37. xoa_driver/internals/core/transporter/protocol/payload/base_struct.py +1 -1
  38. xoa_driver/internals/hli/indices/macsecscs/base_macsecsc.py +41 -3
  39. xoa_driver/internals/hli/modules/modules_l23/family_combi.py +0 -64
  40. xoa_driver/internals/hli/modules/modules_l23/family_edun.py +0 -2
  41. xoa_driver/internals/hli/modules/modules_l23/{family_g.py → family_loki.py} +29 -1
  42. xoa_driver/internals/hli/modules/modules_l23/family_odin.py +412 -0
  43. xoa_driver/internals/hli/modules/modules_l23/{family_l.py → family_thor.py} +44 -0
  44. xoa_driver/internals/hli/ports/port_l23/chimera/port_chimera.py +3 -3
  45. xoa_driver/internals/hli/ports/port_l23/family_edun.py +9 -44
  46. xoa_driver/internals/hli/ports/port_l23/{family_l1.py → family_freya.py} +10 -45
  47. xoa_driver/internals/hli/ports/port_l23/{family_g.py → family_loki.py} +33 -32
  48. xoa_driver/internals/hli/ports/port_l23/family_odin.py +225 -0
  49. xoa_driver/internals/hli/ports/port_l23/family_thor.py +67 -0
  50. xoa_driver/internals/hli/ports/port_l23/layer1/anlt.py +512 -0
  51. xoa_driver/internals/hli/ports/port_l23/layer1/brr.py +26 -0
  52. xoa_driver/internals/hli/ports/port_l23/layer1/eye_diagram.py +71 -0
  53. xoa_driver/internals/hli/ports/port_l23/{pcs_pma_ijkl_chimera.py → layer1/impair.py} +7 -7
  54. xoa_driver/internals/hli/ports/port_l23/layer1/laser_power.py +28 -0
  55. xoa_driver/internals/hli/ports/port_l23/{family_e.py → layer1/lower_power.py} +1 -51
  56. xoa_driver/internals/hli/ports/port_l23/{freya_l1.py → layer1/medium.py} +38 -358
  57. xoa_driver/internals/hli/ports/port_l23/layer1/pcs_fec.py +219 -0
  58. xoa_driver/internals/hli/ports/port_l23/layer1/pma.py +43 -0
  59. xoa_driver/internals/hli/ports/port_l23/layer1/prbs.py +39 -0
  60. xoa_driver/internals/hli/ports/port_l23/layer1/preamble.py +25 -0
  61. xoa_driver/internals/hli/ports/port_l23/{fault_jkl.py → layer1/rs_fault.py} +2 -2
  62. xoa_driver/internals/hli/ports/port_l23/layer1/siv.py +69 -0
  63. xoa_driver/internals/hli/ports/port_l23/layer1_edun.py +103 -0
  64. xoa_driver/internals/hli/ports/port_l23/layer1_freya.py +103 -0
  65. xoa_driver/internals/hli/ports/port_l23/layer1_loki.py +74 -0
  66. xoa_driver/internals/hli/ports/port_l23/layer1_thor.py +70 -0
  67. xoa_driver/internals/hli/ports/port_l23/port_l23ve.py +4 -4
  68. xoa_driver/internals/hli/ports/port_l23/sec/__init__.py +0 -0
  69. xoa_driver/internals/hli/ports/port_l23/sec/macsec.py +108 -0
  70. xoa_driver/internals/hli/ports/port_l23/tcvr/__init__.py +0 -0
  71. xoa_driver/internals/hli/ports/port_l23/{bases/port_transceiver.py → tcvr/cmis.py} +4 -118
  72. xoa_driver/internals/hli/ports/port_l23/tcvr/transceiver.py +124 -0
  73. xoa_driver/internals/hli/ports/port_l23/trafficgen/__init__.py +0 -0
  74. xoa_driver/internals/hli/ports/port_l23/{bases → trafficgen}/port_l23.py +1 -1
  75. xoa_driver/internals/hli/ports/port_l23/{bases → trafficgen}/port_l23_genuine.py +5 -45
  76. xoa_driver/internals/hli/ports/port_l23/{bases/port_reception_statistics.py → trafficgen/port_rx_stats.py} +0 -21
  77. xoa_driver/internals/hli/ports/port_l23/{bases/port_transmission_statistics.py → trafficgen/port_tx_stats.py} +2 -22
  78. xoa_driver/internals/hli/ports/port_l23/trafficgen/runt.py +32 -0
  79. xoa_driver/internals/hli/testers/l23_tester.py +1 -3
  80. xoa_driver/internals/utils/indices/_interfaces.py +18 -6
  81. xoa_driver/internals/utils/indices/index_manager.py +8 -2
  82. xoa_driver/internals/utils/managers/ports_manager.py +5 -2
  83. xoa_driver/misc.py +6 -6
  84. xoa_driver/modules.py +31 -47
  85. xoa_driver/ports.py +10 -29
  86. xoa_driver/internals/hli/modules/modules_l23/family_d.py +0 -75
  87. xoa_driver/internals/hli/modules/modules_l23/family_e.py +0 -85
  88. xoa_driver/internals/hli/modules/modules_l23/family_f.py +0 -145
  89. xoa_driver/internals/hli/modules/modules_l23/family_h.py +0 -40
  90. xoa_driver/internals/hli/modules/modules_l23/family_i.py +0 -25
  91. xoa_driver/internals/hli/modules/modules_l23/family_j.py +0 -25
  92. xoa_driver/internals/hli/modules/modules_l23/family_k.py +0 -39
  93. xoa_driver/internals/hli/modules/modules_l23/family_m.py +0 -25
  94. xoa_driver/internals/hli/modules/modules_l23/family_n.py +0 -40
  95. xoa_driver/internals/hli/ports/port_l23/family_combi.py +0 -37
  96. xoa_driver/internals/hli/ports/port_l23/family_d.py +0 -51
  97. xoa_driver/internals/hli/ports/port_l23/family_f.py +0 -151
  98. xoa_driver/internals/hli/ports/port_l23/family_h.py +0 -67
  99. xoa_driver/internals/hli/ports/port_l23/family_i.py +0 -84
  100. xoa_driver/internals/hli/ports/port_l23/family_j.py +0 -68
  101. xoa_driver/internals/hli/ports/port_l23/family_k.py +0 -73
  102. xoa_driver/internals/hli/ports/port_l23/family_l.py +0 -82
  103. xoa_driver/internals/hli/ports/port_l23/family_m.py +0 -29
  104. xoa_driver/internals/hli/ports/port_l23/pcs_pma_ghijkl.py +0 -369
  105. xoa_driver/internals/hli/ports/port_l23/pcs_pma_l.py +0 -78
  106. {tdl_xoa_driver-1.5.0b2.dist-info → tdl_xoa_driver-1.6.0.dist-info}/WHEEL +0 -0
  107. {tdl_xoa_driver-1.5.0b2.dist-info → tdl_xoa_driver-1.6.0.dist-info}/licenses/LICENSE +0 -0
  108. {tdl_xoa_driver-1.5.0b2.dist-info → tdl_xoa_driver-1.6.0.dist-info}/top_level.txt +0 -0
  109. /xoa_driver/internals/hli/modules/modules_l23/{family_l1.py → family_freya.py} +0 -0
  110. /xoa_driver/internals/hli/ports/port_l23/{bases → layer1}/__init__.py +0 -0
  111. /xoa_driver/internals/hli/ports/port_l23/{bases → trafficgen}/port_capture.py +0 -0
@@ -0,0 +1,219 @@
1
+ from typing import (
2
+ TYPE_CHECKING,
3
+ Tuple,
4
+ Union,
5
+ Self,
6
+ )
7
+ if TYPE_CHECKING:
8
+ from xoa_driver.internals.core import interfaces as itf
9
+ from xoa_driver.internals.hli.ports.port_l23.family_edun import FamilyEdun
10
+ from xoa_driver.internals.hli.ports.port_l23.family_freya import FamilyFreya
11
+ from xoa_driver.internals.hli.ports.port_l23.family_loki import FamilyLoki
12
+ from xoa_driver.internals.hli.ports.port_l23.family_thor import FamilyThor
13
+ from xoa_driver.internals.commands import (
14
+ PP_ALARMS_ERRORS,
15
+ PP_TXLANECONFIG,
16
+ PP_TXLANEINJECT,
17
+ PP_TXERRORRATE,
18
+ PP_TXINJECTONE,
19
+ PP_RXTOTALSTATS,
20
+ PP_RXFECSTATS,
21
+ PP_RXLANELOCK,
22
+ PP_RXLANESTATUS,
23
+ PP_RXLANEERRORS,
24
+ PP_RXCLEAR,
25
+ PP_FECMODE,
26
+ PL1_CWE_CYCLE,
27
+ PL1_CWE_ERR_SYM_INDICES,
28
+ PL1_CWE_BIT_ERR_MASK,
29
+ PL1_CWE_FEC_ENGINE,
30
+ PL1_CWE_FEC_STATS,
31
+ PL1_CWE_CONTROL,
32
+ PL1_CWE_FEC_STATS_CLEAR,
33
+ )
34
+ from xoa_driver import enums
35
+
36
+
37
+ class PcsAlarms:
38
+ """L23 high-speed port PCS/PMA alarms"""
39
+
40
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
41
+ self.errors = PP_ALARMS_ERRORS(conn, module_id, port_id)
42
+ """Error count of each alarm on a L23 high-speed port.
43
+
44
+ :type: PP_ALARMS_ERRORS
45
+ """
46
+
47
+
48
+ class PcsFecLaneStatus:
49
+ """PCS/FEC lane status"""
50
+
51
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, lane_idx: int) -> None:
52
+ self.errors = PP_RXLANEERRORS(conn, module_id, port_id, lane_idx)
53
+ """RX lane error statistics.
54
+
55
+ :type: PP_RXLANEERRORS
56
+ """
57
+
58
+ self.lock = PP_RXLANELOCK(conn, module_id, port_id, lane_idx)
59
+ """RX lane lock.
60
+
61
+ :type: PP_RXLANELOCK
62
+ """
63
+
64
+ self.status = PP_RXLANESTATUS(conn, module_id, port_id, lane_idx)
65
+ """RX lane status
66
+
67
+ :type: PP_RXLANESTATUS
68
+ """
69
+
70
+
71
+ class PcsErrorGeneration:
72
+ """PCS/FEC TX error generation."""
73
+
74
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
75
+ self.error_rate = PP_TXERRORRATE(conn, module_id, port_id)
76
+ """The rate of continuous bit-level error injection.
77
+
78
+ :type: PP_TXERRORRATE
79
+ """
80
+
81
+ self.inject_one = PP_TXINJECTONE(conn, module_id, port_id)
82
+ """Inject a single bit-level error.
83
+
84
+ :type: PP_TXINJECTONE
85
+ """
86
+
87
+
88
+ class PcsFecSymbolStatus:
89
+ """PCS/FEC RX symbol status"""
90
+
91
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
92
+ self.total_status = PP_RXTOTALSTATS(conn, module_id, port_id)
93
+ """RX FEC total counters.
94
+
95
+ :type: PP_RXTOTALSTATS
96
+ """
97
+
98
+ self.fec_status = PP_RXFECSTATS(conn, module_id, port_id)
99
+ """RX FEC statistics.
100
+
101
+ :type: PP_RXFECSTATS
102
+ """
103
+
104
+
105
+ # class PcsPmaPhy:
106
+ # """L23 high-speed port PCS/PMA PHY settings."""
107
+
108
+ # def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
109
+ # self.auto_neg = PP_PHYAUTONEG(conn, module_id, port_id)
110
+ # """ Auto-negotiation settings of the PHY.
111
+
112
+ # :type: PP_PHYAUTONEG
113
+ # """
114
+
115
+ # self.signal_status = PP_PHYSIGNALSTATUS(conn, module_id, port_id)
116
+ # """The PHY signal status.
117
+
118
+ # :type: PP_PHYSIGNALSTATUS
119
+ # """
120
+
121
+ # self.settings = PP_PHYSETTINGS(conn, module_id, port_id)
122
+ # """Low-level PHY settings
123
+
124
+ # :type: PP_PHYSETTINGS
125
+ # """
126
+
127
+
128
+ class PcsLane:
129
+ """PCS lane configuration and status."""
130
+
131
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, lane_idx: int) -> None:
132
+ self.rx_status = PcsFecLaneStatus(conn, module_id, port_id, lane_idx)
133
+ """PCS/PMA RX lane status.
134
+ """
135
+
136
+ self.tx_error_inject = PP_TXLANEINJECT(conn, module_id, port_id, lane_idx)
137
+ """Inject CAUI error into a TX lane.
138
+
139
+ :type: PP_TXLANEINJECT
140
+ """
141
+
142
+ self.tx_config = PP_TXLANECONFIG(conn, module_id, port_id, lane_idx)
143
+ """TX lane configuration.
144
+
145
+ :type: PP_TXLANECONFIG
146
+ """
147
+
148
+ class FreyaFecCodewordErrorInject:
149
+ """Freya FEC Codeword Error Injection
150
+ """
151
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
152
+ self.cycle = PL1_CWE_CYCLE(conn, module_id, port_id)
153
+ """FEC codeword error injection cycle.
154
+ """
155
+ self.err_symbols = PL1_CWE_ERR_SYM_INDICES(conn, module_id, port_id)
156
+ """The positions of the errored symbols in errored codewords.
157
+ """
158
+ self.bit_err_mask = PL1_CWE_BIT_ERR_MASK(conn, module_id, port_id)
159
+ """The bit error mask for the errored symbols.
160
+ """
161
+ self.engine = PL1_CWE_FEC_ENGINE(conn, module_id, port_id)
162
+ """The FEC engines to use.
163
+ """
164
+ self.statistics = PL1_CWE_FEC_STATS(conn, module_id, port_id)
165
+ """FEC error injection statistics
166
+ """
167
+ self.clear_stats = PL1_CWE_FEC_STATS_CLEAR(conn, module_id, port_id)
168
+ """Clear FEC codeword injection stats
169
+ """
170
+ self.control = PL1_CWE_CONTROL(conn, module_id, port_id)
171
+ """Control the FEC codeword error injection
172
+ """
173
+
174
+ class PcsLayer:
175
+ """PCS/FEC layer configuration and status."""
176
+
177
+ def __init__(self, conn: "itf.IConnection", port: "Union[FamilyLoki, FamilyThor, FamilyFreya, FamilyEdun]") -> None:
178
+ self._conn = conn
179
+ self.__port = port
180
+ module_id, port_id = port.kind
181
+
182
+ self.alarms = PcsAlarms(conn, module_id, port_id)
183
+ """PCS alarms
184
+
185
+ :type: PcsAlarms
186
+ """
187
+
188
+ self.error_gen = PcsErrorGeneration(conn, module_id, port_id)
189
+ """Error generation
190
+
191
+ :type: PcsPmaTxErrorGeneration
192
+ """
193
+
194
+ self.fec_symbol_status = PcsFecSymbolStatus(conn, module_id, port_id)
195
+ """Rx FEC symbol status
196
+
197
+ :type: FecSymbolStatus
198
+ """
199
+
200
+ self.clear = PP_RXCLEAR(conn, module_id, port_id)
201
+ """Clear all the PCS receiver statistics.
202
+
203
+ :type: PP_RXCLEAR
204
+ """
205
+
206
+ self.fec_mode = PP_FECMODE(conn, module_id, port_id)
207
+ """FEC mode configuration.
208
+
209
+ :type: PP_FECMODE
210
+ """
211
+
212
+ self.lane: Tuple["PcsLane", ...] = tuple(
213
+ PcsLane(self._conn, module_id, port_id, lane_idx=idx)
214
+ for idx in range(self.__port.info.capabilities.lane_count)
215
+ ) # TODO: need to fix, currently port.info.capabilities must be none because lanes are created before awaiting the port
216
+ """PCS Lane
217
+
218
+ :type: Tuple[PcsLane, ...]
219
+ """
@@ -0,0 +1,43 @@
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_PNSWAP_RX,
11
+ PL1_PNSWAP_TX,
12
+ )
13
+
14
+ from xoa_driver import enums
15
+
16
+
17
+ class FreyaPMA:
18
+ """Freya PMA"""
19
+
20
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_xindex: int) -> None:
21
+ self.precoding = PP_PRECODING(conn, module_id, port_id, serdes_xindex)
22
+ """GET/SET Pre-Coding Configurations. (only for Freya)
23
+
24
+ :type: PP_PRECODING
25
+ """
26
+
27
+ self.graycoding = PP_GRAYCODING(conn, module_id, port_id, serdes_xindex)
28
+ """GET/SET Gray-Coding Configurations. (only for Freya)
29
+
30
+ :type: PP_GRAYCODING
31
+ """
32
+
33
+ self.pn_swap_rx = PL1_PNSWAP_RX(conn, module_id, port_id, serdes_xindex)
34
+ """GET/SET PN-Swap RX Configurations. (only for Freya)
35
+
36
+ :type: PL1_PNSWAP_RX
37
+ """
38
+
39
+ self.pn_swap_tx = PL1_PNSWAP_TX(conn, module_id, port_id, serdes_xindex)
40
+ """GET/SET PN-Swap TX Configurations. (only for Freya)
41
+
42
+ :type: PL1_PNSWAP_TX
43
+ """
@@ -0,0 +1,39 @@
1
+ from typing import (
2
+ TYPE_CHECKING,
3
+ Tuple,
4
+ )
5
+ from typing import Self
6
+ if TYPE_CHECKING:
7
+ from xoa_driver.internals.core import interfaces as itf
8
+ from xoa_driver.internals.commands import (
9
+ PP_TXPRBSCONFIG,
10
+ PP_RXPRBSSTATUS,
11
+ PP_PRBSTYPE,
12
+ )
13
+ from xoa_driver import enums
14
+
15
+ class PrbsConfig:
16
+ """L23 high-speed port PRBS configuration."""
17
+
18
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
19
+ self.type = PP_PRBSTYPE(conn, module_id, port_id)
20
+ """PRBS type used when in PRBS mode.
21
+
22
+ :type: PP_PRBSTYPE
23
+ """
24
+
25
+ class Prbs:
26
+ """L23 high-speed port SerDes PRBS configuration and status."""
27
+
28
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_xindex: int) -> None:
29
+ self.control = PP_TXPRBSCONFIG(conn, module_id, port_id, serdes_xindex)
30
+ """TX PRBS configuration of a SerDes.
31
+
32
+ :type: PP_TXPRBSCONFIG
33
+ """
34
+
35
+ self.status = PP_RXPRBSSTATUS(conn, module_id, port_id, serdes_xindex)
36
+ """RX PRBS status on a SerDes
37
+
38
+ :type: PP_RXPRBSSTATUS
39
+ """
@@ -0,0 +1,25 @@
1
+ import functools
2
+ from typing import TYPE_CHECKING
3
+ from xoa_driver.internals.commands import (
4
+ P_TXPREAMBLE_REMOVE,
5
+ P_RXPREAMBLE_INSERT,
6
+
7
+ )
8
+ if TYPE_CHECKING:
9
+ from xoa_driver.internals.core import interfaces as itf
10
+
11
+ class Preamble:
12
+ """Preamble settings."""
13
+
14
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
15
+ self.tx_remove = P_TXPREAMBLE_REMOVE(conn, module_id, port_id)
16
+ """L23 port's removal of preamble from outgoing packets.
17
+
18
+ :type: P_TXPREAMBLE_REMOVE
19
+ """
20
+
21
+ self.rx_insert = P_RXPREAMBLE_INSERT(conn, module_id, port_id)
22
+ """L23 port's insertion of preamble into incoming packets.
23
+
24
+ :type: P_RXPREAMBLE_INSERT
25
+ """
@@ -7,8 +7,8 @@ if TYPE_CHECKING:
7
7
  from xoa_driver.internals.core import interfaces as itf
8
8
 
9
9
 
10
- class Fault:
11
- """L23 port fault settings."""
10
+ class RsFault:
11
+ """RS Fault Management"""
12
12
 
13
13
  def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int) -> None:
14
14
  self.signaling = P_FAULTSIGNALING(conn, module_id, port_id)
@@ -0,0 +1,69 @@
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
+ PL1_CTRL,
9
+ PL1_GET_DATA,
10
+ )
11
+ from xoa_driver import enums
12
+
13
+ class FreyaSIV:
14
+ """Freya Signal Integrity View"""
15
+
16
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_xindex: int) -> None:
17
+ self.control = PL1_CTRL(conn, module_id, port_id, serdes_xindex, enums.Layer1Control.SAMPLED_SIGNAL_INTEGRITY_SCAN)
18
+ """Control SIV scan.
19
+
20
+ The Signal Integrity feature offers the equivalent of an Equivalent Time oscilloscope trace of the RX PAM4 signal (later, also PAM2). The trace is done with the A/D converter in the GTM receiver also doing the data sampling / CDR function, i.e. the trace is taken after the RX equalizer.
21
+
22
+ The HW characteristics of the Versal GTM used in Freya are: Trace length = 2000 samples, sample resolution = 7 bits 2's complement, i.e. range = -64..63.
23
+
24
+ Using the sampled eye scan feature through CLI involves two steps:
25
+
26
+ Trigger the acquisition of a trace (PL1_CTRL)
27
+
28
+ Retrieve the trace data (PL1_GET_DATA)
29
+
30
+ This command is a generic control function related to Layer 1 / SERDES. For now, only used for signal integrity scan.
31
+
32
+ :type: PL1_CTRL
33
+ """
34
+
35
+ self.data = PL1_GET_DATA(conn, module_id, port_id, serdes_xindex, enums.Layer1Control.SAMPLED_SIGNAL_INTEGRITY_SCAN)
36
+ """Get SIV scan data.
37
+
38
+ The Signal Integrity feature offers the equivalent of an Equivalent Time oscilloscope trace of the RX PAM4 signal (later, also PAM2). The trace is done with the A/D converter in the GTM receiver also doing the data sampling / CDR function, i.e. the trace is taken after the RX equalizer.
39
+
40
+ The HW characteristics of the Versal GTM used in Freya are: Trace length = 2000 samples, sample resolution = 7 bits 2’s complement, i.e. range = -64..63.
41
+
42
+ Using the sampled eye scan feature through CLI involves two steps:
43
+
44
+ Trigger the acquisition of a trace (PL1_CTRL)
45
+
46
+ Retrieve the trace data (PL1_GET_DATA)
47
+
48
+ This command is a generic function to retrieve dynamic data related to Layer 1 / SERDES. For now, only used for signal integrity scan.
49
+
50
+ For ``func==0``, sampled eye scan:
51
+
52
+ * ``result==0``: No data available.
53
+
54
+ "No data available" means that either a scan was never started, an acquisition was started and in progress, or the acquired data has become too old (e.g. older than 500 ms). The acquisition time for a trace is in the very low ms-range. If ``result==0``, ``sweep_no`` and ``age_us`` are dummy (=0), and no additional data are returned.
55
+
56
+ * ``result==1``: Data returned. In that case, the rest of the parameters apply:
57
+
58
+ ``sweep_no``: per-SERDES trace acquisition counter: 1,2,3… Each trace can be returned multiple times, to different users, within its lifetime. A new trace acquisition is triggered with the PL1_CTRL command.
59
+
60
+ ``age_us``: The “age” of the trace data in microseconds, i.e. the time from data acquisition from hardware was completed until the time the command reply data is generated.
61
+
62
+ ``value``: The rest of the reply is a set of 16 bit signed 2-complement sample values. With present hardware, the range of each sample is -64..63. In XMP scripting, each sample value is represented as two bytes, msb first.
63
+
64
+ With present implementation, 2006 sample values (4012 bytes) are returned.
65
+
66
+ The first 6 sample values are so-called “sampled levels”: <p1> <p2> < p3> <m1> <m2> <m3>
67
+
68
+ :type: PL1_GET_DATA
69
+ """
@@ -0,0 +1,103 @@
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.hli.ports.port_l23.family_edun import FamilyEdun
8
+ from xoa_driver.internals.commands import (
9
+ PL1_PCS_VARIANT,
10
+ PP_PRBSTYPE,
11
+ PP_LINKTRAINSTATUS,
12
+ )
13
+ from .layer1.pcs_fec import PcsLayer, FreyaFecCodewordErrorInject
14
+ from .layer1.impair import Impair
15
+ from .layer1.prbs import Prbs
16
+ from .layer1.pma import FreyaPMA
17
+ from .layer1.medium import EdunMedium
18
+ from .layer1.rs_fault import RsFault
19
+ from .tcvr.transceiver import Transceiver
20
+ from .layer1.anlt import AnltBasic
21
+ from .layer1.siv import FreyaSIV
22
+
23
+
24
+
25
+ class SerDesEdun:
26
+ """L23 high-speed port SerDes configuration and status."""
27
+
28
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_xindex: int) -> None:
29
+
30
+ self.prbs = Prbs(conn, module_id, port_id, serdes_xindex)
31
+ """PRBS
32
+ :type: Prbs
33
+ """
34
+
35
+ self.pma = FreyaPMA(conn, module_id, port_id, serdes_xindex)
36
+ """Edun PMA
37
+
38
+ :type: FreyaPMA
39
+ """
40
+
41
+ self.medium = EdunMedium(conn, module_id, port_id, serdes_xindex)
42
+ """Edun medium
43
+
44
+ :type: EdunMedium
45
+ """
46
+
47
+ self.lt_status = PP_LINKTRAINSTATUS(conn, module_id, port_id, serdes_xindex)
48
+ """LT status for Edun
49
+ :type: PP_LINKTRAINSTATUS
50
+ """
51
+
52
+ self.siv = FreyaSIV(conn, module_id, port_id, serdes_xindex)
53
+ """Signal Integrity
54
+ """
55
+
56
+ class EdunPcsLayer(PcsLayer):
57
+ """Edun PCS and FEC configuration and status
58
+ """
59
+
60
+ def __init__(self, conn: "itf.IConnection", port: "FamilyEdun") -> None:
61
+ module_id, port_id = port.kind
62
+ PcsLayer.__init__(self, conn, port)
63
+
64
+ self.pcs_variant = PL1_PCS_VARIANT(conn, module_id, port_id)
65
+ """PCS variant configuration
66
+ """
67
+
68
+ self.fec_error_inject = FreyaFecCodewordErrorInject(conn, module_id, port_id)
69
+ """FEC codeword error injection
70
+ """
71
+
72
+ class Layer1:
73
+ def __init__(self, conn: "itf.IConnection", port: "FamilyEdun") -> None:
74
+ module_id, port_id = port.kind
75
+ self.serdes: Tuple[SerDesEdun, ...] = tuple(
76
+ SerDesEdun(conn, module_id, port_id, serdes_xindex=idx)
77
+ for idx in range(port.info.capabilities.serdes_count)
78
+ )
79
+
80
+ self.impairment = Impair(conn, module_id, port_id)
81
+ """Impairment functions"""
82
+
83
+ self.rs_fault = RsFault(conn, module_id, port_id)
84
+ """RS Fault configuration and status
85
+ """
86
+
87
+ self.pcs_fec = EdunPcsLayer(conn, port)
88
+ """Edun PCS and FEC configuration and status
89
+ """
90
+
91
+ self.prbs_config = PP_PRBSTYPE(conn, module_id, port_id)
92
+ """PRBS configuration, including PRBS polynomial, invert mode, and statistic collection mode (for RX).
93
+ """
94
+
95
+ self.anlt = AnltBasic(conn, module_id, port_id)
96
+ """Edun ANLT settings
97
+ """
98
+
99
+ self.transceiver = Transceiver(conn, module_id, port_id)
100
+ """Edun Transceiver configuration and status
101
+ """
102
+
103
+
@@ -0,0 +1,103 @@
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.hli.ports.port_l23.family_freya import FamilyFreya
8
+ from xoa_driver.internals.commands import (
9
+ PL1_PCS_VARIANT,
10
+ PP_PRBSTYPE,
11
+ )
12
+ from .layer1.prbs import Prbs
13
+ from .layer1.impair import Impair
14
+ from .layer1.pcs_fec import PcsLayer, FreyaFecCodewordErrorInject
15
+ from .tcvr.transceiver import Transceiver
16
+ from .layer1.rs_fault import RsFault
17
+ from .layer1.medium import FreyaMedium
18
+ from .layer1.siv import FreyaSIV
19
+ from .layer1.pma import FreyaPMA
20
+ from .layer1.anlt import AnltAdvanced, LinkTrainingAdvanced
21
+
22
+
23
+ class SerDesFreya:
24
+ """L23 high-speed port SerDes configuration and status."""
25
+
26
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_xindex: int) -> None:
27
+
28
+ self.prbs = Prbs(conn, module_id, port_id, serdes_xindex)
29
+ """PRBS
30
+ :type: Prbs
31
+ """
32
+
33
+ self.pma = FreyaPMA(conn, module_id, port_id, serdes_xindex)
34
+ """Freya PMA
35
+
36
+ :type: FreyaPMA
37
+ """
38
+
39
+ self.medium = FreyaMedium(conn, module_id, port_id, serdes_xindex)
40
+ """Freya medium
41
+
42
+ :type: FreyaMedium
43
+ """
44
+
45
+ self.lt = LinkTrainingAdvanced(conn, module_id, port_id, serdes_xindex)
46
+ """Freya Link Training on serdes level
47
+
48
+ :type: FreyaLinkTraining
49
+ """
50
+
51
+ self.siv = FreyaSIV(conn, module_id, port_id, serdes_xindex)
52
+ """Freya Signal Integrity
53
+ """
54
+
55
+
56
+ class FreyaPcsLayer(PcsLayer):
57
+ """Freya PCS and FEC configuration and status
58
+ """
59
+
60
+ def __init__(self, conn: "itf.IConnection", port: "FamilyFreya") -> None:
61
+ module_id, port_id = port.kind
62
+ PcsLayer.__init__(self, conn, port)
63
+
64
+ self.pcs_variant = PL1_PCS_VARIANT(conn, module_id, port_id)
65
+ """PCS variant configuration
66
+ """
67
+
68
+ self.fec_error_inject = FreyaFecCodewordErrorInject(conn, module_id, port_id)
69
+ """FEC codeword error injection
70
+ """
71
+
72
+ class Layer1:
73
+ def __init__(self, conn: "itf.IConnection", port: "FamilyFreya") -> None:
74
+ module_id, port_id = port.kind
75
+ self.serdes: Tuple[SerDesFreya, ...] = tuple(
76
+ SerDesFreya(conn, module_id, port_id, serdes_xindex=idx)
77
+ for idx in range(port.info.capabilities.serdes_count)
78
+ )
79
+
80
+ self.impairment = Impair(conn, module_id, port_id)
81
+ """Impairment functions
82
+ """
83
+
84
+ self.rs_fault = RsFault(conn, module_id, port_id)
85
+ """RS Fault configuration and status
86
+ """
87
+
88
+ self.pcs_fec = FreyaPcsLayer(conn, port)
89
+ """Freya PCS and FEC configuration and status
90
+ """
91
+
92
+ self.prbs_config = PP_PRBSTYPE(conn, module_id, port_id)
93
+ """PRBS configuration, including PRBS polynomial, invert mode, and statistic collection mode (for RX).
94
+ """
95
+
96
+ self.anlt = AnltAdvanced(conn, module_id, port_id)
97
+ """Freya port-level anlt. For per-serdes configuration and status, use serdes[x]
98
+ """
99
+
100
+ self.transceiver = Transceiver(conn, module_id, port_id)
101
+ """Freya Transceiver configuration and status
102
+ """
103
+
@@ -0,0 +1,74 @@
1
+ from typing import (
2
+ TYPE_CHECKING,
3
+ Tuple,
4
+ Self,
5
+ )
6
+ if TYPE_CHECKING:
7
+ from xoa_driver.internals.core import interfaces as itf
8
+ from xoa_driver.internals.hli.ports.port_l23.family_loki import FamilyLoki
9
+ from xoa_driver.internals.commands import (
10
+ PP_PRBSTYPE,
11
+ )
12
+ from .layer1.prbs import Prbs
13
+ from .layer1.pcs_fec import PcsLayer
14
+ from .layer1.impair import Impair
15
+ from .layer1.medium import BasicMedium
16
+ from .layer1.eye_diagram import EyeDiagram
17
+ from .layer1.rs_fault import RsFault
18
+ from .tcvr.transceiver import Transceiver
19
+
20
+ class SerDesLoki:
21
+ """L23 high-speed port SerDes configuration and status."""
22
+
23
+ def __init__(self, conn: "itf.IConnection", module_id: int, port_id: int, serdes_xindex: int) -> None:
24
+
25
+ self.prbs = Prbs(conn, module_id, port_id, serdes_xindex)
26
+ """PRBS
27
+
28
+ :type: Prbs
29
+ """
30
+
31
+ self.medium = BasicMedium(conn, module_id, port_id, serdes_xindex)
32
+ """Basic medium
33
+
34
+ :type: BasicMedium
35
+ """
36
+
37
+ self.eye_diagram = EyeDiagram(conn, module_id, port_id, serdes_xindex)
38
+ """Eye diagram
39
+
40
+ :type: EyeDiagram
41
+ """
42
+
43
+ def __await__(self):
44
+ return self._setup().__await__()
45
+
46
+ async def _setup(self) -> Self:
47
+ await self.eye_diagram
48
+ return self
49
+
50
+
51
+ class Layer1:
52
+ def __init__(self, conn: "itf.IConnection", port: "FamilyLoki") -> None:
53
+ module_id, port_id = port.kind
54
+ self.serdes: Tuple[SerDesLoki, ...] = tuple(
55
+ SerDesLoki(conn, module_id, port_id, serdes_xindex=idx)
56
+ for idx in range(port.info.capabilities.serdes_count)
57
+ )
58
+
59
+ self.impairment = Impair(conn, module_id, port_id)
60
+ """Impairment functions"""
61
+
62
+ self.rs_fault = RsFault(conn, module_id, port_id)
63
+ """RS Fault Management"""
64
+
65
+ self.pcs_fec = PcsLayer(conn, port)
66
+ """PCS/FEC layer"""
67
+
68
+ self.prbs_config = PP_PRBSTYPE(conn, module_id, port_id)
69
+ """PRBS configuration, including PRBS polynomial, invert mode, and statistic collection mode (for RX).
70
+ """
71
+
72
+ self.transceiver = Transceiver(conn, module_id, port_id)
73
+ """Loki Transceiver configuration and status
74
+ """