Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/pynq_remote.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The diagram below illustrates the key differences between Classic PYNQ and PYNQ.

* Offload the Python API to your host machine, reducing on-target resource requirements.
* Target-side C++ implementation (`PYNQ.cpp`) for boosting on-device performance.
* Lightweight Petalinux images: shrink SD card images from ~7GB to around 200MB (small enough for a RAM disk).
* Lightweight EDF/Yocto images: shrink SD card images from ~7GB to around 200MB (small enough for a RAM disk).
* PYNQ API compatibility: classic PYNQ code and Jupyter notebooks run remotely, with minimal or no changes.
* Extend with custom remote APIs using Protobuf definitions.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/pynq_remote/cpp_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ Like PYNQ's Python API, PYNQ.cpp is part of the PYNQ ecosystem and is specifical
PYNQ.remote uses gRPC to communicate with PYNQ devices, allowing remote management of FPGA resources and memory operations.
PYNQ.remote images use a gRPC server to interact with PYNQ.cpp, which provides the necessary C++ backend functionality equivalent to what PYNQ's Python API offers.

Because it exists as a standalone C++ library, PYNQ can be used independently of PYNQ.remote. This allows developers to create custom low-level C++ applications that interact with AMD adaptive SoC platforms using familiar PYNQ concepts.
Because it exists as a standalone C++ library, *PYNQ.cpp* can be used independently of PYNQ.remote. This allows developers to create custom low-level C++ applications that interact with AMD adaptive SoC platforms using familiar PYNQ concepts.
Empty file.
63 changes: 36 additions & 27 deletions docs/source/pynq_remote/env_variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,66 +6,75 @@ Setting Environment Variables
PYNQ.remote uses two environment variables on the host.

``PYNQ_REMOTE``
Set to ``1`` when installing the ``pynq`` package with pip. This selects the
Set to ``1`` when installing the ``pynq`` package. This selects the
remote client install path and skips native board binaries and overlays.

``PYNQ_REMOTE_DEVICES``
Set before ``import pynq`` to identify target boards. The value is a
comma-separated list of IP addresses. When multiple addresses are listed,
each becomes a separate ``RemoteDevice`` instance.

Installing for PYNQ.remote
--------------------------
Installing PYNQ for PYNQ.remote
-------------------------------

The commands below use the ``uv`` environment manager tool to install PYNQ, as described
in :ref:`quickstart`. However, ``pip install`` may also be used.

**Linux/macOS:**

.. code-block:: bash

PYNQ_REMOTE=1 pip install pynq

export PYNQ_REMOTE=1
uv add "pynq @ git+https://github.com/Xilinx/PYNQ.git"

**Windows (PowerShell):**

.. code-block:: powershell

$env:PYNQ_REMOTE="1"; pip install pynq

Runtime device selection
------------------------
$env:PYNQ_REMOTE = "1"
uv add "pynq @ git+https://github.com/Xilinx/PYNQ.git"

Setting ``PYNQ_REMOTE_DEVICES`` at runtime
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------------------

Python Runtime Device Selection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can set environment variables in Python using the ``os`` module. This works
across all operating systems and does not require shell configuration. Set the
variable before importing ``pynq``.

.. code-block:: python

import os
os.environ['PYNQ_REMOTE_DEVICES'] = "192.168.2.99"
os.environ['PYNQ_REMOTE_DEVICES'] = "192.168.2.99" # IP assigned to your board

from pynq import Overlay

ol = Overlay("my_design.xsa")

Linux and macOS shells
Shell Device Selection
~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: bash

export PYNQ_REMOTE_DEVICES="192.168.2.99"
Alternatively, the environment may be configured in your shell. Variables apply
to the current shell session only.

The variable applies to the current shell session only.
**Linux/macOS:**

Windows
~~~~~~~
.. code-block:: bash

export PYNQ_REMOTE_DEVICES="192.168.2.99"

