Xvc

Xvc objects in C++ are referenced by the following shared pointer typedef:

typedef std::shared_ptr<rogue::protocols::xilinx::Xvc> rogue::protocols::xilinx::XvcPtr

The class description is shown below:

class Xvc : public rogue::interfaces::stream::Master, public rogue::interfaces::stream::Slave, public rogue::protocols::xilinx::JtagDriver

Rogue XVC bridge between TCP XVC clients and Rogue stream transport.

Xvc combines:

  • JtagDriver protocol logic for query/shift operations.

  • stream::Master to send request frames toward hardware transport.

  • stream::Slave to receive reply frames from hardware transport.

A background thread runs an XvcServer TCP 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)

Constructs an XVC bridge instance.

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.

~Xvc()

Destroys the XVC bridge instance.

void start()

Starts XVC server thread and enables bridge operation.

virtual void stop()

Stops XVC server thread and drains frame queue.

virtual void acceptFrame(std::shared_ptr<rogue::interfaces::stream::Frame> frame)

Receives reply frame from downstream Rogue transport.

Frames are queued for synchronous consumption by the active XVC transfer.

Parameters:

frame – Incoming frame from downstream transport.

virtual uint64_t getMaxVectorSize() final

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

Executes one protocol transfer over Rogue frame transport.

Sends txBuffer as 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)

Creates an XVC bridge instance.

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 returns std::shared_ptr ownership compatible with Rogue pointer typedefs.

Parameters:

port – TCP port used for local XVC server listener.

Returns:

Shared pointer to the created XVC instance.

static void setup_python()

Registers Python bindings for this class.