when f9 =>
if melcol < 128 and framcounter < 2560 then
temp <= std_logic_vector(signed(framout)*to_signed(melf(melrow,melcol),8));
firstmelout <= firstmelout + (to_integer(unsigned(temp)))/1000;
melcol <= melcol+1;
framcounter <= framcounter+1;
fstate <= f9;
elsif melcol = 128 and melrow < 13 and framcounter < 2560 then
-----MEMORY NEEDED
framcounter <= framcounter -128;
melrow <= melrow+1; --melrow filter number
melcol <= 0;
secondmelout <= firstmelout;
fstate <= f10;
elsif melcol = 128 and melrow = 13 and framcounter < 2560 then
---------MEMORY NEEDED
framcounter <= framcounter +128;
melrow <= 0;
melcol <= 0;
secondmelout <= firstmelout;
fstate <= f10;
elsif framcounter = 2560 then
flagmel <= '1';
fstate <= f12;
else fstate <= f12;
end if;
when f10 =>
varmel <= real(secondmelout);
--varmel := LOG10(firstmelout);
--varlogresult := 100*varlogresult;
wea3(0) <= '1';
--logresult <= intlogresult;
fstate <= f11;
我在将非常数整数转换为实数时遇到问题。我想取 firstmelout 的 log10,但需要真正的类型。因此,我尝试使用“real()”将其转换为真实,但 Vivado 返回此错误消息;不支持非常量实值表达式
我尝试了很多东西,但我无法解决它,我正在等待你的帮助,非常感谢。