Forum Discussion
Altera_Forum
Honored Contributor
11 years agod <= b[a-:3] is correct. See 7.4.6 indexing and slicing of arrays in the 1800-2012 LRM. All Verilog bit vector widths must be determined at compile time. Even though it seems that you could prove that [a:a-2] would have a constant width, that's too much work for a compiler to verify for general expressions.