run_hls_simple.m
% Simple HLS VFS example: sum_of_four kernel (sums each block of 4 inputs).
here = fileparts(mfilename('fullpath'));
myfunc = vfs.hlsKernel( ...
input_files=fullfile(here, "kernels.cpp"), ...
hls_function="sum_of_four");
din = varray.int32(int32(1:8));
dout = myfunc.run(din);
disp(int32(dout)); % Expected: [10; 26]
assert(all(int32(dout) == [10; 26]));
次のコマンドを使用して実行します。
cd hls_example
source <Vitis_install_path>/settings64.csh
matlab -batch run_hls_simple