Skip to content

API and code reference

The repository's primary API reference is the C++ source and its Doxygen-style comments. There is no separate generated Doxygen site in the current MkDocs pipeline, so this page provides the stable entry points and explains how to read them.

Core contracts

Contract Source Use it when...
Device src/utils/device.hpp Implementing FPGA/vendor behavior or a programming lifecycle.
Jtag src/protocols/jtag.hpp Detecting/selecting a chain or issuing TAP/IR/DR scans.
JtagInterface src/protocols/jtagInterface.hpp Implementing a JTAG-capable physical or remote adapter.
FlashInterface src/protocols/flashInterface.hpp Exposing flash operations through a vendor or direct transport.
SPIFlash / BPIFlash src/protocols/ Reusing generic flash algorithms after transport exposure exists.
ConfigBitstreamParser src/parsers/configBitstreamParser.hpp Adding or reviewing a configuration-file parser.

Reading the code safely

Start at the caller in src/main.cpp, then follow the interface, then the implementation. For a JTAG issue, read in this order:

  1. main.cpp dispatch and selected board/cable;
  2. Jtag chain detection and target selection;
  3. JtagInterface contract and adapter implementation;
  4. vendor driver and parser/flash service;
  5. runtime asset lookup and CMake install rules.

For a package issue, read CMake install rules and the deployment script together. For a compatibility issue, read the catalog and generated table together. This prevents documentation or packaging from drifting away from the compiled product.

Generated and specialist documentation

When a generated page conflicts with a hand-written page, treat the source catalog or generator as authoritative and fix the documentation pipeline rather than editing generated output by hand.