TUSER-Only Streams (No TDATA) - TUSER-Only Streams (No TDATA) - 2026.1 English - UG1864

Vitis Functional Simulation User Guide (UG1864)

Document_ID
UG1864
Release_Date
2026-06-23
Version
2026.1 English

Some designs use the TUSER sideband channel to carry meaningful data instead of TDATA. Use enable_tdata=False for this style of stream.

When enable_tdata=False: - TDATA is disabled. - TKEEP and TSTRB are automatically disabled (they are byte-validity signals for TDATA). - You still provide an input array to set the number of transfers. Use np.zeros(N) in Python or zeros(1, N) in MATLAB where N matches the number of TUSER elements you intend to set.

HLS Kernel (uses void as the data type):

#include "hls_stream.h"
#include "ap_axi_sdata.h"

typedef hls::axis<void, 32, 0, 0, (AXIS_ENABLE_USER | AXIS_ENABLE_LAST), true> data_user_only_t;
typedef hls::stream<data_user_only_t> stream_user_only;

void double_plus1_user(stream_user_only& A, stream_user_only& B) {
    data_user_only_t tmp;
    for (int i = 0; i < 5; i++) {
        tmp = A.read();
        data_user_only_t out;
        out.user = tmp.user * 2 + 1;
        out.last = tmp.last;
        B.write(out);
    }
}

Python:

import vfs
import varray as va
import numpy as np

kernel = vfs.hlsKernel(input_files="example.cpp", hls_function="double_plus1_user")
N = 5
in_data = np.zeros(N, dtype=np.int32)  # N sets the number of transfers
cfg = va.axis(w_user=32, enable_tdata=False, strict=True)
in_arr = va.array(in_data, dtype=va.int32, axis=cfg)
in_arr.tuser = np.array([10, 20, 30, 40, 50])  # must have N elements
in_arr.tlast[-1] = 1

result = kernel.run(in_arr)
# result.tuser contains [21, 41, 61, 81, 101]

MATLAB:

kernel = vfs.hlsKernel( ...
    input_files  = "example.cpp", ...
    hls_function = "double_plus1_user");
N = 5;
in_data = int32(zeros(1, N));  % N sets the number of transfers
cfg = varray.axis(w_user=32, enable_tdata=false, strict=true);
in_arr = varray.int32(in_data, axis=cfg);
in_arr.tuser = [10 20 30 40 50];   % must have N elements
in_arr.tlast(5) = 1;

result = kernel.run(in_arr);
% result tuser contains [21, 41, 61, 81, 101]