Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > General Computer Discussion > Hardware > help with VHDL code

Reply
Thread Tools

help with VHDL code

 
 
moshele4 moshele4 is offline
Junior Member
Join Date: May 2012
Posts: 1
 
      05-09-2012
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Verilog Code to VHDL Code pplnet VHDL 0 12-09-2009 04:18 PM
VHDL-2002 vs VHDL-93 vs VHDL-87? afd VHDL 1 03-23-2007 09:33 AM
VHDL 2002 vs VHDL 1993 dude VHDL 1 03-23-2006 01:18 PM
multiD-vhdl: Multi Dimensional Arrays (allowing generics on each dimension) for VHDL (including ports) albert.neu@gmail.com VHDL 2 03-21-2006 04:05 PM
what's the difference between VHDL 93 CONCATENATION and VHDL 87 CONCATENATION? walala VHDL 3 09-18-2003 04:17 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57