PyRogue Scripts

Every script under software/scripts/ is a standalone PyDM launcher: it builds a pr.Root containing the relevant AxiPcieCore device tree, optionally wires up stream sources/sinks, and starts the PyDM GUI. All scripts accept a common --type flag selecting the backend (pcie or sim).

Common Bootstrap

Every script starts with:

import setupLibPaths  # adds surf and axi-pcie-core python/ to sys.path

This MUST be the first import. setupLibPaths.py (software/scripts/setupLibPaths.py) calls pr.addLibraryPath() for each submodule’s Python tree. Without it import axipcie and import surf fail.

Script Catalogue

LoopbackTesting.py

software/scripts/LoopbackTesting.py

Drives the DMA loopback path with a PRBS source and a PRBS sink wired through rogue.utilities.Prbs. Use this against any DmaLoopback target (e.g. XilinxVariumC1100DmaLoopback).

python LoopbackTesting.py            # /dev/datadev_0
python LoopbackTesting.py --type sim # rogue TCP-socket backend

PgpTesting.py

software/scripts/PgpTesting.py

Builds a per-lane PRBS test against a PGP-protocol target (PGP2b, PGP3, or PGP4). See Run the PGP Test Suite.

PgpMonitor.py

software/scripts/PgpMonitor.py

Read-only monitoring variant of PgpTesting.py. Same PyDM GUI minus the PRBS source/sink — useful when another application is already driving traffic.

HtspTesting.py

software/scripts/HtspTesting.py

HTSP 100 Gbps equivalent of PgpTesting.py. Use against Htsp100Gbps targets.

PrbsTesting.py

software/scripts/PrbsTesting.py

Drives the in-hardware firmware/common/PrbsTester application without involving an optical link. Use against *PrbsTester targets (e.g. XilinxVariumC1100PrbsTester).

updatePcieFpga.py

software/scripts/updatePcieFpga.py

Programs the SPI/BPI PROM with a .mcs file and rescans PCIe. See Program a Board with updatePcieFpga.py.

Environment Setup

At SLAC S3DF (rdsrv*):

source software/setup_env_slac.sh

Activates conda env rogue_v6.12.0.

At PCDS / CDS:

source software/cds_env_setup.sh

Activates conda env rogue_v6.5.0.

Outside SLAC: ensure rogue >= 6.5.0 is on PYTHONPATH and that pyrogue.pydm is importable.