Port types

G

Gietek

Hi,
Do ports always have to be bit, bit_vector, std_logic... etc?
How to implement a port of array type e.g.
Input :in TAB;
type TAB is array(integer) of std_logic_vector;
?
 
G

Gietek

Gietek said:
Hi,
Do ports always have to be bit, bit_vector, std_logic... etc?
How to implement a port of array type e.g.
Input :in TAB;
type TAB is array(integer) of std_logic_vector;
?

What if I create package?:

package array_std is
type std_logic_array is array(natural range <>, natural range <>)
of std_logic;
end array_std;

Will it produce synthesible logic?
 
M

Mike Treseler

No. My favorite top level types
are std_ulogic, std_logic_vector and unsigned.
What if I create package?:

package array_std is
type std_logic_array is array(natural range <>, natural range <>) of
std_logic;
end array_std;

Will it produce synthesible logic?

All the vector lengths have to
be determined and in scope at compile time.
I prefer to use generic natural constants for these.
Consider saving the complex data structures
for process variables and architecture signals
that key off of these generic port lengths.

-- Mike Treseler
 

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

Similar Threads

Array VHDL 3
Illegal sequential statement (VHDL) 0
pls help me ; vhdl; 0
Array of Modulation BPSK 0
Can anyone please help me in this code 2
VHDL Subtraction two’s complement 0
std types 2
code question 2

Members online

Forum statistics

Threads
474,159
Messages
2,570,880
Members
47,417
Latest member
DarrenGaun

Latest Threads

Top