Python - Python - 2026.1 日本語 - UG1864

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

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

run_aie_simple.py

"""Simple AIE VFS example: stream multiply-by-2 graph."""
from pathlib import Path
import vfs
import varray as va
import numpy as np

here = Path(__file__).resolve().parent
my_graph = vfs.aieGraph(
    input_file=str(here / "DUT.cpp"),
    include_paths=[str(here / "src")],
)

input_data = np.array([1, 2, 3, 4, 5, 6, 7, 8], dtype=np.int32)
output = my_graph.run(va.array(input_data))

print("Input :", input_data)
print("Output:", np.asarray(output))
assert np.all(np.asarray(output) == input_data * 2)

次のコマンドを使用して実行します。

cd aie_example
python run_aie_simple.py