pass an undefined number of datasets

A

Andreas

Hello,
is there an easy way to pass an undefined number of datasets to an entity?
My solution is

entity
port(count: in integer;
data : real_vector(0 to 100)
);
end entity;

if one dataset is a real number (could be anything else). 'data' is a
vector(array), which contains all datasets. its length is 100 if I want
to pass 100 sets at most. 'count' is the number of datasets really used
in the current simulation cycle.

Is there perhabs a more effectiv, better way to pass an undefined number
of datasets?

Thanks,

Andreas
 
N

Neo

you can use "generic" to define the reqd number of datasets but it has
to be determined at compile time.
 
A

Andreas

Hi,
you can use "generic" to define the reqd number of datasets but it has
to be determined at compile time.
Soory, I've forgotten to say, that the required number has be dynamic
during simulation and cann't be tetermined at compile time.
 
N

Neo

No its not possible. This is hardware description and should be
determined before it is implemented. You can have the largest possible
number and then use only a subset of them based on requirement.
 
A

Andreas

Neo said:
No its not possible. This is hardware description and should be

Perhabs VHDL was intended as a hardware description language, but I use
it primarily as a language for system simulations (in connection with
the AMS- extension).
 
M

Mike Treseler

Andreas said:
Perhabs VHDL was intended as a hardware description language, but I use
it primarily as a language for system simulations

Then you ought to be using functions
and procedures instead of entities.

-- 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

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top