Skip to main content

Code Overview

Folder Structure of OpenCXL Core

folder-struct

The high-level application for opencxl-core is centered around apps folder. Each file in apps is an application that can be run on its own OR any group of application could be called from an external wrapper. The user friendly cxl-util in the root directory, is a Python click library (i.e. CLI) wrapper that calls into apps. If so desired, instead of a CLI app, one could create any kind of application (e.g. web app) that calls into apps.

Key CXL Components

Each CXL component in apps represents a high-level entity in OpenCXL.

These entities are:

  • CXL Switch
  • CXL Logical Device (e.g. memory device)
  • CXL Host
  • CXL Fabric Manager

The following illustrates how these components are represented in the source code. The names listed are the actual names of the class. The format is: "name of the component class" followed by one or more "key member objects".

CXL Switch

  • CxlSwitch (opencxl/apps/cxl_switch.py)
    • SwitchConnectionManager (opencxl/cxl/component/switch_connection_manager.py)
    • PhysicalPortManager (opencxl/cxl/component/physical_port_manager.py)
    • VirtualSwitchManager (opencxl/cxl/component/virtual_switch_manager.py)
    • MctpConnectionClient (opencxl/cxl/component/mctp/mctp_connection_client.py)
    • MctpCciExecutor (opencxl/cxl/component/mctp/mctp_cci_executor.py)

CXL Logical Device

  • SingleLogicalDeviceClient (opencxl/apps/single_logical_device.py)
    • SingleLogicalDevice (opencxl/cxl/device/single_logical_device.py)
      • ConfigSpaceManager (opencxl/pci/component/config_space_manager.py)
      • MmioManager (opencxl/pci/component/mmio_manager.py)
      • CxlMemManager (opencxl/cxl/component/cxl_mem_manager.py)
  • MultipleLogicalDeviceClient (Coming soon...)
    • MultipleLogicalDevice (Coming soon...)

CXL Host

  • CxlHost (opencxl/apps/cxl_host.py)
    • CxlRootPortDevice (opencxl/cxl/device/root_port_device.py)
    • SwitchConnectionClient (opencxl/cxl/component/switch_connection_client.py)

CXL Fabric Manager

  • CxlFabricManager (opencxl/apps/fabric_manager.py)
    • MctpConnectionManager (opencxl/cxl/component/mctp/mctp_connection_manager.py)
    • MctpCciExecutor (opencxl/cxl/component/mctp/mctp_cci_executor.py)
    • FabricManagerSocketIoServer (opencxl/cxl/component/fabric_manager/socketio_server.py)