Arkadaşlar kolay gelsin fgpa bir işaretli çarpma yapmaya çalıştığımda şöyle bir hata alıyorum.
"Expression in type conversion to signed has 6 possible definitions in this scope, for example, SIGNED and UNSIGNED."
Processte hata gösteren işlem
reg1(32 downto 0):=signed("0"&x"5")*hata;
Processte beginden önce tanımladığım sayılar
variable reg1:signed(32 downto 0) ;
variable reg2:signed(32 downto 0) ;
variable reg3:signed(32 downto 0) ;
variable reg4:signed(100 downto 0);
variable hata:signed(32 downto 0) ;
Eklediğim kütüphaneler
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.std_logic_arith.all;
-----------------------------------------------
Hatanın sebebi ne olabilir acaba ?
IEEE.numeric_std.all kütüphanesini kullanıp aşağıdaki gibi yapabilirsin sanırım:
process
signal reg1,reg2: std_logic_vector (32 downto 0);
begin
reg2<=std_logic_vector(signed(reg1)*20);
end
STD_LOGIC_UNSIGNED kütüphanesini eklemek büyük olasılıkla sorunu çözer.
use IEEE.STD_LOGIC_UNSIGNED.ALL;