Arrays in Port

Joined
Jun 9, 2006
Messages
1
Reaction score
0
Hi,
I want to include an unconstrained array in my port declaration, instead of declaring n time std_logic_vector (that would be much easier to use!)

entity Window is
generic (n:integer:=3;--nombre de cartes
p:integer:=3 --Position de la carte
);
Port (
CLK, HS, VS: in std_logic;
WDO: out std_logic;
LenghH: in array16_type;
LenghV: in array16_type;
StartH: in array16_type;
StartV: in array16_type;
TabZorder: in array5_type;
Poscarte: in std_logic_vector(4 downto 0)
);
end Window;

architecture Behav of Window is
type array16_type is Array (0 to n-1) of std_logic_vector(15 downto 0);
type array5_type is Array (0 to n-1) of std_logic_vector(4 downto 0);
type BusWD_type is Array (0 to n-1) of std_logic;
type orout_type is Array (0 to n) of std_logic;

...

I read on a forum that it could work like this, but it generates errors while compiling (using Modelsim) :
"** Error: D:/Jerome Kusseling/Invg23/VHDL/Window/Window.vhd(27): Unknown identifier 'array16_type'.
** Error: D:/Jerome Kusseling/Invg23/VHDL/Window/Window.vhd(28): Unknown identifier 'array16_type'.
** Error: D:/Jerome Kusseling/Invg23/VHDL/Window/Window.vhd(29): Unknown identifier 'array16_type'.
** Error: D:/Jerome Kusseling/Invg23/VHDL/Window/Window.vhd(30): Unknown identifier 'array16_type'.
** Error: D:/Jerome Kusseling/Invg23/VHDL/Window/Window.vhd(31): Unknown identifier 'array5_type'.

any help ?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,170
Messages
2,570,921
Members
47,464
Latest member
Bobbylenly

Latest Threads

Top