Skip to content

soc

zeus.device.soc

Abstraction layer for SoC devices.

The main function of this module is get_soc, which returns a SoC Manager object specific to the platform.

get_soc

get_soc()

Initialize and return a singleton monolithic SoC monitoring object.

The function returns a SoC management object that aims to abstract underlying SoC monitoring functionalities.

Currently, no management object has been implemented for any SoC architecture, so calling this function will raise a ZeusSoCInitError error; implementations for SoC devices are expected to be added in the near future.

Source code in zeus/device/soc/__init__.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
def get_soc() -> SoC:
    """Initialize and return a singleton monolithic SoC monitoring object.

    The function returns a SoC management object that aims to abstract underlying SoC monitoring
    functionalities.

    Currently, no management object has been implemented for any SoC architecture, so calling this
    function will raise a `ZeusSoCInitError` error; implementations for SoC devices are expected
    to be added in the near future.
    """
    global _soc
    if _soc is not None:
        return _soc

    # SoCs in the future can be incorporated via `elif` blocks.
    else:
        # Placeholder to avoid linting error (remove once _soc can be assigned a real value).
        _soc = None

        raise ZeusSoCInitError("No observable SoC was found on the current machine.")