pass an undefined number of datasets

A

Andreas

Guest
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
 
Hi,

Neo wrote:
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.
 
Neo wrote:
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).

determined before it is implemented. You can have the largest possible
number and then use only a subset of them based on requirement.
 
Andreas wrote:

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
 
you can use "generic" to define the reqd number of datasets but it has
to be determined at compile time.
 
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.
 

Welcome to EDABoard.com

Sponsor

Back
Top