The following code synthesizes and simulates correctly as far as I can tell, but XST is still giving the following warning: value(s) does not match array range, simulation mismatch. Is there something I'm missing?
Tool used: Xilinx ISE Project Navigator (synthesizer:XST) FPGA: SPARTAN 3E
module error_example(
input [47:0] data,
input [2:0] sel,
output [5:0] data_out
);
assign data_out = data[sel*6 +: 6];
endmodule
WARNING:Xst:790 - "error_example.v" line 8: Index value(s) does not match array range, simulation mismatch.
Like I said, this works and I've done the math:
sel can have values from 0 to 7,
if sel is 0, then data_out = data[5:0]
...
if sel is 7, then data_out = data[47:42]
Should I do something differently here? Is this a bug in XST?
data_out = data[5:0]whensel = 0then I would have wroteassign data_out = data[6*sel+5 -: 6]. It was much more convenient to use little endian format when I included this as part of a much larger module.[lsb:msb]that does change the behavior of+:.+:means bits to the left, not ascending bits.