Accessing Fields (Python) - Accessing Fields (Python) - 2026.1 English - UG1864

Vitis Functional Simulation User Guide (UG1864)

Document_ID
UG1864
Release_Date
2026-06-23
Version
2026.1 English

Sideband fields are accessed as attributes on the varray object:

arr = va.array(np.arange(5, dtype=np.int32), dtype=va.int32, axis=va.axis())

tlast_values = arr.tlast       # bool array of shape (5,)
print(arr.tlast[0])            # False
print(arr.tkeep[2])            # 15

# Modify fields by direct assignment.
# tlast accepts bool, int (0/1), or any array-like castable to bool.
arr.tlast[-1] = 1              # mark last element
arr.tlast = np.array([0, 0, 1, 0, 1])   # assign full array (auto-cast to bool)
arr.tlast = np.array([False, False, True, False, True])  # native bool form
arr.tkeep = 0x3                # broadcast scalar to all elements