Source code for chipscopy.api.ibert.link

# Copyright (C) 2021-2022, Xilinx, Inc.
# Copyright (C) 2022-2023, Advanced Micro Devices, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Any, Callable, Dict, Optional

from chipscopy.api.ibert.aliases import (
    RX_BER,
    RX_LINE_RATE,
    RX_PATTERN_CHECKER_ERROR_COUNT,
    RX_RECEIVED_BIT_COUNT,
    RX_STATUS,
)
from chipscopy.api.ibert.link.group import LinkGroup
from chipscopy.api.ibert.rx import RX
from chipscopy.api.ibert.tx import TX
from chipscopy.utils.printer import printer
from rich.box import SQUARE as BOX_SQUARE
from rich.table import Table

if TYPE_CHECKING:  # pragma: no cover
    from chipscopy.api.ibert.eye_scan import EyeScan