Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Matrix composed by two matrix

 
Thread Tools Search this Thread
Old 07-04-2006, 05:41 PM   #1
Default Matrix composed by two matrix


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.



lvcargnini
  Reply With Quote
Old 07-04-2006, 06:13 PM   #2
Jonathan Bromley
 
Posts: n/a
Default Re: Matrix composed by two matrix

On 4 Jul 2006 09:41:07 -0700, "lvcargnini"
<> wrote:

>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

http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
  Reply With Quote
Old 07-04-2006, 08:02 PM   #3
lvcargnini
 
Posts: n/a
Default Re: Matrix composed by two matrix

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 ?
Jonathan Bromley wrote:
> On 4 Jul 2006 09:41:07 -0700, "lvcargnini"
> <> wrote:
>
> >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
>
> http://www.MYCOMPANY.com
>
> The contents of this message may contain personal views which
> are not the views of Doulos Ltd., unless specifically stated.


  Reply With Quote
Old 07-05-2006, 08:21 AM   #4
Jonathan Bromley
 
Posts: n/a
Default Re: Matrix composed by two matrix

>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

http://www.MYCOMPANY.com

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump