Altera_Forum
Honored Contributor
14 years agoAvoid Error 10454 - Integer in RANGE
Hello all together,
I am looking for a solution to avoid the Error 10454. I know, that this RANGE is not VHDL-conform.FUNCTION summe(
zahl1 : STD_LOGIC_VECTOR;
zahl2 : STD_LOGIC_VECTOR;
index : NATURAL )
RETURN STD_LOGIC_VECTOR IS
VARIABLE v_summe : STD_LOGIC_VECTOR(11 downto 0);
VARIABLE v_tmp_summe : STD_LOGIC_VECTOR(11 downto 0);
BEGIN
v_tmp_summe := (OTHERS => '0');
FOR i IN 0 TO 2 LOOP
IF index < 8 THEN
v_tmp_summe(zahl1'HIGH+index+i downto index+i) := zahl1;
v_summe := v_summe + v_tmp_summe;
ELSE
EXIT;
END IF;
END LOOP;
RETURN v_summe;
END; So I just want to add several times in one clock cycle. But I have no idea for another solution... Modelsim have no problem with this code and the simulation runs also fine... Thanks a lot!