C
Candida Ferreira
Guest
Hi,
I'm trying to write a simple grammar for VHDL and I'm stuck on how to
declare an array of real numbers in the port declaration. Why is it that the
straightforward representation [2] similar to the one used using bit_vector
[1] doesn't work? How should it be declared? Is there an elegant way around
it besides listing all the elements in the port declaration, for instance,
d0, d1, d2, d3?
[1]:
entity myModel is
port (d: in bit_vector (0 to 3);
result: out bit);
end myModel;
[2]:
entity myModel is
port (d: in array (0 to 3) of real;
result: out real);
end myModel;
Many thanks.
Candida
---
Candida Ferreira, Ph.D.
Chief Scientist, Gepsoft
http://www.gene-expression-programming.com/author.asp
GEP: Mathematical Modeling by an Artificial Intelligence
(Springer Verlag edition 2006)
http://www.gene-expression-programming.com/Books/index.asp
Online Version:
http://www.gene-expression-programming.com/GepBook/Introduction.htm
Modeling Software:
http://www.gepsoft.com/
I'm trying to write a simple grammar for VHDL and I'm stuck on how to
declare an array of real numbers in the port declaration. Why is it that the
straightforward representation [2] similar to the one used using bit_vector
[1] doesn't work? How should it be declared? Is there an elegant way around
it besides listing all the elements in the port declaration, for instance,
d0, d1, d2, d3?
[1]:
entity myModel is
port (d: in bit_vector (0 to 3);
result: out bit);
end myModel;
[2]:
entity myModel is
port (d: in array (0 to 3) of real;
result: out real);
end myModel;
Many thanks.
Candida
---
Candida Ferreira, Ph.D.
Chief Scientist, Gepsoft
http://www.gene-expression-programming.com/author.asp
GEP: Mathematical Modeling by an Artificial Intelligence
(Springer Verlag edition 2006)
http://www.gene-expression-programming.com/Books/index.asp
Online Version:
http://www.gene-expression-programming.com/GepBook/Introduction.htm
Modeling Software:
http://www.gepsoft.com/