lablasa
Newbie level 3
HI!
I'm working with 2 libraries (proj_A and proj_B, each library has its own package (pkg_A and pkg_B) since each library should be synthetisizable as a "standalone library".
These packages are similar (both declare array types:
type a_2bit is array (natural range <>) of std_logic_vector(1 downto 0);
type a_8bit is array (natural range <>) of std_logic_vector(7 downto 0);
type a_32bit is array (natural range <>) of std_logic_vector(31 downto 0);
and so on...) and I need both.
When I instantiate proj_A in proj_B, I declare pkg_B only:
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_arith.ALL;
USE ieee.std_logic_unsigned.ALL;
LIBRARY proj_B;
USE proj_B.pkg_B.ALL;
LIBRARY proj_A;
entity ent_proj_B is
....
end ent_proj_B;
architecture struct of ent_proj_B is
...
component ent_proj_A
port....
end component;
.....
end struct;
The ports of proj_A are arrays, declared both in pkg_A and pkg_B but modelsim reports
Failure: (vsim-3807) Types do not match between component and entity for port "xxx"
I'm trying to understand if it's just a configuration problem, something concernig with the tools I'm using or, simply, I can't use array types as ports in different libraries...
Thanks,
lablasa.
P.S.: I've also tried to declare the pkg (used in both proj_A and proj_B) only in a third library called "work" but the tool "translates" it into the library where the package is being used...that is, in proj_A "work.pkg" will be seen as "proj_A.pkg" and "proj_B.pkg" in proj_B...
I'm working with 2 libraries (proj_A and proj_B, each library has its own package (pkg_A and pkg_B) since each library should be synthetisizable as a "standalone library".
These packages are similar (both declare array types:
type a_2bit is array (natural range <>) of std_logic_vector(1 downto 0);
type a_8bit is array (natural range <>) of std_logic_vector(7 downto 0);
type a_32bit is array (natural range <>) of std_logic_vector(31 downto 0);
and so on...) and I need both.
When I instantiate proj_A in proj_B, I declare pkg_B only:
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_arith.ALL;
USE ieee.std_logic_unsigned.ALL;
LIBRARY proj_B;
USE proj_B.pkg_B.ALL;
LIBRARY proj_A;
entity ent_proj_B is
....
end ent_proj_B;
architecture struct of ent_proj_B is
...
component ent_proj_A
port....
end component;
.....
end struct;
The ports of proj_A are arrays, declared both in pkg_A and pkg_B but modelsim reports
Failure: (vsim-3807) Types do not match between component and entity for port "xxx"
I'm trying to understand if it's just a configuration problem, something concernig with the tools I'm using or, simply, I can't use array types as ports in different libraries...
Thanks,
lablasa.
P.S.: I've also tried to declare the pkg (used in both proj_A and proj_B) only in a third library called "work" but the tool "translates" it into the library where the package is being used...that is, in proj_A "work.pkg" will be seen as "proj_A.pkg" and "proj_B.pkg" in proj_B...