Matrix composed by two matrix

L

lvcargnini

Hi,
I have a matrix of (0 to 53, 0 to 67) and i create other two matrix
one of x(0 to 53, 0 to 53) and another y(0 to 53, 0 to 5) how could i
map this two matrix on bigger matrix ?
the easy way, correct way, the combinatorial way.
To do this outside an process statement or even inside a process.
 
J

Jonathan Bromley

I have a matrix of (0 to 53, 0 to 67) and i create other two matrix
one of x(0 to 53, 0 to 53) and another y(0 to 53, 0 to 5) how could i
map this two matrix on bigger matrix ?
the easy way, correct way, the combinatorial way.
To do this outside an process statement or even inside a process.

Write a conversion function that takes the two smaller matrices
and returns a value of the large matrix type. Use FOR loops
inside this function to do the copying.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
(e-mail address removed)
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
L

lvcargnini

Hi,
all matrix are of type std_logic. So the manner that you are saying me
to do is using forr loops inisde a process or a function, correct ?
but if a create a function, I don't need to call the function inside a
process block ?
 
J

Jonathan Bromley

all matrix are of type std_logic. So the manner that you are saying me
to do is using forr loops inisde a process or a function, correct ?
but if a create a function, I don't need to call the function inside a
process block ?

Yes; but why is that an issue? EVERY piece of procedural code in
VHDL runs inside a process, although sometimes the process is
disguised (for example, a concurrent signal assignment is in
fact a process). So you could easily write a concurrent
signal assignment that calls your function:

big_matrix <= combine_function (small_matrix, tiny_matrix);

That's why functions are such a neat solution for this sort of
thing - you can use them all over the place.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
(e-mail address removed)
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 

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,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top