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].
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.