Xvc
Threading and Lifecycle
Xvcruns a background server thread for TCP XVC clients.Implements Managed Interface Lifecycle: Example: Runtime Work In _start() And _stop()
For conceptual guidance, see Xilinx Protocols.
Python binding
This C++ class is also exported into Python as rogue.protocols.xilinx.Xvc.
Python API page: - Xvc
Xvc objects in C++ are referenced by the following shared pointer typedef:
The class description is shown below:
-
class Xvc : public rogue::interfaces::stream::Master, public rogue::interfaces::stream::Slave, public rogue::protocols::xilinx::JtagDriver
[header] [source] Rogue XVC bridge between TCP XVC clients and Rogue stream transport.
Xvccombines:JtagDriverprotocol logic for query/shift operations.stream::Masterto send request frames toward hardware transport.stream::Slaveto receive reply frames from hardware transport.
A background thread runs an
XvcServerTCP listener for Vivado XVC clients. Incoming XVC operations are translated to driver transfers (xfer()), which exchange Rogue frames with downstream transport endpoints.Public Functions
-
explicit Xvc(uint16_t port)
[header] [impl] Constructs an XVC bridge instance.
Creator.
This constructor is a low-level C++ allocation path. Prefer
create()when shared ownership or Python exposure is required.- Parameters:
port – TCP port used for local XVC server listener.
-
void start()
[header] [impl] Starts XVC server thread and enables bridge operation.
Start the interface.
-
virtual void stop()
[header] [impl] Stops XVC server thread and drains frame queue.
Stop the interface.
Receives reply frame from downstream Rogue transport.
Accept a frame.
Frames are queued for synchronous consumption by the active XVC transfer.
- Parameters:
frame – Incoming frame from downstream transport.
-
virtual uint64_t getMaxVectorSize() final
[header] [impl] Returns maximum vector size supported by this XVC bridge.
Computed from configured MTU and current protocol word size.
- Returns:
Maximum vector size in bytes.
-
virtual int xfer(uint8_t *txBuffer, unsigned txBytes, uint8_t *hdBuffer, unsigned hdBytes, uint8_t *rxBuffer, unsigned rxBytes) final
[header] [impl] Executes one protocol transfer over Rogue frame transport.
Sends
txBufferas a Rogue frame, waits for a queued reply frame, then copies header/payload data into caller buffers.- Parameters:
txBuffer – Request transmit buffer.
txBytes – Number of request bytes.
hdBuffer – Reply header destination buffer.
hdBytes – Number of header bytes to copy.
rxBuffer – Reply payload destination buffer.
rxBytes – Maximum reply payload bytes accepted.
- Returns:
Number of payload bytes received (implementation currently returns
0).
Public Static Functions
-
static std::shared_ptr<rogue::protocols::xilinx::Xvc> create(uint16_t port)
[header] [impl] Creates an XVC bridge instance.
Class creation.
Parameter semantics are identical to the constructor; see
Xvc()for bridge-construction details. This static factory is the preferred construction path when the object is shared across Rogue graph connections or exposed to Python. It returnsstd::shared_ptrownership compatible with Rogue pointer typedefs.Company : SLAC National Accelerator Laboratory
Description: XVC Server Wrapper Class
This file is part of the rogue software platform. It is subject to the license terms in the LICENSE.txt file found in the top-level directory of this distribution and at: https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. No part of the rogue software platform, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE.txt file.
- Parameters:
port – TCP port used for local XVC server listener.
- Returns:
Shared pointer to the created XVC instance.