Vivado Synthesis displays errors similar to the following when it is not able to resolve non-constant (dynamic) range expression.
Vivado Synthesis does not always support variables on both bounds of a range.
Only dynamic ranges related to static values and a few non-complicated dynamic ranges are presently addressed in the tool to avoid large logic constructs.
Here are a few examples of what is supported:
These constructs are not supported:
This construct is planned to be supported in 2016.x:
In general, for assignments to dynamic ranges, the tool will try to figure out if the ranges come out to the same size. In general, if you use the same indexes for both sides, or have a constant for one of the indexes on both sides, the tool will be able to figure out the sizing and synthesize the design.
However, if the indexing is very complicated, the tool might not be able to figure out that the sizes are the same. We recommend against trying to make complicated indexing structures.
Overall, if you have a dynamic range expression coding style that caused the error mentioned above, please cross-check the feasibility of avoiding these complex dynamic ranges and replacing them with static values.