title: pass a dimentional array(2D) to a function VHDL
body: <p>I declared a matrix and a signal in my TOP file like this: </p>
  
  <pre><code>type scanImage is array (0 to 7,0 to 7) of std_logic_vector(2 downto 0);
  signal image_matrix : scanImage;
  </code></pre>
  
  <hr>
  
  <p>Now, I want to send the above signal to a function which calculates number of cells in the matrix which are not "000".</p>
  
  <p>My package looks like this: </p>
  
  <hr>
  
  <pre><code>library IEEE;
  use IEEE.std_logic_1164.all;
   use IEEE.std_logic_unsigned.all;
   use IEEE.std_logic_arith.all;
  use IEEE.NUMERIC_STD.ALL;
   USE IEEE.NUMERIC_BIT.ALL;
  
  
  PACKAGE my_pack IS
  
  type double_array is array (0 to 7,0 to 7) of std_logic_vector(2 downto 0);
  
  --------------------square calculation declaration--------------------------
   function square_calculation(matrix : double_array) return integer;
  
  
   ---------------------------------------------------------------------
   function square_calculation(matrix : double_array) return integer IS
   variable tmp: integer range 0 to 64;
   begin
    tmp:=0;
    for i in 0 to 7 loop
  
              for j in 0 to 7 loop
                  if matrix(i,j)/="000" then
                      tmp:=tmp+1;
                  end if;
              end loop;
  
  end loop;
  return tmp;
  
  end function square_calculation;
  
  
   END my_pack;
  </code></pre>
  
  <hr>
  
  <p>After compilizing I get this error: 
  Error (10476): VHDL error at vision_ctrl.vhd(112): type of identifier "image_matrix" does not agree with its usage as "double_array" type</p>
  
  <p>Thanks for helping me.</p>