function "or"
自己定義の配列型の forを実装しているときに、 "or"
forの実装を調べることにしましたstd_logic_vector
。そこで、次のようなコードに出くわしました。
(抜粋、これに著作権のようなものがあるかどうかはわかりません。各ベンダーは独自の実装を持つことができるからです)。
funciton "or" (Left, Right: std_logic_vector) is
...
begin
if Left'LENGTH /= Right'LENGTH then
assert FALSE report
"ErrorDifferentLengthVectors" severity failure;
else
...
end if;
end "or";
this over using the
次のような状態-part of the
報告書の利点はどこにありますか? とにかく、アサーションはそれ以上のコンパイルをキャンセルしませんか、それとも次のコードをelseブランチに入れる必要がありますか?
funciton "or" (Left, Right: std_logic_vector) is
...
begin
assert Left'LENGTH = Right'LENGTH report
"ErrorDifferentLengthVectors" severity failure;
...
end "or";