Forum Discussion
Altera_Forum
Honored Contributor
10 years agoError 10251 - cannot fall outside the declared range
Hello, i have got a little problem with array of registers. This is error message: --- Quote Start --- Error (10251): Verilog HDL error at File.v(160): index 5 cannot fall outsid...
Altera_Forum
Honored Contributor
10 years agomodulator is declared as an array of four six bit (ie, [5:0]) values, indexed as 0, 1, 2, 3 (ie, [3:0]).
Your default parameter value is asking for index 4'b0101 which is 5. 5 is greater than 3. QED. So either change the default value to be in range 0..3, or in the module instantiation override the default parameter value. OR if you really mean for the array index to be a four bit value then it should be declared as [15:0] instead:wire Modulator ; since array selects are index values MIN to MAX (or MAX to MIN) and not address field widths.