cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Adventurer
Adventurer
6,882 Views
Registered: ‎11-10-2009

Problem with a package

Jump to solution

I have been trying to check syntax in this design:

 

entity uperlayer is
--type bytearray is array (integer range <>) of std_logic_vector(7 downto 0);
    Port ( reloj_clk_1 : in  STD_LOGIC;
           reloj_ce_1 : in  STD_LOGIC;
           Reset : in  STD_LOGIC;
           Entrada : in  STD_LOGIC_VECTOR (7 downto 0);
           Salida : out  bytearray (0 to 10)                                        <-------Line 36
     );
end uperlayer;

architecture Behavioral of uperlayer is
component registrode8bits is
    Port ( reloj_clk_1 : in  STD_LOGIC;
           reloj_ce_1 : in  STD_LOGIC;
           reset : in  STD_LOGIC;
           EntradaReg8 : in  STD_LOGIC_VECTOR (7 downto 0);
           SalidaReg8 : out  STD_LOGIC_VECTOR (7 downto 0));
end component;

constant numcol: integer range 1 to 100:=10;

type intermediarray is array (0 to numcol) of STD_LOGIC_VECTOR (7 downto 0);

signal intermedia: intermediarray;

begin

registrazoinicial: registrode8bits port map (reloj_clk_1, reloj_ce_1, Reset, Entrada,intermedia(0));
Salida(0)<=intermedia(0);

registro8bits: FOR i IN 1 TO numcol GENERATE
 registrazo: registrode8bits port map (reloj_clk_1, reloj_ce_1, Reset, intermedia(i-1),intermedia(i));
 Salida(i)<=intermedia(i);
END GENERATE;

end Behavioral;

 

 

-----------------------------------------------------------

 

I have created a package file, which was added to the project. In the project files layout it is in the tree, under  the uper layer file (I mean in a level below):

 

library IEEE;
use IEEE.STD_LOGIC_1164.all;

package paquinho is


  type bytearray is array (integer range <>) of std_logic_vector(7 downto 0);

 

end paquinho;

 

 

But when I check syntax I get the following error:

 

ERROR:HDLParsers:3312 - "C:/Archivos de programa/MATLAB/R2008b/work/matrizregistros/uperlayer.vhd" Line 36. Undefined symbol 'bytearray'.
ERROR:HDLParsers:1209 - "C:/Archivos de programa/MATLAB/R2008b/work/matrizregistros/uperlayer.vhd" Line 36. bytearray: Undefined symbol (last report in this block)
ERROR:HDLParsers:3312 - "C:/Archivos de programa/MATLAB/R2008b/work/matrizregistros/uperlayer.vhd" Line 57. Undefined symbol 'Entrada'.
ERROR:HDLParsers:1209 - "C:/Archivos de programa/MATLAB/R2008b/work/matrizregistros/uperlayer.vhd" Line 57. Entrada: Undefined symbol (last report in this block)
ERROR:HDLParsers:3312 - "C:/Archivos de programa/MATLAB/R2008b/work/matrizregistros/uperlayer.vhd" Line 58. Undefined symbol 'Salida'.
ERROR:HDLParsers:1209 - "C:/Archivos de programa/MATLAB/R2008b/work/matrizregistros/uperlayer.vhd" Line 58. Salida: Undefined symbol (last report in this block)

 

That is the same error I get if I just ommit the package file so I suppose I am not integrating the package in the right way...

 

Thank you in advance.

0 Kudos
Reply
1 Solution

Accepted Solutions
Adventurer
Adventurer
8,753 Views
Registered: ‎11-10-2009

Seems to compile fine instantiating this way:

 

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

library work;
use work.paquinho.all;

 

But System Generator does not allow me to create a blackbox with this design... it says I must declare the ports as STD_LOGIC or STD_LOGIC_VECTOR.

 

 

View solution in original post

0 Kudos
Reply
5 Replies
Historian
Historian
6,869 Views
Registered: ‎02-25-2008
Does the source file for the entity uperlayer use the package?
----------------------------Yes, I do this for a living.
0 Kudos
Reply
Adventurer
Adventurer
6,854 Views
Registered: ‎11-10-2009

My library instantiation at uperlayer is:

 

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

library work;
use work.tiposdesenhales.all;

 

Now I get the following error:

 

ERROR:HDLParsers:3014 - "C:/Archivos de programa/MATLAB/R2008b/work/matrizregistros/uperlayer.vhd" Line 26. Library unit tiposdesenhales is not available in library work.

I have the package in the libraries tab in the Project Navigator and it is present at the work folder (I mean C:\Xilinx\11.1\ISE\vhdl\src\work).

0 Kudos
Reply
Adventurer
Adventurer
8,754 Views
Registered: ‎11-10-2009

Seems to compile fine instantiating this way:

 

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

library work;
use work.paquinho.all;

 

But System Generator does not allow me to create a blackbox with this design... it says I must declare the ports as STD_LOGIC or STD_LOGIC_VECTOR.

 

 

View solution in original post

0 Kudos
Reply
Historian
Historian
6,838 Views
Registered: ‎02-25-2008

ricewind wrote:

My library instantiation at uperlayer is:

 

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

library work;
use work.tiposdesenhales.all;

 

Now I get the following error:

 

ERROR:HDLParsers:3014 - "C:/Archivos de programa/MATLAB/R2008b/work/matrizregistros/uperlayer.vhd" Line 26. Library unit tiposdesenhales is not available in library work.

I have the package in the libraries tab in the Project Navigator and it is present at the work folder (I mean C:\Xilinx\11.1\ISE\vhdl\src\work).


There are spaces in the path. Fix that. The tools don't like spaces.

----------------------------Yes, I do this for a living.
0 Kudos
Reply
Historian
Historian
6,837 Views
Registered: ‎02-25-2008

ricewind wrote:

Seems to compile fine instantiating this way:

 

 

But System Generator does not allow me to create a blackbox with this design... it says I must declare the ports as STD_LOGIC or STD_LOGIC_VECTOR.

 

 


That's a good enough reason for me not to use System Generator. Which I don't use, anyway.

----------------------------Yes, I do this for a living.