VRT Enumerations

This page documents the public enumerations and supporting types in the VRT API.

Platform

Defined in vrt/utils/platform.hpp.

Value

Description

Platform::HARDWARE

Physical FPGA device via PCIe.

Platform::EMULATION

Software C-model via ZeroMQ IPC.

Platform::SIMULATION

Cycle-accurate Verilog simulation.

Platform::UNKNOWN

Unspecified or invalid platform.

if (device.getPlatform() == vrt::Platform::EMULATION) {
    // emulation-specific logic
}

See Platform Modes for a full description of each mode.

SyncType

Defined in vrt/buffer.hpp.

Value

Description

SyncType::HOST_TO_DEVICE

DMA write — transfer data from host memory to device memory (H2C).

SyncType::DEVICE_TO_HOST

DMA read — transfer data from device memory to host memory (C2H).

buf.sync(vrt::SyncType::HOST_TO_DEVICE);   // write to device
kernel.start();
kernel.wait();
buf.sync(vrt::SyncType::DEVICE_TO_HOST);   // read results back

MemoryRangeType

Defined in vrt/allocator/allocator.hpp.

Value

Description

MemoryRangeType::HBM

High Bandwidth Memory. Requires an explicit port number (0–63) in the Buffer constructor or a MemoryConfig with hbmPort set.

MemoryRangeType::DDR

DDR system memory. Single address space, no port required.

MemoryRangeType::HBM_VNOC

HBM via the Virtual Network-on-Chip. The allocator automatically places the buffer across HBM channels — no explicit port required.

// DDR buffer — no port needed
vrt::Buffer<float> ddr(device, 1024, vrt::MemoryRangeType::DDR);

// HBM buffer — explicit port required
vrt::Buffer<float> hbm(device, 1024, vrt::MemoryRangeType::HBM, 3);

// HBM VNOC — auto-placed, no port
vrt::Buffer<float> vnoc(device, 1024, vrt::MemoryRangeType::HBM_VNOC);

See Memory Model for details on memory types and allocation strategies.

HBMRegion

Defined in vrt/allocator/allocator.hpp.

Underlying type: uint64_t.

Value

Description

HBM0HBM63

Individual HBM pseudo-channels. HBM0 = 0, HBM1 = 1, …, HBM63 = 63.

NON_HBM

Sentinel value (UINT64_MAX) indicating no specific HBM region.

Users typically do not reference HBMRegion directly. Pass a port number to the Buffer constructor instead.

ProgramType

Defined in vrt/device.hpp.

Value

Description

ProgramType::FLASH

Program the device via flash memory (default).

ProgramType::JTAG

Program the device via JTAG interface.

vrt::Device device(bdf, vrtbinPath, true, vrt::ProgramType::FLASH);

StreamDirection

Defined in vrt/qdma/qdma_connection.hpp.

Value

Description

StreamDirection::HOST_TO_DEVICE

Streaming data flow from host to device (H2C).

StreamDirection::DEVICE_TO_HOST

Streaming data flow from device to host (C2H).

Used internally by QdmaConnection and StreamingBuffer. Most users interact with streaming via vrt::StreamingBuffer<T> rather than referencing StreamDirection directly.

MemoryConfig

Defined in vrt/allocator/allocator.hpp.

A plain struct describing the memory type and optional HBM port for a buffer. Obtain it from kernel metadata rather than constructing it manually:

vrt::Kernel kernel(device, "my_kernel");
vrt::MemoryConfig config = kernel.portMemoryConfig("m_axi_gmem0");
vrt::Buffer<float> buf(device, 1024, config);

Field

Description

MemoryRangeType type

DDR, HBM, or HBM_VNOC.

std::optional<uint8_t> hbmPort

Set only when type == HBM. Contains the HBM port number (0–63).