Build
[build] セクションはコード生成の設定です。
clock_type フィールド
clock_type フィールドはフリップフロップを駆動するクロックエッジを指定します。
posedge– 立ち上がりエッジnegedge– 立ち下がりエッジ
reset_type フィールド
reset_type フィールドはリセットの極性と同期性を指定します。
async_low– 非同期・負極性async_high– 非同期・正極性sync_low– 同期・負極性sync_high– 同期・正極性
filelist_type フィールド
filelist_type フィールドはファイルリストのフォーマットを指定します。
absolute– プレーンテキスト形式の絶対パスのリストrelative– プレーンテキスト形式の相対パスのリストflgen– flgen 形式のファイルリスト
sources フィールド
デフォルトではVerylコンパイラはプロジェクトルートから見える全ての *.veryl ファイルを処理します。特定のディレクトリだけを処理するために sources フィールドを使用することができます。
[build]
sources = ["rtl/foo_module", "rtl/bar_module"]
上記の例では、Verylコンパイラは rtl/foo_module と rtl/bar_module の*.veryl ファイルを処理します。
target フィールド
target フィールドはコードの生成先を指定します。
source– ソースコードと同じディレクトリdirectory– 特定のディレクトリbundle– 特定のファイル
directory あるいは bundle を指定する場合は、ターゲットパスを path キーで指定します。
[build]
target = {type = "directory", path = "[dst dir]"}
implicit_parameter_types フィールド
implicit_parameter_types フィールドは生成コードの parameter 宣言で省略する型をリストアップします。いくつかのEDAツールでは特定の型(例えば string)を parameter 宣言で使うことができないためです。例えば string を指定する場合は以下のようにします。
[build]
implicit_parameter_types = ["string"]
omit_project_prefix フィールド
omit_project_prefix が true のとき、モジュール・インターフェース・パッケージ名のプロジェクトプレフィックスは省略されます。この値はデフォルトで false です。
[build]
omit_project_prefix = true
strip_comments フィールド
strip_comments が true のとき、コメント出力は省略されます。この値はデフォルトで false です。
[build]
strip_comments = true
*_prefix と *_suffix フィールド
*_prefix と *_suffix はコード生成時の追加のプレフィックスとサフィックスを指定します。指定可能な設定は以下の通りです。
clock_posedge_prefix:clock_type = posedgeのときのclock型のプレフィックスclock_posedge_suffix:clock_type = posedgeのときのclock型のサフィックスclock_negedge_prefix:clock_type = negedgeのときのclock型のプレフィックスclock_negedge_suffix:clock_type = negedgeのときのclock型のサフィックスreset_high_prefix:reset_type = *_highのときのreset型のプレフィックスreset_high_suffix:reset_type = *_highのときのreset型のサフィックスreset_low_prefix:reset_type = *_lowのときのreset型のプレフィックスreset_low_suffix:reset_type = *_lowのときのreset型のサフィックス
sourcemap_target フィールド
sourcemap_target フィールドはソースマップの生成先を指定します。指定可能な設定は以下の通りです。
target– ターゲットコードと同じディレクトリdirectory– 特定のディレクトリnone– ソースマップなし
directory を指定する場合は、ターゲットパスを path キーで指定します。
[build]
sourcemap_target = {type = "directory", path = "[dst dir]"}
expand_inside_operation フィールド
expand_inside_operation が true のとき、inside 演算子を使った演算は==? 演算子を使った論理に展開されます。これはいくつかのEDAツールがinside 演算子をサポートしていないためです。この値はデフォルトで false です。
[build]
expand_inside_operation = true
hashed_mangled_name フィールド
hashed_mangled_name が true のとき、出力されるコンポーネント名のうちジェネリック引数を示す部分がハッシュ化されます。この設定はジェネリック引数が多いときにマングリングされた名前が長くなりすぎるのを防ぎます。この値はデフォルトで false です。
[build]
hashed_mangled_name = true
例:
- ハッシュ化されていない名前:
prj___PkgA__0__1__2__3 - ハッシュ化された名前:
prj___PkgA__3894375d1deadabb
flatten_array_interface フィールド
flatten_array_interface が true のとき、多次元の配列インスタンスやmodportは1次元に展開されます。この設定は多次元配列をサポートしていないEDAツールをサポートするためのものです。この値はデフォルトで false です。
[build]
flatten_array_interface = true
例:
Veryl コード
module ModuleA (
a_if: modport InterfaceA::mp [2, 3],
) {
for i in 0..2 :g {
for j in 0..3 :g {
assign a_if[i][j].a = 0;
}
}
}
flatten_array_interface = true で生成された SystemVerilog コード
module veryl_testcase_ModuleA (
veryl_testcase_InterfaceA.mp a_if [0:(2)*(3)-1]
);
for (genvar i = 0; i < 2; i++) begin :g
for (genvar j = 0; j < 3; j++) begin :g
always_comb a_if[(i)*(3)+(j)].a = 0;
end
end
endmodule
exclude_std フィールド
exclude_std が true のとき、標準ライブラリはインクルードされません。
[build]
exclude_std = true
emit_cond_type フィールド
emit_cond_type が true のとき、unique unique0 priority といった指定が出力されます。
[build]
emit_cond_type = true
instance_depth_limit フィールド
instance_depth_limit はインスタンス階層の最大深さです。デフォルト値は 128 です。
[build]
instance_depth_limit = 256
instance_total_limi フィールド
instance_total_limit は1つのモジュール内のサブインスタンスの最大数です。デフォルト値は 1048576 です。
[build]
instance_total_limit = 256
incremental フィールド
incremental が true のとき、Verylコンパイラは更新されたファイルに関連したファイルのみを再生成します。デフォルト値は false です。
[build]
incremental = true
error_count_limit フィールド
表示するエラーメッセージの最大数を指定します。全てのメッセージを表示するにはフィールドを設定しないか、0を指定します。
[build]
error_count_limit = 10