"Info: Running Quartus II 64-Bit Analysis & Synthesis
Info: Version 13.0.1 Build 232 06/12/2013 Service Pack 1 SJ Web Edition
Info: Processing started: Fri Sep 13 20:08:05 2013
Info: Command: quartus_map --read_settings_files=on --write_settings_files=off filtro_FIR -c filtro_FIR
Info (11104): Parallel Compilation has detected 8 hyper-threaded processors. However, the extra hyper-threaded processors will not be used by default. Parallel Compilation will use 4 of the 4 physical processors detected instead.
Info (12021): Found 2 design units, including 1 entities, in source file filtro_fir.vhd
Info (12022): Found design unit 1: filtro_FIR-filtro_FIR
Info (12023): Found entity 1: filtro_FIR
Info (12021): Found 2 design units, including 1 entities, in source file reg.vhd
Info (12022): Found design unit 1: reg-reg
Info (12023): Found entity 1: reg
Error (10381): VHDL Type Mismatch error at filtro_FIR.vhd(81): indexed name returns a value whose type does not match "SIGNED", the type of the target expression
Error: Quartus II 64-Bit Analysis & Synthesis was unsuccessful. 1 error, 0 warnings
Error: Peak virtual memory: 500 megabytes
Error: Processing ended: Fri Sep 13 20:08:06 2013
Error: Elapsed time: 00:00:01
Error: Total CPU time (on all processors): 00:00:01"
- Code: Select all
--------------- Realizzazione di un filtro FIR ---------------
-- Librerie --
library IEEE;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_signed.all;
-------------------------------------------------------------------------
-- Entità --
entity filtro_FIR is
generic(
num_bit : integer :=3;
num_taps : integer :=4
);
port(
clk : in std_logic;
reset : in std_logic;
data_in : in signed(num_bit-1 downto 0); -- ingresso e uscita del blocco fir
data_out : buffer signed(num_bit-1 downto 0) -- sullo stesso numero di bit
);
-- struttura type --
type T_coeff is array (0 to num_taps-1) of integer;
type T_delay is array (0 to num_taps-1) of signed(num_bit-1 downto 0);
type T_t is array (0 to num_taps-1) of signed(2*num_bit-1 downto 0);
end filtro_FIR;
---------------------------------------------------------------------------
-- Architettura --
architecture filtro_FIR of filtro_FIR is
component reg
port(
reg_clk : in std_logic;
reg_reset : in std_logic;
D : in signed(num_bit-1 downto 0);
Q : out signed(num_bit-1 downto 0)
);
end component;
constant coeff : T_coeff := (12, 3, 1, 5);
signal delay : T_delay(0 to num_taps-1);
signal t : T_t(0 to num_taps-1);
signal f : T_delay(0 to num_taps-1);
begin
delay(0) <= data_in;
ciclo0 : for k in 0 to num_taps-1 generate
Ndelay : reg port map (clk, reset, delay(k),delay(k+1));
end generate;
ciclo1 : for k in 0 to num_taps-1 generate
Nprod_parziale : t(k) <= delay(k) * conv_signed(coeff(k),num_bit);
end generate;
ciclo2 : for i in 0 to num_taps-1 generate
Nprod_fin : f(i) <= t(num_bit-1 downto 0); -----> il problema è qua dovrebbe essere t(k) però a me serve anche ridurre
------ il numero di bit scrivendo num_bit -1 downto. Come posso risolvere tale
------- problema ????
end generate;
data_out <= (others => '0');
ciclo3 : for k in 0 to num_taps-1 generate
Nout : data_out <= data_out + f(k);
end generate;
end filtro_FIR;
---------------------------------------------------------------