Knowledge Base Article

Verilog HDL error at <location>: index <number> cannot fall outside the declared range [<number>:<number>] for vector "<name>"

Description

Due to a problem in the Quartus® II software version 13.0 and earlier, LPM_DECODE megafunctions generated with the MegaWizard™ Plug-In Manager may be incorrect and generate the above error during synthesis. For example, an LPM_DECODE megafunction with an 8-bit input width and configured to decode the values 122, 123, 124, and 125, the signal sub_wire0 is incorrectly declared as [7:0].

Resolution

To fix this problem, manually change the signal declaration to:

wire [255:0] sub_wire0;

This problem is fixed beginning with the Quartus II software version 13.0 SP1.

Updated 2 months ago
Version 2.0
No CommentsBe the first to comment