Creating Arrays - Creating Arrays - 2026.1 English - UG1864

Vitis Functional Simulation User Guide (UG1864)

Document_ID
UG1864
Release_Date
2026-06-23
Version
2026.1 English

The general constructor signature is as follows:

varray.<type>(data, axis=[])

For fixed-point:

varray.fi (data, sign=0, wordLength=32, fractionLength=0, axis=[])
varray.cfi(data, sign=0, wordLength=32, fractionLength=0, axis=[])

For complex types, an optional second positional argument provides the imaginary part:

varray.cint32(realPart, imagPart, axis=[])
Argument Purpose
data MATLAB scalar, vector, or matrix
axis Attach AXI4-Stream sideband signals (refer to AXI4-Stream Sideband for more information).
% Vectors and matrices
row  = varray.int32([1, 2, 3, 4, 5]);
col  = varray.int32([1; 2; 3; 4; 5]);
mat  = varray.int32([1, 2; 3, 4; 5, 6]);

% Scalar -> 1×1 array
s    = varray.int32(42);           % size(s) == [1 1]

% Single-precision input
f    = varray.float(single([1.1, 2.2, 3.3]));

% Complex, two ways
c1   = varray.cint32(complex([1, 2, 3], [4, 5, 6]));
c2   = varray.cint32([1, 2, 3], [4, 5, 6]);