help with VHDL code

Discussion in 'Hardware' started by moshele4, May 9, 2012.

  1. moshele4

    moshele4

    Joined:
    May 9, 2012
    Messages:
    1
    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.
     
    moshele4, May 9, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shakeelsultan

    VHDL code of odd parity checker

    shakeelsultan, Oct 27, 2006, in forum: Hardware
    Replies:
    0
    Views:
    2,181
    shakeelsultan
    Oct 27, 2006
  2. caylakprogramci

    Problem in VHDL code.

    caylakprogramci, Apr 18, 2007, in forum: Hardware
    Replies:
    2
    Views:
    1,509
    scottcarl
    May 7, 2007
  3. amirster

    vhdl code

    amirster, May 10, 2007, in forum: Hardware
    Replies:
    0
    Views:
    1,390
    amirster
    May 10, 2007
  4. becool_nikks
    Replies:
    0
    Views:
    2,021
    becool_nikks
    Mar 6, 2009
  5. Daniela
    Replies:
    2
    Views:
    1,521
    Daniela
    Aug 29, 2011
Loading...

Share This Page