SrpV0
rogue::protocols::srp::SrpV0 bridges Rogue memory transactions to SRPv0 stream frames that are transported to hardware SRP endpoints.
For SRPv0 packet-level protocol details, see:
SrpV0 objects in C++ are referenced by the following shared pointer typedef:
The class description is shown below:
-
class SrpV0 : public rogue::interfaces::stream::Master, public rogue::interfaces::stream::Slave, public rogue::interfaces::memory::Slave
SRP v0 bridge between Rogue memory transactions and stream frames.
SrpV0sits between the memory interface (memory::Slave) and stream transport (stream::Master/stream::Slave). It serializes memory read/write transactions into SRP v0 request frames and decodes incoming SRP responses to complete transactions.SRP frames are stream transactions carried over a physical/link transport (for example DMA, TCP, or other Rogue stream backends) before arriving at an FPGA or ASIC endpoint that implements the SRP protocol for register access.
Implementation behavior:
doTransaction()serializes each memory request into one SRPv0 frame and transmits it immediately.Non-posted transactions are registered in the base
memory::Slavein-flight transaction map (addTransaction()), keyed by transaction ID.Multiple requests may be transmitted before any responses arrive, so multiple transactions can be in flight concurrently.
acceptFrame()extracts the response ID and resolves it withgetTransaction(id), so responses are matched by ID and may arrive out of order without violating correctness.
Threading/locking model:
In-flight map access is protected by the
memory::Slavemutex.Per-transaction payload/state access is protected by
TransactionLock.doTransaction()andacceptFrame()can be called from different runtime contexts provided by the connected stream transport stack.
Missing, late, or invalid responses:
Software wait timeout is enforced by the initiating
memory::Mastertransaction timeout (Master::setTimeout()in microseconds).If no valid response arrives before timeout, the waiting side completes with a timeout error.
If a late response arrives after timeout, it is treated as expired and ignored.
If a response has unknown ID, malformed header/size, or hardware error status in tail bits, the response is rejected. Hardware-status errors complete the transaction with error immediately; malformed/unknown responses typically leave the original transaction pending until software timeout.
The class is typically connected in a bidirectional stream path where outgoing requests are emitted through the
stream::Masterside and incoming frames are received throughacceptFrame().Protocol reference: https://confluence.slac.stanford.edu/x/aRmVD
Public Functions
-
SrpV0()
Constructs an SRP v0 interface instance.
This constructor is a low-level C++ allocation path. Prefer
create()when shared ownership or Python exposure is required.
-
~SrpV0()
Destroys the SRP v0 interface instance.
Processes a memory transaction and emits SRP v0 request frame(s).
Called by upstream memory masters. The transaction metadata and data payload are encoded into SRP v0 format and forwarded downstream through the stream master connection.
- Parameters:
tran – Transaction to execute over SRP.
Accepts an incoming SRP v0 response frame.
Decodes the frame, matches it to the corresponding outstanding transaction, and updates completion/error state.
- Parameters:
frame – Received SRP stream frame.
Public Static Functions
-
static std::shared_ptr<rogue::protocols::srp::SrpV0> create()
Creates an SRP v0 interface instance.
This static factory is the preferred construction path when the object is shared across Rogue graph connections or exposed to Python. It returns
std::shared_ptrownership compatible with Rogue pointer typedefs.- Returns:
Shared pointer to the created
SrpV0.
-
static void setup_python()
Registers Python bindings for this class.