matrixofdynamism
Advanced Member level 2
In a function the parameter is unconstrained std_logic_vector called slv
Within the function I must assign the slv to a another std_logic_vector variable of length 4. Lets call this slv_temp: std_logic_vector(3 downto 0)
Now I want to make sure that slv is no more than 4 bits. I use assert statement:
assert slv'length <= 4 report "function parameter cannot be more than 4 bit long" severity error;
Later I do this:
if slv'length < 4 then
else
end if;
Within the function I must assign the slv to a another std_logic_vector variable of length 4. Lets call this slv_temp: std_logic_vector(3 downto 0)
Now I want to make sure that slv is no more than 4 bits. I use assert statement:
assert slv'length <= 4 report "function parameter cannot be more than 4 bit long" severity error;
Later I do this:
if slv'length < 4 then
else
end if;