From 9a38a03f5d98860ad250066a0384b49e6cf5cbad Mon Sep 17 00:00:00 2001 From: Patrick Huesmann Date: Fri, 29 Nov 2024 17:50:42 +0100 Subject: [PATCH] feat: stubs and docstrings for python binding --- README.md | 21 +- pyudmaio/pyudmaio/_UioReg.pyi | 23 ++ pyudmaio/pyudmaio/__init__.pyi | 31 +- pyudmaio/pyudmaio/binding.pyi | 514 ++++++++++++++++++++++++++++ pyudmaio/src/PythonBinding.cpp | 131 +++++--- pyudmaio/src/docstrings.hpp | 594 +++++++++++++++++++++++++++++++++ 6 files changed, 1245 insertions(+), 69 deletions(-) create mode 100644 pyudmaio/pyudmaio/_UioReg.pyi create mode 100644 pyudmaio/pyudmaio/binding.pyi create mode 100644 pyudmaio/src/docstrings.hpp diff --git a/README.md b/README.md index 4803a598..4c2b610c 100644 --- a/README.md +++ b/README.md @@ -80,9 +80,24 @@ pip3 install --use-feature=in-tree-build -e . To update the `.pyi` stubs after changing the binding: ```bash -cd pyudmaio -python3 -m pybind11_stubgen pyudmaio --no-setup-py -o /tmp \ -&& cp -a /tmp/pyudmaio-stubs/* pyudmaio +# (re-)generate docstrings + python3 -m pybind11_mkdoc -I ./inc -o pyudmaio/src/docstrings.hpp \ + inc/udmaio/UioConfig.hpp \ + inc/udmaio/UioIf.hpp \ + inc/udmaio/DmaBufferAbstract.hpp \ + inc/udmaio/FpgaMemBufferOverAxi.hpp \ + inc/udmaio/FpgaMemBufferOverXdma.hpp \ + inc/udmaio/UDmaBuf.hpp \ + inc/udmaio/UioAxiDmaIf.hpp \ + inc/udmaio/UioMemSgdma.hpp \ + pyudmaio/src/DataHandlerPython.hpp \ + inc/udmaio/FrameFormat.hpp + +# build & install binding +pip3 install ./pyudmaio + +# update stubs +python3 -m pybind11_stubgen pyudmaio -o pyudmaio ``` ## Usage example diff --git a/pyudmaio/pyudmaio/_UioReg.pyi b/pyudmaio/pyudmaio/_UioReg.pyi new file mode 100644 index 00000000..d9d6d5ba --- /dev/null +++ b/pyudmaio/pyudmaio/_UioReg.pyi @@ -0,0 +1,23 @@ +from __future__ import annotations +import bitstruct as bitstruct +__all__ = ['UioReg', 'UioRegTest', 'bitstruct'] +class UioReg: + def __getattr__(self, name): + ... + def __init__(self, intf, offs, fields = None): + ... + def __setattr__(self, name, value): + ... + def rd(self): + ... + def wr(self, val = None): + ... +class UioRegTest: + def __init__(self): + ... + def _rd32(self, offs): + ... + def _wr32(self, offs, val): + ... + def test(self): + ... diff --git a/pyudmaio/pyudmaio/__init__.pyi b/pyudmaio/pyudmaio/__init__.pyi index 97b1deca..96c7bd59 100644 --- a/pyudmaio/pyudmaio/__init__.pyi +++ b/pyudmaio/pyudmaio/__init__.pyi @@ -1,9 +1,9 @@ from __future__ import annotations -import pyudmaio -import typing +from pyudmaio._UioReg import UioReg from pyudmaio.binding import ConfigUio from pyudmaio.binding import ConfigXdma from pyudmaio.binding import DataHandler +from pyudmaio.binding import FpgaMemBufferOverAxi from pyudmaio.binding import FpgaMemBufferOverXdma from pyudmaio.binding import FrameFormat from pyudmaio.binding import LogLevel @@ -12,27 +12,8 @@ from pyudmaio.binding import UioAxiDmaIf from pyudmaio.binding import UioDeviceLocation from pyudmaio.binding import UioIf from pyudmaio.binding import UioMemSgdma -from pyudmaio._UioReg import UioReg from pyudmaio.binding import UioRegion - -__all__ = [ - "ConfigUio", - "ConfigXdma", - "DataHandler", - "FpgaMemBufferOverXdma", - "FrameFormat", - "LogLevel", - "UDmaBuf", - "UioAxiDmaIf", - "UioDeviceLocation", - "UioIf", - "UioMemSgdma", - "UioReg", - "UioRegion", - "binding", - "set_logging_level" -] - - -def set_logging_level(arg0: binding.LogLevel) -> None: - pass +from pyudmaio.binding import set_logging_level +from . import _UioReg +from . import binding +__all__ = ['ConfigUio', 'ConfigXdma', 'DataHandler', 'FpgaMemBufferOverAxi', 'FpgaMemBufferOverXdma', 'FrameFormat', 'LogLevel', 'UDmaBuf', 'UioAxiDmaIf', 'UioDeviceLocation', 'UioIf', 'UioMemSgdma', 'UioReg', 'UioRegion', 'binding', 'set_logging_level'] diff --git a/pyudmaio/pyudmaio/binding.pyi b/pyudmaio/pyudmaio/binding.pyi new file mode 100644 index 00000000..1612047b --- /dev/null +++ b/pyudmaio/pyudmaio/binding.pyi @@ -0,0 +1,514 @@ +from __future__ import annotations +import typing +__all__ = ['ConfigBase', 'ConfigUio', 'ConfigXdma', 'DEBUG', 'DataHandler', 'DmaBufferAbstract', 'FATAL', 'FpgaMemBufferOverAxi', 'FpgaMemBufferOverXdma', 'FrameFormat', 'HwAccessor', 'INFO', 'LogLevel', 'TRACE', 'UDmaBuf', 'UioAxiDmaIf', 'UioDeviceLocation', 'UioIf', 'UioMemSgdma', 'UioRegion', 'set_logging_level'] +class ConfigBase: + """ + Base class for HwAccessor creation + """ + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... + def hw_acc(self, arg0: UioDeviceLocation) -> HwAccessor: + ... +class ConfigUio(ConfigBase): + """ + Creates HwAccessor from UioDeviceLocation (UIO version) + """ + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... + def __init__(self) -> None: + ... +class ConfigXdma(ConfigBase): + """ + Creates HwAccessor from UioDeviceLocation (XDMA version) + """ + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... + def __init__(self, xdma_path: str, pcie_offs: int, x7_series_mode: bool = False) -> None: + ... +class DataHandler: + """ + """ + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... + def __init__(self, dma: UioAxiDmaIf, desc: UioMemSgdma, mem: DmaBufferAbstract, receive_packets: bool = True, queue_size: int = 64) -> None: + ... + def read(self, ms_timeout: int) -> numpy.ndarray[numpy.uint8]: + ... + def read_nb(self) -> numpy.ndarray[numpy.uint8]: + ... + def start(self, nr_pkts: int, pkt_size: int, init_only: bool = False) -> None: + ... + def stop(self) -> None: + ... +class DmaBufferAbstract: + """ + Base class for DMA data buffer + """ + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... + def get_phys_region(self) -> UioRegion: + """ + Get physical region + + Returns: + Physical address and size of DMA data buffer + """ +class FpgaMemBufferOverAxi(DmaBufferAbstract, UioIf): + """ + DMA data buffer accessed over AXI/UIO, described w/ explicit address & + size + """ + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... + def __init__(self, arg0: UioDeviceLocation) -> None: + ... +class FpgaMemBufferOverXdma(DmaBufferAbstract): + """ + DMA data buffer accessed over XDMA using the xdma c2h0 stream channel + """ + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... + def __init__(self, arg0: str, arg1: int) -> None: + """ + Constructs a DMA data buffer + + Parameter ``path``: + Base path of XDMA instance in `/dev` + + Parameter ``phys_addr``: + Physical address of DMA data buffer + """ +class FrameFormat: + """ + """ + class Dim: + """ + Frame dimensions + """ + height: int + width: int + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... + def __init__(self, arg0: int, arg1: int) -> None: + ... + class PixelFormat: + """ + + + Members: + + unknown + + Mono8 + + Mono10 + + Mono12 + + Mono14 + + Mono16 + + BayerGR8 + + BayerRG8 + + BayerGB8 + + BayerBG8 + + BayerGR10 + + BayerRG10 + + BayerGB10 + + BayerBG10 + + BayerGR12 + + BayerRG12 + + BayerGB12 + + BayerBG12 + + RGB8 + + BGR8 + + RGBa8 + + BGRa8 + + RGB10V1Packed1 + + RGB10p32 + + RGB565p + + BGR565p + + YUV422_8_UYVY + + YUV422_8 + + YUV8_UYV + + YCbCr8_CbYCr + + YCbCr422_8 + + YCbCr422_8_CbYCrY + + YCbCr601_8_CbYCr + + YCbCr601_422_8 + + YCbCr601_422_8_CbYCrY + + YCbCr709_8_CbYCr + + YCbCr709_422_8 + + YCbCr709_422_8_CbYCrY + + RGB8_Planar + """ + BGR565p: typing.ClassVar[FrameFormat.PixelFormat] # value = + BGR8: typing.ClassVar[FrameFormat.PixelFormat] # value = + BGRa8: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerBG10: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerBG12: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerBG8: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerGB10: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerGB12: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerGB8: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerGR10: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerGR12: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerGR8: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerRG10: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerRG12: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerRG8: typing.ClassVar[FrameFormat.PixelFormat] # value = + Mono10: typing.ClassVar[FrameFormat.PixelFormat] # value = + Mono12: typing.ClassVar[FrameFormat.PixelFormat] # value = + Mono14: typing.ClassVar[FrameFormat.PixelFormat] # value = + Mono16: typing.ClassVar[FrameFormat.PixelFormat] # value = + Mono8: typing.ClassVar[FrameFormat.PixelFormat] # value = + RGB10V1Packed1: typing.ClassVar[FrameFormat.PixelFormat] # value = + RGB10p32: typing.ClassVar[FrameFormat.PixelFormat] # value = + RGB565p: typing.ClassVar[FrameFormat.PixelFormat] # value = + RGB8: typing.ClassVar[FrameFormat.PixelFormat] # value = + RGB8_Planar: typing.ClassVar[FrameFormat.PixelFormat] # value = + RGBa8: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr422_8: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr422_8_CbYCrY: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr601_422_8: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr601_422_8_CbYCrY: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr601_8_CbYCr: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr709_422_8: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr709_422_8_CbYCrY: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr709_8_CbYCr: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr8_CbYCr: typing.ClassVar[FrameFormat.PixelFormat] # value = + YUV422_8: typing.ClassVar[FrameFormat.PixelFormat] # value = + YUV422_8_UYVY: typing.ClassVar[FrameFormat.PixelFormat] # value = + YUV8_UYV: typing.ClassVar[FrameFormat.PixelFormat] # value = + __members__: typing.ClassVar[dict[str, FrameFormat.PixelFormat]] # value = {'unknown': , 'Mono8': , 'Mono10': , 'Mono12': , 'Mono14': , 'Mono16': , 'BayerGR8': , 'BayerRG8': , 'BayerGB8': , 'BayerBG8': , 'BayerGR10': , 'BayerRG10': , 'BayerGB10': , 'BayerBG10': , 'BayerGR12': , 'BayerRG12': , 'BayerGB12': , 'BayerBG12': , 'RGB8': , 'BGR8': , 'RGBa8': , 'BGRa8': , 'RGB10V1Packed1': , 'RGB10p32': , 'RGB565p': , 'BGR565p': , 'YUV422_8_UYVY': , 'YUV422_8': , 'YUV8_UYV': , 'YCbCr8_CbYCr': , 'YCbCr422_8': , 'YCbCr422_8_CbYCrY': , 'YCbCr601_8_CbYCr': , 'YCbCr601_422_8': , 'YCbCr601_422_8_CbYCrY': , 'YCbCr709_8_CbYCr': , 'YCbCr709_422_8': , 'YCbCr709_422_8_CbYCrY': , 'RGB8_Planar': } + unknown: typing.ClassVar[FrameFormat.PixelFormat] # value = + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... + def __eq__(self, other: typing.Any) -> bool: + ... + def __getstate__(self) -> int: + ... + def __hash__(self) -> int: + ... + def __index__(self) -> int: + ... + def __init__(self, value: int) -> None: + ... + def __int__(self) -> int: + ... + def __ne__(self, other: typing.Any) -> bool: + ... + def __repr__(self) -> str: + ... + def __setstate__(self, state: int) -> None: + ... + def __str__(self) -> str: + ... + @property + def name(self) -> str: + ... + @property + def value(self) -> int: + ... + BGR565p: typing.ClassVar[FrameFormat.PixelFormat] # value = + BGR8: typing.ClassVar[FrameFormat.PixelFormat] # value = + BGRa8: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerBG10: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerBG12: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerBG8: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerGB10: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerGB12: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerGB8: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerGR10: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerGR12: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerGR8: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerRG10: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerRG12: typing.ClassVar[FrameFormat.PixelFormat] # value = + BayerRG8: typing.ClassVar[FrameFormat.PixelFormat] # value = + Mono10: typing.ClassVar[FrameFormat.PixelFormat] # value = + Mono12: typing.ClassVar[FrameFormat.PixelFormat] # value = + Mono14: typing.ClassVar[FrameFormat.PixelFormat] # value = + Mono16: typing.ClassVar[FrameFormat.PixelFormat] # value = + Mono8: typing.ClassVar[FrameFormat.PixelFormat] # value = + RGB10V1Packed1: typing.ClassVar[FrameFormat.PixelFormat] # value = + RGB10p32: typing.ClassVar[FrameFormat.PixelFormat] # value = + RGB565p: typing.ClassVar[FrameFormat.PixelFormat] # value = + RGB8: typing.ClassVar[FrameFormat.PixelFormat] # value = + RGB8_Planar: typing.ClassVar[FrameFormat.PixelFormat] # value = + RGBa8: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr422_8: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr422_8_CbYCrY: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr601_422_8: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr601_422_8_CbYCrY: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr601_8_CbYCr: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr709_422_8: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr709_422_8_CbYCrY: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr709_8_CbYCr: typing.ClassVar[FrameFormat.PixelFormat] # value = + YCbCr8_CbYCr: typing.ClassVar[FrameFormat.PixelFormat] # value = + YUV422_8: typing.ClassVar[FrameFormat.PixelFormat] # value = + YUV422_8_UYVY: typing.ClassVar[FrameFormat.PixelFormat] # value = + YUV8_UYV: typing.ClassVar[FrameFormat.PixelFormat] # value = + unknown: typing.ClassVar[FrameFormat.PixelFormat] # value = + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... + def __init__(self) -> None: + ... + def get_bytes_per_pixel(self) -> int: + ... + def get_dim(self) -> FrameFormat.Dim: + ... + def get_frm_size(self) -> int: + ... + def get_hsize(self) -> int: + ... + def get_pixel_format(self) -> FrameFormat.PixelFormat: + ... + def get_pixel_format_str(self) -> str: + ... + def get_pixel_per_word(self) -> int: + ... + def get_word_width(self) -> int: + ... + def set_bpp(self, arg0: int) -> None: + ... + def set_dim(self, arg0: FrameFormat.Dim) -> None: + ... + @typing.overload + def set_format(self, dim: FrameFormat.Dim, bytes_per_pixel: int, word_width: int = 4) -> None: + ... + @typing.overload + def set_format(self, dim: FrameFormat.Dim, pix_fmt_str: str, word_width: int = 4) -> None: + ... + @typing.overload + def set_format(self, dim: FrameFormat.Dim, pix_fmt: FrameFormat.PixelFormat, word_width: int = 4) -> None: + ... + def set_pix_fmt(self, arg0: FrameFormat.PixelFormat) -> None: + ... + def set_word_width(self, arg0: int) -> None: + ... +class HwAccessor: + """ + """ + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... +class LogLevel: + """ + Members: + + FATAL + + INFO + + DEBUG + + TRACE + """ + DEBUG: typing.ClassVar[LogLevel] # value = + FATAL: typing.ClassVar[LogLevel] # value = + INFO: typing.ClassVar[LogLevel] # value = + TRACE: typing.ClassVar[LogLevel] # value = + __members__: typing.ClassVar[dict[str, LogLevel]] # value = {'FATAL': , 'INFO': , 'DEBUG': , 'TRACE': } + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... + def __eq__(self, other: typing.Any) -> bool: + ... + def __getstate__(self) -> int: + ... + def __hash__(self) -> int: + ... + def __index__(self) -> int: + ... + def __init__(self, value: int) -> None: + ... + def __int__(self) -> int: + ... + def __ne__(self, other: typing.Any) -> bool: + ... + def __repr__(self) -> str: + ... + def __setstate__(self, state: int) -> None: + ... + def __str__(self) -> str: + ... + @property + def name(self) -> str: + ... + @property + def value(self) -> int: + ... +class UDmaBuf(DmaBufferAbstract): + """ + DMA data buffer accessed over AXI/UIO, implemented w/ udmabuf (see + https://github.com/ikwzm/udmabuf) + """ + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... + def __init__(self, buf_idx: int = 0) -> None: + """ + Constructs a UDmaBuf + + Parameter ``buf_idx``: + Buffer index `/dev/udmabufN` + """ +class UioAxiDmaIf(UioIf): + """ + Interface to AXI DMA Core + """ + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... + def __init__(self, arg0: UioDeviceLocation) -> None: + ... + def dump_status(self) -> None: + """ + Dump all status register flags in the log + """ +class UioDeviceLocation: + """ + Holds information where a device can be found over both UIO and XDMA + """ + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... + @staticmethod + def set_link_axi() -> None: + """ + Set UioIf's globally to use a AXI/UIO link + """ + @staticmethod + def set_link_xdma(arg0: str, arg1: int, arg2: bool) -> None: + """ + Set UioIf's globally to use a XDMA link + + Parameter ``xdma_path``: + XDMA device instance directory in `/dev` + + Parameter ``pcie_offs``: + XDMA core PCIe memory offset + + Parameter ``x7_series_mode``: + Set the interface to Xilinx 7 series mode. PCIe connections to + that device will be limited to 32 bits. + """ + def __init__(self, uioname: str, xdmaregion: UioRegion = ..., xdmaevtdev: str = '') -> None: + ... + def hw_acc(self) -> HwAccessor: + ... + @property + def uio_name(self) -> str: + """ + Device name (from device tree) for access through UIO + """ + @uio_name.setter + def uio_name(self, arg0: str) -> None: + ... + @property + def xdma_evt_dev(self) -> str: + """ + optional: Event file for access through XDMA + """ + @xdma_evt_dev.setter + def xdma_evt_dev(self, arg0: str) -> None: + ... + @property + def xdma_region(self) -> UioRegion: + """ + Memory-mapped region for access through XDMA + """ + @xdma_region.setter + def xdma_region(self, arg0: UioRegion) -> None: + ... +class UioIf: + """ + Base class for UIO interfaces + """ + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... + def __init__(self, arg0: str, arg1: UioDeviceLocation) -> None: + ... + def _rd32(self, arg0: int) -> int: + ... + def _wr32(self, arg0: int, arg1: int) -> None: + ... + def arm_interrupt(self) -> None: + ... + def wait_for_interrupt(self) -> int: + ... +class UioMemSgdma(UioIf): + """ + Interface to AXI DMA scatter-gather buffers & descriptors Uses a UioIf + to access DMA descriptor memory + """ + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... + def __init__(self, arg0: UioDeviceLocation) -> None: + ... + def print_descs(self) -> None: + """ + Print all SGDMA descriptors + """ +class UioRegion: + """ + General-purpose struct to define a memory area + """ + addr: int + size: int + @staticmethod + def _pybind11_conduit_v1_(*args, **kwargs): + ... + def __init__(self, arg0: int, arg1: int) -> None: + ... +def set_logging_level(arg0: LogLevel) -> None: + ... +DEBUG: LogLevel # value = +FATAL: LogLevel # value = +INFO: LogLevel # value = +TRACE: LogLevel # value = diff --git a/pyudmaio/src/PythonBinding.cpp b/pyudmaio/src/PythonBinding.cpp index a39a6886..f1200c46 100644 --- a/pyudmaio/src/PythonBinding.cpp +++ b/pyudmaio/src/PythonBinding.cpp @@ -15,6 +15,7 @@ #include #include "DataHandlerPython.hpp" +#include "docstrings.hpp" #include "udmaio/FpgaMemBufferOverAxi.hpp" #include "udmaio/FpgaMemBufferOverXdma.hpp" #include "udmaio/FrameFormat.hpp" @@ -43,82 +44,124 @@ PYBIND11_MODULE(binding, m) { udmaio::Logger::init(15); udmaio::Logger::set_level(udmaio::bls::info); - py::class_(m, "UioRegion") + py::class_(m, "UioRegion", DOC(udmaio, UioRegion)) .def(py::init()) .def_readwrite("addr", &udmaio::UioRegion::addr) .def_readwrite("size", &udmaio::UioRegion::size); - py::class_>(m, "HwAccessor"); + py::class_>(m, + "HwAccessor", + DOC(udmaio, HwAccessor)); - py::class_(m, "UioDeviceLocation") + py::class_(m, "UioDeviceLocation", DOC(udmaio, UioDeviceLocation)) .def(py::init(), py::arg("uioname"), py::arg("xdmaregion") = udmaio::UioRegion({0, 0}), py::arg("xdmaevtdev") = std::string("")) - .def_static("set_link_axi", &udmaio::UioDeviceLocation::set_link_axi) - .def_static("set_link_xdma", &udmaio::UioDeviceLocation::set_link_xdma) - .def_readwrite("uio_name", &udmaio::UioDeviceLocation::uio_name) - .def_readwrite("xdma_region", &udmaio::UioDeviceLocation::xdma_region) - .def_readwrite("xdma_evt_dev", &udmaio::UioDeviceLocation::xdma_evt_dev) - .def("hw_acc", &udmaio::UioDeviceLocation::hw_acc); + .def_static("set_link_axi", + &udmaio::UioDeviceLocation::set_link_axi, + DOC(udmaio, UioDeviceLocation, set_link_axi)) + .def_static("set_link_xdma", + &udmaio::UioDeviceLocation::set_link_xdma, + DOC(udmaio, UioDeviceLocation, set_link_xdma)) + .def_readwrite("uio_name", + &udmaio::UioDeviceLocation::uio_name, + DOC(udmaio, UioDeviceLocation, uio_name)) + .def_readwrite("xdma_region", + &udmaio::UioDeviceLocation::xdma_region, + DOC(udmaio, UioDeviceLocation, xdma_region)) + .def_readwrite("xdma_evt_dev", + &udmaio::UioDeviceLocation::xdma_evt_dev, + DOC(udmaio, UioDeviceLocation, xdma_evt_dev)) + .def("hw_acc", &udmaio::UioDeviceLocation::hw_acc, DOC(udmaio, UioDeviceLocation, hw_acc)); - py::class_>(m, "ConfigBase") - .def("hw_acc", &udmaio::UioConfigBase::hw_acc); + py::class_>( + m, + "ConfigBase", + DOC(udmaio, UioConfigBase)) + .def("hw_acc", &udmaio::UioConfigBase::hw_acc, DOC(udmaio, UioConfigBase, hw_acc)); py::class_>( m, - "ConfigUio") + "ConfigUio", + DOC(udmaio, UioConfigUio)) .def(py::init<>()); py::class_>(m, "ConfigXdma") + std::shared_ptr>(m, "ConfigXdma", DOC(udmaio, UioConfigXdma)) .def(py::init(), py::arg("xdma_path"), py::arg("pcie_offs"), - py::arg("x7_series_mode") = bool(false)); + py::arg("x7_series_mode") = bool(false), + DOC(udmaio, UioConfigXdma, UioConfigXdma)); - py::class_>(m, "UioIf") - .def(py::init()) - .def("_rd32", &UioIf_PyPublishHelper::_rd32) - .def("_wr32", &UioIf_PyPublishHelper::_wr32) - .def("arm_interrupt", &UioIf_PyPublishHelper::arm_interrupt) - .def("wait_for_interrupt", &UioIf_PyPublishHelper::wait_for_interrupt); + py::class_>( + m, + "UioIf", + DOC(udmaio, UioIf)) + .def(py::init(), DOC(udmaio, UioIf, UioIf)) + .def("_rd32", &UioIf_PyPublishHelper::_rd32, DOC(udmaio, UioIf, rd32)) + .def("_wr32", &UioIf_PyPublishHelper::_wr32, DOC(udmaio, UioIf, wr32)) + .def("arm_interrupt", + &UioIf_PyPublishHelper::arm_interrupt, + DOC(udmaio, UioIf, arm_interrupt)) + .def("wait_for_interrupt", + &UioIf_PyPublishHelper::wait_for_interrupt, + DOC(udmaio, UioIf, wait_for_interrupt)); py::class_>( m, - "DmaBufferAbstract") - .def("get_phys_region", &udmaio::DmaBufferAbstract::get_phys_region); + "DmaBufferAbstract", + DOC(udmaio, DmaBufferAbstract)) + .def("get_phys_region", + &udmaio::DmaBufferAbstract::get_phys_region, + DOC(udmaio, DmaBufferAbstract, get_phys_region)); py::class_>(m, "FpgaMemBufferOverAxi") - .def(py::init()); + std::shared_ptr>(m, + "FpgaMemBufferOverAxi", + DOC(udmaio, FpgaMemBufferOverAxi)) + .def(py::init(), + DOC(udmaio, FpgaMemBufferOverAxi, FpgaMemBufferOverAxi)); py::class_>(m, "FpgaMemBufferOverXdma") - .def(py::init()); + std::shared_ptr>(m, + "FpgaMemBufferOverXdma", + DOC(udmaio, FpgaMemBufferOverXdma)) + .def(py::init(), + DOC(udmaio, FpgaMemBufferOverXdma, FpgaMemBufferOverXdma)); py::class_>( m, - "UDmaBuf") - .def(py::init(), py::arg("buf_idx") = 0); + "UDmaBuf", + DOC(udmaio, UDmaBuf)) + .def(py::init(), py::arg("buf_idx") = 0, DOC(udmaio, UDmaBuf, UDmaBuf)); py::class_>( m, - "UioAxiDmaIf") - .def(py::init()) - .def("dump_status", &udmaio::UioAxiDmaIf::dump_status); + "UioAxiDmaIf", + DOC(udmaio, UioAxiDmaIf)) + .def(py::init(), DOC(udmaio, UioAxiDmaIf, UioAxiDmaIf)) + .def("dump_status", + &udmaio::UioAxiDmaIf::dump_status, + DOC(udmaio, UioAxiDmaIf, dump_status)); py::class_>( m, - "UioMemSgdma") - .def(py::init()) - .def("print_descs", &udmaio::UioMemSgdma::print_descs); + "UioMemSgdma", + DOC(udmaio, UioMemSgdma)) + .def(py::init(), DOC(udmaio, UioMemSgdma, UioMemSgdma)) + .def("print_descs", + &udmaio::UioMemSgdma::print_descs, + DOC(udmaio, UioMemSgdma, print_descs)); - py::class_ data_handler(m, "DataHandler"); + py::class_ data_handler(m, + "DataHandler", + DOC(udmaio, DataHandlerPython)); data_handler .def(py::init, @@ -150,9 +193,11 @@ PYBIND11_MODULE(binding, m) { m.def("set_logging_level", [](boost::log::trivial::severity_level level) { udmaio::Logger::set_level(level); }); - py::class_ frame_format(m, "FrameFormat"); + py::class_ frame_format(m, "FrameFormat", DOC(udmaio, FrameFormat)); - py::enum_(frame_format, "PixelFormat") + py::enum_(frame_format, + "PixelFormat", + DOC(udmaio, FrameFormat, PixelFormat)) .value("unknown", udmaio::FrameFormat::PixelFormat::unknown) .value("Mono8", udmaio::FrameFormat::PixelFormat::Mono8) .value("Mono10", udmaio::FrameFormat::PixelFormat::Mono10) @@ -194,10 +239,14 @@ PYBIND11_MODULE(binding, m) { .value("RGB8_Planar", udmaio::FrameFormat::PixelFormat::RGB8_Planar) .export_values(); - py::class_(frame_format, "Dim") - .def(py::init()) - .def_readwrite("width", &udmaio::FrameFormat::dim_t::width) - .def_readwrite("height", &udmaio::FrameFormat::dim_t::height); + py::class_(frame_format, "Dim", DOC(udmaio, FrameFormat, dim_t)) + .def(py::init(), DOC(udmaio, FrameFormat, dim_t, dim_t)) + .def_readwrite("width", + &udmaio::FrameFormat::dim_t::width, + DOC(udmaio, FrameFormat, dim_t, width)) + .def_readwrite("height", + &udmaio::FrameFormat::dim_t::height, + DOC(udmaio, FrameFormat, dim_t, height)); frame_format.def(py::init<>()) .def("set_format", diff --git a/pyudmaio/src/docstrings.hpp b/pyudmaio/src/docstrings.hpp new file mode 100644 index 00000000..ccd108ff --- /dev/null +++ b/pyudmaio/src/docstrings.hpp @@ -0,0 +1,594 @@ +/* + This file contains docstrings for use in the Python bindings. + Do not edit! They were automatically extracted by pybind11_mkdoc. + */ + +#define __EXPAND(x) x +#define __COUNT(_1, _2, _3, _4, _5, _6, _7, COUNT, ...) COUNT +#define __VA_SIZE(...) __EXPAND(__COUNT(__VA_ARGS__, 7, 6, 5, 4, 3, 2, 1)) +#define __CAT1(a, b) a ## b +#define __CAT2(a, b) __CAT1(a, b) +#define __DOC1(n1) __doc_##n1 +#define __DOC2(n1, n2) __doc_##n1##_##n2 +#define __DOC3(n1, n2, n3) __doc_##n1##_##n2##_##n3 +#define __DOC4(n1, n2, n3, n4) __doc_##n1##_##n2##_##n3##_##n4 +#define __DOC5(n1, n2, n3, n4, n5) __doc_##n1##_##n2##_##n3##_##n4##_##n5 +#define __DOC6(n1, n2, n3, n4, n5, n6) __doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6 +#define __DOC7(n1, n2, n3, n4, n5, n6, n7) __doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7 +#define DOC(...) __EXPAND(__EXPAND(__CAT2(__DOC, __VA_SIZE(__VA_ARGS__)))(__VA_ARGS__)) + +#if defined(__GNUG__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif + + +static const char *__doc_udmaio_DataHandlerPython = R"doc()doc"; + +static const char *__doc_udmaio_DataHandlerPython_DataHandlerPython = R"doc()doc"; + +static const char *__doc_udmaio_DataHandlerPython_desc_ptr = R"doc()doc"; + +static const char *__doc_udmaio_DataHandlerPython_dma_ptr = R"doc()doc"; + +static const char *__doc_udmaio_DataHandlerPython_mem_ptr = R"doc()doc"; + +static const char *__doc_udmaio_DataHandlerPython_numpy_read = R"doc()doc"; + +static const char *__doc_udmaio_DataHandlerPython_numpy_read_nb = R"doc()doc"; + +static const char *__doc_udmaio_DataHandlerPython_start = R"doc()doc"; + +static const char *__doc_udmaio_DmaBufferAbstract = R"doc(Base class for DMA data buffer)doc"; + +static const char *__doc_udmaio_DmaBufferAbstract_append_from_buf = +R"doc(Append received DMA data to vector + +Parameter ``buf_info``: + Memory region of DMA buffer + +Parameter ``out``: + Vector to append received data to)doc"; + +static const char *__doc_udmaio_DmaBufferAbstract_copy_from_buf = R"doc()doc"; + +static const char *__doc_udmaio_DmaBufferAbstract_get_phys_region = +R"doc(Get physical region + +Returns: + Physical address and size of DMA data buffer)doc"; + +static const char *__doc_udmaio_DmaMode = R"doc(DMA access mode)doc"; + +static const char *__doc_udmaio_DmaMode_UIO = R"doc(< ARM userspace I/O)doc"; + +static const char *__doc_udmaio_DmaMode_XDMA = R"doc(< PCIe XDMA driver)doc"; + +static const char *__doc_udmaio_FpgaMemBufferOverAxi = +R"doc(DMA data buffer accessed over AXI/UIO, described w/ explicit address & +size)doc"; + +static const char *__doc_udmaio_FpgaMemBufferOverAxi_FpgaMemBufferOverAxi = R"doc()doc"; + +static const char *__doc_udmaio_FpgaMemBufferOverAxi_copy_from_buf = R"doc()doc"; + +static const char *__doc_udmaio_FpgaMemBufferOverAxi_get_phys_region = R"doc()doc"; + +static const char *__doc_udmaio_FpgaMemBufferOverXdma = R"doc(DMA data buffer accessed over XDMA using the xdma c2h0 stream channel)doc"; + +static const char *__doc_udmaio_FpgaMemBufferOverXdma_FpgaMemBufferOverXdma = +R"doc(Constructs a DMA data buffer + +Parameter ``path``: + Base path of XDMA instance in `/dev` + +Parameter ``phys_addr``: + Physical address of DMA data buffer)doc"; + +static const char *__doc_udmaio_FpgaMemBufferOverXdma_copy_from_buf = R"doc()doc"; + +static const char *__doc_udmaio_FpgaMemBufferOverXdma_dma_fd = R"doc()doc"; + +static const char *__doc_udmaio_FpgaMemBufferOverXdma_get_phys_region = R"doc()doc"; + +static const char *__doc_udmaio_FpgaMemBufferOverXdma_phys_region = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_FrameFormat = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BGR565p = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BGR8 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BGRa8 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BayerBG10 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BayerBG12 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BayerBG16 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BayerBG8 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BayerGB10 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BayerGB12 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BayerGB16 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BayerGB8 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BayerGR10 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BayerGR12 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BayerGR16 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BayerGR8 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BayerRG10 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BayerRG12 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BayerRG16 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_BayerRG8 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_Mono10 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_Mono12 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_Mono14 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_Mono16 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_Mono8 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_RGB10V1Packed1 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_RGB10p32 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_RGB565p = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_RGB8 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_RGB8_Planar = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_RGBa8 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_YCbCr422_8 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_YCbCr422_8_CbYCrY = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_YCbCr601_422_8 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_YCbCr601_422_8_CbYCrY = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_YCbCr601_8_CbYCr = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_YCbCr709_422_8 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_YCbCr709_422_8_CbYCrY = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_YCbCr709_8_CbYCr = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_YCbCr8_CbYCr = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_YUV422_8 = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_YUV422_8_UYVY = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_YUV8_UYV = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_PixelFormat_unknown = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_bpp = R"doc(Bytes per pixel)doc"; + +static const char *__doc_udmaio_FrameFormat_dim = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_dim_t = R"doc(Frame dimensions)doc"; + +static const char *__doc_udmaio_FrameFormat_dim_t_dim_t = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_dim_t_height = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_dim_t_width = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_get_bytes_per_pixel = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_get_dim = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_get_frm_size = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_get_hsize = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_get_pixel_format = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_get_pixel_format_str = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_get_pixel_per_word = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_get_word_width = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_hsize = R"doc(Line length in bytes)doc"; + +static const char *__doc_udmaio_FrameFormat_pix_fmt = R"doc(Pixel format)doc"; + +static const char *__doc_udmaio_FrameFormat_pix_fmt_from_str = +R"doc(Gets pixel format enum from string + +Parameter ``pix_fmt_str``: + String containing the name of the pixel format)doc"; + +static const char *__doc_udmaio_FrameFormat_pix_fmt_to_str = +R"doc(Gets pixel format string from enum + +Parameter ``pix_fmt``: + Enum containing the pixel format)doc"; + +static const char *__doc_udmaio_FrameFormat_pix_per_word = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_set_bpp = +R"doc(Set format of the frames used for the video stream, frame dimensions +are not touched + +Parameter ``bytes_per_pix``: + Number of bytes per pixel, pixel format will be set to unknown)doc"; + +static const char *__doc_udmaio_FrameFormat_set_dim = +R"doc(Set format of the frames used for the video stream, pixel format is +untouched + +Parameter ``dim``: + Width and height of the video frame (in pixels))doc"; + +static const char *__doc_udmaio_FrameFormat_set_format = +R"doc(Set format of the frames used for the video stream + +Parameter ``dim``: + Width and height of the video frame (in pixels) + +Parameter ``bytes_per_pix``: + Number of bytes per pixel, pixel format will be set to unknown + +Parameter ``word_width``: + Number of bytes per data word used by the dma)doc"; + +static const char *__doc_udmaio_FrameFormat_set_format_2 = +R"doc(Set format of the frames used for the video stream + +Parameter ``dim``: + Width and height of the video frame (in pixels) + +Parameter ``pixFmt``: + Pixel format, will be used to set bytes per pixel value + +Parameter ``word_width``: + Number of bytes per data word used by the dma)doc"; + +static const char *__doc_udmaio_FrameFormat_set_format_3 = +R"doc(Set format of the frames used for the video stream + +Parameter ``dim``: + Width and height of the video frame (in pixels) + +Parameter ``pixFmt``: + Pixel format, will be used to set bytes per pixel value + +Parameter ``word_width``: + Number of bytes per data word used by the dma)doc"; + +static const char *__doc_udmaio_FrameFormat_set_pix_fmt = +R"doc(Set format of the frames used for the video stream, frame dimensions +are not touched + +Parameter ``pixFmt``: + Pixel format, will be used to set bytes per pixel value)doc"; + +static const char *__doc_udmaio_FrameFormat_set_word_width = +R"doc(Set format of the frames used for the video stream, frame dimensions +are not touched + +Parameter ``word_width``: + Number of bytes per data word used by the dma)doc"; + +static const char *__doc_udmaio_FrameFormat_update_bpp = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_update_frm_dim = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_update_hsize = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_update_px_fmt = R"doc()doc"; + +static const char *__doc_udmaio_FrameFormat_word_width = R"doc(Number of bytes per data word used by the dma)doc"; + +static const char *__doc_udmaio_HwAccessor = R"doc()doc"; + +static const char *__doc_udmaio_UDmaBuf = +R"doc(DMA data buffer accessed over AXI/UIO, implemented w/ udmabuf (see +https://github.com/ikwzm/udmabuf))doc"; + +static const char *__doc_udmaio_UDmaBuf_UDmaBuf = +R"doc(Constructs a UDmaBuf + +Parameter ``buf_idx``: + Buffer index `/dev/udmabufN`)doc"; + +static const char *__doc_udmaio_UDmaBuf_copy_from_buf = R"doc()doc"; + +static const char *__doc_udmaio_UDmaBuf_fd = R"doc()doc"; + +static const char *__doc_udmaio_UDmaBuf_get_phys_addr = R"doc()doc"; + +static const char *__doc_udmaio_UDmaBuf_get_phys_region = R"doc()doc"; + +static const char *__doc_udmaio_UDmaBuf_get_size = R"doc()doc"; + +static const char *__doc_udmaio_UDmaBuf_mem = R"doc()doc"; + +static const char *__doc_udmaio_UDmaBuf_phys = R"doc()doc"; + +static const char *__doc_udmaio_UioAxiDmaIf = R"doc(Interface to AXI DMA Core)doc"; + +static const char *__doc_udmaio_UioAxiDmaIf_UioAxiDmaIf = R"doc()doc"; + +static const char *__doc_udmaio_UioAxiDmaIf_check_for_errors = +R"doc(Check status register and log any errors + +Returns: + true if any error occurred)doc"; + +static const char *__doc_udmaio_UioAxiDmaIf_clear_interrupt = R"doc(Wait for interrupt and acknowledge it)doc"; + +static const char *__doc_udmaio_UioAxiDmaIf_dump_status = R"doc(Dump all status register flags in the log)doc"; + +static const char *__doc_udmaio_UioAxiDmaIf_get_curr_desc = R"doc()doc"; + +static const char *__doc_udmaio_UioAxiDmaIf_start = +R"doc(Configure and start the AXI DMA controller + +Parameter ``start_desc``: + Address of first SGDMA descriptor)doc"; + +static const char *__doc_udmaio_UioConfigBase = R"doc(Base class for HwAccessor creation)doc"; + +static const char *__doc_udmaio_UioConfigBase_2 = R"doc(Base class for HwAccessor creation)doc"; + +static const char *__doc_udmaio_UioConfigBase_hw_acc = R"doc()doc"; + +static const char *__doc_udmaio_UioConfigBase_mode = +R"doc(Mode of physical connection to the UioIf object + +Returns: + DmaMode enum)doc"; + +static const char *__doc_udmaio_UioConfigUio = R"doc(Creates HwAccessor from UioDeviceLocation (UIO version))doc"; + +static const char *__doc_udmaio_UioConfigUio_get_map_region = R"doc()doc"; + +static const char *__doc_udmaio_UioConfigUio_get_uio_number = R"doc()doc"; + +static const char *__doc_udmaio_UioConfigUio_hw_acc = R"doc()doc"; + +static const char *__doc_udmaio_UioConfigUio_mode = R"doc()doc"; + +static const char *__doc_udmaio_UioConfigXdma = R"doc(Creates HwAccessor from UioDeviceLocation (XDMA version))doc"; + +static const char *__doc_udmaio_UioConfigXdma_UioConfigXdma = R"doc()doc"; + +static const char *__doc_udmaio_UioConfigXdma_UioConfigXdma_2 = +R"doc(Create UioConfigXdma + +Parameter ``xdma_path``: + XDMA device path `/dev/...` + +Parameter ``pcie_offs``: + PCIe offset in memory)doc"; + +static const char *__doc_udmaio_UioConfigXdma_hw_acc = R"doc()doc"; + +static const char *__doc_udmaio_UioConfigXdma_mode = R"doc()doc"; + +static const char *__doc_udmaio_UioConfigXdma_pcie_offs = R"doc()doc"; + +static const char *__doc_udmaio_UioConfigXdma_x7_series_mode = R"doc()doc"; + +static const char *__doc_udmaio_UioConfigXdma_xdma_path = R"doc()doc"; + +static const char *__doc_udmaio_UioDeviceLocation = R"doc(Holds information where a device can be found over both UIO and XDMA)doc"; + +static const char *__doc_udmaio_UioDeviceLocation_UioDeviceLocation = R"doc()doc"; + +static const char *__doc_udmaio_UioDeviceLocation_UioDeviceLocation_2 = R"doc()doc"; + +static const char *__doc_udmaio_UioDeviceLocation_hw_acc = R"doc()doc"; + +static const char *__doc_udmaio_UioDeviceLocation_hw_acc_override = R"doc(Override the regular hardware accessor (for testing purposes))doc"; + +static const char *__doc_udmaio_UioDeviceLocation_set_link_axi = R"doc(Set UioIf's globally to use a AXI/UIO link)doc"; + +static const char *__doc_udmaio_UioDeviceLocation_set_link_xdma = +R"doc(Set UioIf's globally to use a XDMA link + +Parameter ``xdma_path``: + XDMA device instance directory in `/dev` + +Parameter ``pcie_offs``: + XDMA core PCIe memory offset + +Parameter ``x7_series_mode``: + Set the interface to Xilinx 7 series mode. PCIe connections to + that device will be limited to 32 bits.)doc"; + +static const char *__doc_udmaio_UioDeviceLocation_uio_name = R"doc(Device name (from device tree) for access through UIO)doc"; + +static const char *__doc_udmaio_UioDeviceLocation_xdma_evt_dev = R"doc(optional: Event file for access through XDMA)doc"; + +static const char *__doc_udmaio_UioDeviceLocation_xdma_region = R"doc(Memory-mapped region for access through XDMA)doc"; + +static const char *__doc_udmaio_UioIf = R"doc(Base class for UIO interfaces)doc"; + +static const char *__doc_udmaio_UioIf_UioIf = R"doc()doc"; + +static const char *__doc_udmaio_UioIf_arm_interrupt = R"doc()doc"; + +static const char *__doc_udmaio_UioIf_enable_debug = R"doc()doc"; + +static const char *__doc_udmaio_UioIf_get_fd_int = +R"doc(Get file descriptor of interrupt event file + +Returns: + Event file descriptor)doc"; + +static const char *__doc_udmaio_UioIf_hw = R"doc()doc"; + +static const char *__doc_udmaio_UioIf_lg = R"doc()doc"; + +static const char *__doc_udmaio_UioIf_rd32 = R"doc()doc"; + +static const char *__doc_udmaio_UioIf_rd64 = R"doc()doc"; + +static const char *__doc_udmaio_UioIf_rd_reg = R"doc()doc"; + +static const char *__doc_udmaio_UioIf_reg_to_raw = R"doc()doc"; + +static const char *__doc_udmaio_UioIf_reg_to_raw_2 = R"doc()doc"; + +static const char *__doc_udmaio_UioIf_wait_for_interrupt = R"doc()doc"; + +static const char *__doc_udmaio_UioIf_wr32 = R"doc()doc"; + +static const char *__doc_udmaio_UioIf_wr64 = R"doc()doc"; + +static const char *__doc_udmaio_UioIf_wr_reg = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma = +R"doc(Interface to AXI DMA scatter-gather buffers & descriptors Uses a UioIf +to access DMA descriptor memory)doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDesc = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDescControl = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDescControl_buffer_len = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDescControl_rsvd = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDescControl_rxeof = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDescControl_rxsof = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDescStatus = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDescStatus_cmplt = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDescStatus_dmadecerr = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDescStatus_dmainterr = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDescStatus_dmaslverr = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDescStatus_num_stored_bytes = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDescStatus_rxeof = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDescStatus_rxsof = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDesc_app = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDesc_buffer_addr = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDesc_control = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDesc_nxtdesc = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDesc_rsvd0x10 = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDesc_rsvd0x14 = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_S2mmDesc_status = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_UioMemSgdma = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_buf_addrs = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_buf_size = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_desc_statuses = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_descriptors = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_get_first_desc_addr = +R"doc(Get address of first SGDMA descriptor (needed for the AXI DMA I/F) + +Returns: + Address of first SGDMA descriptor)doc"; + +static const char *__doc_udmaio_UioMemSgdma_get_full_buffers = +R"doc(Get all full SGDMA buffers + +Returns: + Vector of buffer indices of full buffers)doc"; + +static const char *__doc_udmaio_UioMemSgdma_get_next_packet = +R"doc(Get SGDMA buffers for next packet + +Returns: + Vector of buffer indices for next packet Returns only complete + packets)doc"; + +static const char *__doc_udmaio_UioMemSgdma_init_buffers = +R"doc(Initialize SGDMA descriptors + +Parameter ``mem``: + Memory receiving the SGDMA data + +Parameter ``num_buffers``: + Number of descriptors / SGDMA blocks + +Parameter ``buf_size``: + Size of each SGDMA block)doc"; + +static const char *__doc_udmaio_UioMemSgdma_mem = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_next_readable_buf = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_nr_cyc_desc = R"doc()doc"; + +static const char *__doc_udmaio_UioMemSgdma_print_desc = +R"doc(Print SGDMA descriptor + +Parameter ``desc``: + SGDMA descriptor)doc"; + +static const char *__doc_udmaio_UioMemSgdma_print_descs = R"doc(Print all SGDMA descriptors)doc"; + +static const char *__doc_udmaio_UioMemSgdma_read_buffers = +R"doc(Read data from a set of buffers + +Parameter ``indices``: + Vector of buffer indices to read)doc"; + +static const char *__doc_udmaio_UioMemSgdma_write_cyc_mode = R"doc()doc"; + +static const char *__doc_udmaio_UioRegion = R"doc(General-purpose struct to define a memory area)doc"; + +static const char *__doc_udmaio_UioRegion_addr = R"doc(< Start of region)doc"; + +static const char *__doc_udmaio_UioRegion_size = R"doc(< Size of region)doc"; + +static const char *__doc_udmaio_operator_lshift = R"doc()doc"; + +static const char *__doc_udmaio_operator_lshift_2 = R"doc()doc"; + +static const char *__doc_udmaio_operator_lshift_3 = R"doc()doc"; + +static const char *__doc_udmaio_operator_rshift = R"doc()doc"; + +#if defined(__GNUG__) +#pragma GCC diagnostic pop +#endif +