Skip to main content

Module control

Module control 

Source
Expand description

The host’s view: ubft_new’s register map, plus what rhdl_ubft measured.

The arguments sit at the offsets of the HLS kernel’s xubft_hw.h, so ubft_new’s host code (or XRT’s set_arg) drives rhdl_ubft unchanged. ap_ctrl behaves as ap_ctrl_hs: write bit 0 to start; bit 1 (ap_done) rises when the run ends and clears when read; bit 2 (ap_idle) is high while stopped.

rhdl_ubft adds one argument ubft_new lacks: session at 0x080/0x084 (64 bits), a host-chosen id that is never reused and is signed into every certify share (sign layout v2, so a share from an old run does not verify).

Writes to 0x800..0xFFF while stopped go to the signature scheme’s configuration window (crate::ports::CfgWrite).

From regs::STATUS on, rhdl_ubft adds read-only counters the HLS kernel does not have. The host reads them after a run instead of guessing from wall-clock time:

OffsetWord
0x100MAGIC = “RUB1” (MAGIC)
0x104SHAPE: build nodes bits 0..8, window 8..16, scheme 16..24
0x108DECIDED: slots decided
0x10cFAST: decided on the fast path
0x110SLOW: decided on the slow path
0x114VIEWS: view changes
0x118CYCLES: clock cycles of the run (lo)
0x11cFIRST: cycle of the first decision
0x120LAST: cycle of the last decision
0x124SLOT_MIN: fewest cycles from a slot’s start to its decision
0x128SLOT_MAX: most
0x12cSLOT_SUM lo; 0x130 hi
0x134VERIFIED: certify shares verified (valid)
0x138REJECTED: shares that failed verification
0x13cSTATE: submachine bits 0..2, state 8..14, view 16..32
0x140FAULT (see Status::fault)

Structs§

Args
The run’s arguments, as the host wrote them.
Control
The register block.
ControlIn
Inputs of Control.
ControlOut
Outputs of Control.
ControlState
The control block’s registers.
Status
What the protocol reports to the host.

Constants§

MAGIC
“RUB1”.

Functions§

arg64_word
The value of 64-bit argument v at register offset at (low word at base, high at base + 4).
control_kernel
The control block’s logic.
set_arg64
v with the 32-bit word at at replaced by data, if at is its low (base) or high (base + 4) word.