Skip to content
Snippets Groups Projects
Commit f08b8433 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Add assert to check nof octets in data of unpack_data()

parent 12ef9569
No related branches found
No related tags found
1 merge request!348Use use_bdo_transpose = true in c_bf revision. Test use_bdo_transpose = false...
Pipeline #56305 passed
...@@ -829,6 +829,9 @@ package body common_pkg is ...@@ -829,6 +829,9 @@ package body common_pkg is
variable v_data : std_logic_vector(data'length - 1 downto 0) := data; variable v_data : std_logic_vector(data'length - 1 downto 0) := data;
variable v_a : t_slv_8_arr(c_nof_octets - 1 downto 0); variable v_a : t_slv_8_arr(c_nof_octets - 1 downto 0);
begin begin
assert data'length = c_nof_octets * c_octet_w
report "common_pkg: unpack_data must be integer number of octest"
severity FAILURE;
for I in v_a'range loop for I in v_a'range loop
v_a(I) := v_data((I + 1) * c_octet_w - 1 downto I * c_octet_w); v_a(I) := v_data((I + 1) * c_octet_w - 1 downto I * c_octet_w);
end loop; end loop;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment