- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 outside the declared range [3:0] for dimension 0 of array "Modulator" --- Quote End --- This is simplified module with all lines corelated with array "Modulator":
module File# (parameter LFO1B=4'b0101)(input Modulator_LFO1B)
wire Modulator ;
assign Modulator=Modulator_LFO1B;
endmodule
Do you know what is going on? Kind Regards L.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
modulator 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.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page