Command Prompt:

.. code-block:: powershell
**Windows (Command Prompt):**

.. code-block:: bat

set PYNQ_REMOTE_DEVICES=192.168.2.99

PowerShell:
**Windows (PowerShell):**

.. code-block:: powershell

$env:PYNQ_REMOTE_DEVICES="192.168.2.99"

Python virtual environments
Expand All @@ -74,6 +83,6 @@ Python virtual environments
To set ``PYNQ_REMOTE_DEVICES`` automatically when a virtual environment is
activated, add the appropriate line to the environment's activate script:

* Linux/macOS: ``venv/bin/activate``
* Windows Command Prompt: ``venv/Scripts/activate.bat``
* Windows PowerShell: ``venv/Scripts/Activate.ps1``
* Linux/macOS: ``.venv/bin/activate``
* Windows Command Prompt: ``.venv/Scripts/activate.bat``
* Windows PowerShell: ``.venv/Scripts/Activate.ps1``
34 changes: 25 additions & 9 deletions docs/source/pynq_remote/image_build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,32 @@ Using the Docker-based build flow

git clone --recursive https://github.com/Xilinx/PYNQ.git

#. Set up the build environment by following :ref:`pynq-sd-card`. This includes
setting ``XILINX_TOOLS`` and ``XILINXD_LICENSE_FILE`` before starting the
container.

#. Build the remote image for your target board:
#. Build the Docker image:

.. code-block:: bash

# Inside the Docker container
cd PYNQ/sdbuild
make pynqremote BOARDS=<board_name>
docker build --build-arg USERNAME=$(whoami) --build-arg USER_UID=$(id -u) \
--build-arg USER_GID=$(id -g) -t pynqdock:latest .
cd ..

#. Set the paths to the AMD tools and licence, then build the remote image for
your target board:

.. code-block:: bash

export XILINX_TOOLS=/tools/Xilinx/2025.2
export XILINXD_LICENSE_FILE="$HOME/.Xilinx"

docker run --init --rm \
--network host \
-e XILINX_TOOLS -e XILINXD_LICENSE_FILE \
-v "$XILINX_TOOLS:$XILINX_TOOLS:ro" \
-v "$XILINXD_LICENSE_FILE:$XILINXD_LICENSE_FILE" \
-v "$PWD:/workspace" \
--privileged \
pynqdock:latest \
bash -lc 'cd /workspace/sdbuild && make pynqremote BOARDS=<board_name>'

Replace ``<board_name>`` with your target board (``ZCU104`` or ``VCK190``).
The remote image target does not require the prebuilt classic PYNQ root
Expand All @@ -51,8 +66,9 @@ Using the Docker-based build flow
#. Flash the generated ``sdbuild/output/<BOARD>-4.0.0-remote.img`` image to an
SD card and boot your device (see :doc:`../appendix/sdcard`).

#. After booting, the ``pynq-remote`` server starts automatically. Use
``ip addr`` on the board to find its address, then follow :doc:`quickstart`.
#. After booting, the ``pynq-remote`` server starts automatically. Run
``ip addr`` on the board through a serial console to find its address,
then follow :doc:`quickstart`.

Image size
----------
Expand Down
30 changes: 30 additions & 0 deletions docs/source/pynq_remote/pynq_cpp/cpp_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,33 @@ XrtBufferManager Class
:undoc-members:
:protected-members:
:private-members:

GPIO Class
----------

.. doxygenclass:: GPIO
:project: Device
:members:
:undoc-members:
:protected-members:
:private-members:

XRFCLK Class (RFSoC only)
-------------------------

.. doxygenclass:: XRFCLK
:project: Device
:members:
:undoc-members:
:protected-members:
:private-members:

XrfdcRemote Class (RFSoC only)
------------------------------

.. doxygenclass:: XrfdcRemote
:project: Device
:members:
:undoc-members:
:protected-members:
:private-members:
Loading