yuanqi
Junior Member level 2
Hi guy, I met an error when I do the synthesis.
Here is the code:
temp2:=temp3(temp3'LOW+to_integer(Shift)+3 DOWNTO temp3'LOW+to_integer(Shift));
temp3 is 8-bits wide, and temp2 4-bits wide. I want temp2 to be a window of temp3, and the signal Shift control the position of that window. shift holds 2-bits only, which just range from 0 to 3. so the range should be fine. But the error says:
Slice out of range.
Slice [-2147483648:-2147483648] is not within range [7:0].
Do you have any ideas about it? Thanks in advance.
Here is the code:
temp2:=temp3(temp3'LOW+to_integer(Shift)+3 DOWNTO temp3'LOW+to_integer(Shift));
temp3 is 8-bits wide, and temp2 4-bits wide. I want temp2 to be a window of temp3, and the signal Shift control the position of that window. shift holds 2-bits only, which just range from 0 to 3. so the range should be fine. But the error says:
Slice out of range.
Slice [-2147483648:-2147483648] is not within range [7:0].
Do you have any ideas about it? Thanks in advance.