MATLAB - MATLAB - 2026.1 日本語 - UG1864

Vitis Functional Simulation (VFS) ユーザー ガイド (UG1864)

Document_ID
UG1864
Release_Date
2026-06-23
Version
2026.1 日本語

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