Skip to content

CMAC Task

rfsoc_rfdc.cmac_task

Classes

CmacTask

Bases: OverlayTask

Task for configuring CMAC 100G transceiver.

Source code in rfsoc_rfdc/cmac_task.py
class CmacTask(OverlayTask):
    """Task for configuring CMAC 100G transceiver."""

    def __init__(self, overlay):
        """Initialize the task with the given overlay."""
        super().__init__(overlay, name="RfdcTask")
        self.cmac = overlay.cmac_usplus_0

        # Put CMAC in internal Loopback Mode
        self.cmac.internal_loopback = 0

        # Bring up the CMAC Core
        self.cmac.start()

    def run(self):
        while not self._stop_event.is_set():
            if self._stop_event.wait(1):
                break
            logging.info(self.cmac.getStats(False))