Forum Discussion
Altera_Forum
Honored Contributor
12 years agoI have the same problem.. Error (10327): can't determine definition of operator ""+"" -- found 0 possible definitions
I write this program: LIBRARY ieee; USE ieee.std_logic_1164.ALL; use ieee.numeric_std.all; use ieee.std_logic_signed.all; ENTITY filter_iir IS GENERIC ( L: INTEGER :=3; W1: INTEGER :=16; W2: INTEGER :=32; W3: INTEGER :=33; W4: INTEGER :=14 ); PORT ( --x_in: IN signed (15 downto 0);; --INPUT --y_out: OUT BITS14; --RESULT x_in : in BITS16; y_out : out signed (31 downto 0); clk : IN STD_LOGIC); END filter_iir; ARCHITECTURE myiir of FILTER_IIR IS SIGNAL x : ARRAY16TO3; signal x_num : ARRAY32TO3; constant b0 : signed(W1-1 downto 0) :=x"0119"; constant b1 : signed(W1-1 downto 0) :=x"0232"; constant b2 : signed(W1-1 downto 0) :=x"0119"; constant a1 : signed(W1-1 downto 0) :=x"FFB5"; constant a2 : signed(W1-1 downto 0) :=x"00B0"; shared variable acc : signed (W2-1 downto 0):= (others => '0'); shared variable y : signed (W2-1 downto 0):= (others => '0'); -- 28 bit shared variable y_den : signed (W2-1 downto 0):= (others => '0'); -- 27 bit (11+16) BEGIN sop: PROCESS BEGIN wait until (clk='1') ; x(0)<=x_in; x_num(0)<=b0*x(0); -- b0x(k) debugx<=x_num(0); x_num(1)<=b1*x(1); -- b1x(k-1) debugx1<=x_num(1); x_num(2)<=b2*x(2); -- b2x(k-2) debugx2<=x_num(2); for i in 0 to L-2 loop x(i+1)<=x(i); end loop; for j in 0 to L-3 loop y(j+1):=y(j); end loop; y(0):=(x_num(0)+x_num(1)+x_num(2)+y_den(0)+y_den(1)); acc:=y(0); y_den(0):=a1*y(0)(15 downto 0); -- a1y(k-1) y_den(1):=a2*y(1)(15 downto 0); -- a2y(k-2) end process; y_out <= y(0)(31 downto 0); end myiir; when it sum these parts Y(0):=(x_num(0)+x_num(1)+x_num(2)+y_den(0)+y_den(1)) the compiler give me an error.. why? i use ieee.std_numeric.all library and in this library there is the definition of "+"....?!?!?:confused::confused::confused: Boh.. i search the error but i don't understad.. so initially i think that this function want the adder at the same lengths.. but i read the source code.. and seem that it isn't a problem... x_num is array of signed with length 16 and y_den is array of signed with length 32.. and y(0) is 32bit signed register.. so i don't know where is the problem? can somebody help me..?