Matrix multiplication

N

nicky84

Guest
i would be grateful if anyone would be able to help me out with verilog
code for matrix multiplication, ideally multiplying two n x n matrices.
thanx
 
"nicky84" <nicolaangel@hotmail.com> wrote in message
news:1140007005.569588.206650@g47g2000cwa.googlegroups.com...
i would be grateful if anyone would be able to help me out with verilog
code for matrix multiplication, ideally multiplying two n x n matrices.
thanx
The act of matrix multiplication is supremely simple. The system-level
coordination is where the meat of the code exists yet you give no indication
of your system needs.

Are you in an FPGA or ASIC? Are you running at 10 MHz or 300? Do you have
your source and destination matrix stored in memory? On-chip or Off-chip?
Do you need a multiply every clock cycle or do you want to start the process
and pick up the results later?

There's no sense in supplying code for a matrix multiply without the
additional information. You do at least know how a matrix multiply is
performed by hand, yes? If not, you need to understand that critical
information first.
 
multiplication perform from memory and after multiplication it stored
in RAM .
it is on-chip . there is no constraints on multiply on single clock
cycle or not.
 
"eda_cadence" <aravindhere@gmail.com> wrote in message
news:1140055495.640264.204030@f14g2000cwb.googlegroups.com...
multiplication perform from memory and after multiplication it stored
in RAM .
it is on-chip . there is no constraints on multiply on single clock
cycle or not.
So.... Do you know verilog? Do you know how to perform matrix
multiplication manually?

If you have 3 counters from 0 to n-1, you can do a multiply-accumulate on n
values from one row of one matrix and one colomn of the other matrix to
store one row/column location in the destination matrix. The total number
of clocks for the result is approximately n^3 with only one multiplier used.
If you want to throw more multipliers at it, you could parallelize the
multiply-accumulate a bit.

So, if doing a matrix multiply by hand is simple enough, why do you need the
verilog code supplied to you to do it?
 
"nicky84" <nicolaangel@hotmail.com> wrote in message
news:1140007005.569588.206650@g47g2000cwa.googlegroups.com...
i would be grateful if anyone would be able to help me out with verilog
code for matrix multiplication, ideally multiplying two n x n matrices.
thanx
Just to help confuse you, you can do matrix multiplication with fewer
operations than the straight-forward approach:

http://mathworld.wolfram.com/StrassenFormulas.html
 
any one can give sample code in verilog with memory(ram) ,counter of
matrix multiplication.
John H please let me know
 
eda_cadence wrote:

any one can give sample code in verilog with memory(ram) ,counter of
matrix multiplication.
John H please let me know
I ask again: do you have a clue how to write Verilog? If someone takes
the time to write you a matrix multiplier that might not meet your
needs, how the heck ar you going to alter it to make it work?
 
Basically all i need is a programmed matrix multiplier that works in a
simulation environment disregarding if can be synthesised to a chip. i
know how matrix multiplication is performed manually but i lack
experiance in programming in verilog. thanx
 
nicky84 wrote:
Basically all i need is a programmed matrix multiplier that works in a
simulation environment disregarding if can be synthesised to a chip. i
know how matrix multiplication is performed manually but i lack
experiance in programming in verilog. thanx
How do you expect to get the values into the simulation environment in
the first place?

How do you intend to kick off the multiplication once those values are
there?

Is multiplication of one matrix all you need in the simulation? Nothing
else done at all? If so, why the heck does it need to be Verilog code?
There are significantly better ways to automate matrix multiplication,
even with spreadsheets.
 
John_H wrote:

There are significantly better ways to automate matrix multiplication,
even with spreadsheets.
The last time I had to multiply matrices
was for a homework problem.

-- Mike Treseler
 
we can do matrix multiplication for simulation level with $readmemb
command
but replacing that with ram is very difficult.
Mike can u give ur home work.
let me know what we can do it
 
eda_cadence wrote:

Mike can u give ur home work.
let me know what we can do it
The attic is so cold in the winter...
Let's just google it instead.
http://www.google.com/search?q=matrix+multiplication+examples+verilog

-- Mike Treseler
 

Welcome to EDABoard.com

Sponsor

Back
Top