Picproje Elektronik Sitesi

DİJİTAL & ANALOG ELEKTRONİK => Pld, Spld, Pal, Gal, Cpld, Fpga => Konuyu başlatan: AsHeS - 12 Mart 2013, 02:24:55

Başlık: FPGA'de Çarpma Problemi
Gönderen: AsHeS - 12 Mart 2013, 02:24:55
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 ?

Başlık: Ynt: FPGA'de Çarpma Problemi
Gönderen: mecharon - 12 Mart 2013, 08:53:19
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
Başlık: Ynt: FPGA'de Çarpma Problemi
Gönderen: pic365 - 14 Mart 2013, 15:20:00
STD_LOGIC_UNSIGNED kütüphanesini eklemek büyük olasılıkla sorunu çözer.

use IEEE.STD_LOGIC_UNSIGNED.ALL;