次の行を含むコードを見ています。
a <= to_sfixed (-3.125, 7, -6);
a
この行が実行された後はどうなりますか?
で関数を見つけたと思います。float_pkg_c.vhd
これはコードの重要な部分のようです:
result_big := to_sfixed (
arg => STD_LOGIC_VECTOR(rsigned),
left_index => left_index,
right_index => (right_index-3));
result := resize (arg => result_big,
left_index => left_index,
right_index => right_index,
round_style => round_style,
overflow_style => overflow_style);
To_sfixed – 「float」から「sfixed」へ。入力: arg (float)、left_index および right_index (自然) または size_res (ufixed)。パラメータ round_style : Boolean (true)、overflow_style : Boolean (true)、check_error : Boolean (true)、および denormalize : Boolean (true)。
しかし、私はまだ期待されるビット数を計算していません。合計で 13 ビットを期待するのは正しいですか?
このような質問に自分で答える簡単な方法はありますか (コマンド ライン インターフェイスなどを使用)。