Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add mode assertions to -93 sources #607

Merged
merged 1 commit into from
Dec 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions vunit/vhdl/data_types/src/integer_vector_ptr_pkg-body-93.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ package body integer_vector_ptr_pkg is
value : val_t := 0
) return ptr_t is begin
reallocate_ids(st.idxs, st.idx);
if mode = internal then
assert eid = -1 report "mode internal: id/=-1 not supported" severity error;
else
assert eid /= -1 report "mode external: id must be natural" severity error;
end if;
case mode is
when internal =>
st.idxs(st.idx) := (
Expand Down
5 changes: 5 additions & 0 deletions vunit/vhdl/data_types/src/string_ptr_pkg-body-93.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ package body string_ptr_pkg is
value : val_t := val_t'low
) return ptr_t is begin
reallocate_ids(st.idxs, st.idx);
if mode = internal then
assert eid = -1 report "mode internal: id/=-1 not supported" severity error;
else
assert eid /= -1 report "mode external: id must be natural" severity error;
end if;
case mode is
when internal =>
st.idxs(st.idx) := (
Expand Down