Taras_96 wrote:
> Is there
> someway of declaring a unsigned variable's length in the body of a
> function?
reference the length of the actual
argument right in the variable declaration
-- ...
)
return unsigned is
variable reg_v : unsigned(vec_arg'range);
begin
-- ...
> So far I haven't had any success because you need to declare
> the variable and its length before the body of the function, and you
> can't declare an unconstrained variable.
No, but you can use an unconstrained parameter.
-- Mike Treseler
|