VHDL: Non-locally static choice warning
Just in case the comments weren't clear: the warning means that you cannot use more than one choice in an array aggregate if you're using a non-static value (a generic or something derived from a generic) to define the ranges or positions. I don't know, however, why the restriction exists.

There is a simple workaround to defining such constants.
Just break the constant into smaller pieces that can be defined with an aggregate with only one choice and then concatenate them.
Useful for simple cases like this:

constant HALF_RANGE: unsigned(RANGE_WIDTH - 1 downto 0) := '1'&amp;(RANGE_WIDTH - 2 downto 0 =&gt; '0');


I'm not sure if a better solution exists since whatever you derive from a generic becomes non-static, but I'm not an expert.