C Simulation - C Simulation - 2026.1 日本語 - UG1399

Vitis 高位合成ユーザー ガイド (UG1399)

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

説明

C Simulation (csim.* / config_csim)

C シミュレーションの実行を制御します。設定は [hls] コンフィギュレーション ファイルで管理されます。Tcl の同等機能は、config_csim (永続設定) または csim_design に引数を直接渡す方法 (実行ごと) です。

構文

表 1. コンフィギュレーションの表
オプション コンフィギュレーション ファイル Tcl デフォルト タイプ 説明
O csim.O=true -O bool C シミュレーション中にコンパイラの最適化を有効にします (シミュレーションの高速化)。
argv csim.argv=<string> -argv <string> 文字列 テストベンチの main() に渡されるコマンドライン引数。
clean csim.clean=true -clean bool C シミュレーション中にコンパイラの最適化を有効にします (シミュレーションの高速化)。
ldflags csim.ldflags=<flags> -ldflags <flags> 文字列 C シミュレーションのリンカー フラグです。
mflags csim.mflags=<flags> -mflags <flags> 文字列 C シミュレーション中に make コマンドに渡される追加のフラグです。
profile_tripcount csim.profile_tripcount=true -profile_tripcount bool C シミュレーション中にループのトリップカウントをプロファイリングして、loop_tripcount 指示子のガイドにします。
sanitize_address csim.sanitize_address=true (via config_cosim -sanitize_address) アドレス サニタイザーを有効にします。注記: config_cosim Tcl オプションですが、csim.* コンフィギュレーション名前空間にマップされます。
sanitize_undefined csim.sanitize_undefined=true (via config_cosim -sanitize_undefined) 未定義動作サニタイザーを有効にします。注記: config_cosim Tcl オプションですが、csim.* コンフィギュレーション名前空間にマップされます。
setup csim.setup=true -setup bool csim ビルド環境の設定のみで、シミュレーションは実行しません。

使用法


ini
[hls]
csim.O=true
csim.argv=input.dat output.dat
csim.profile_tripcount=true

tcl
csim_design -argv "input.dat output.dat" -profile_tripcount