hello,
i wrote the following code in VHDL and i get a message with this error:
Error (10511): VHDL Qualified Expression error at EKFvhdl.vhd(73): multiF type specified in Qualified Expression must match arr_p type that is implied for expression by context
this is the code:
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use ieee.numeric_std.all;
package multi is
type t1 is array (0 to 1, 0 to 1) of real;
function multiF (a:t1; b:t1; c:t1) return t1;
end multi;
package body multi is
function multiF (a:t1; b:t1; c:t1) return t1 is
variable i,j,k:integer:=0;
variable prod, prod2 : t1:=(others => (others => 0.0));
begin
for k in 0 to 1 loop
for i in 0 to 1 loop
for j in 0 to 1 loop
prod(k,i) := prod(k,i) + a(k,j)*b(j,i);
end loop;
end loop;
end loop;
for k in 0 to 1 loop
for i in 0 to 1 loop
for j in 0 to 1 loop
prod2(k,i) := prod2(k,i) + prod(k,j)*c(j,i);
end loop;
end loop;
end loop;
return prod2;
end multiF;
end multi;
library ieee;
Use ieee.std_logic_1164.all;
Use ieee.math_real.all; use ieee.numeric_std.all;
library work;
use work.multi.all;
Entity EKF is port (
);
end;
Architecture EKF of EKF is
type arr_p is array (0 to 1, 0 to 1) of real;
Signal P, F:arr_p;
Signal count: integer;
Begin
Process
count<=1;
P(0,0)<=0.01;
P(0,1)<=0.0;
P(1,0)<=0.0;
P(1,1)<=0.01;
F(0,0)<=0.0;
F(0,count)<=real(count)*cos(xn(1,count)*real(count ));
F(1,0)<=0.0;
F(1,count)<=1.0;
P<=multiF(F,P,F); --the error is concerned to this line
End Process;
end EKF;
i would be glad if someone could help me solving this error.
thanks.
|