# multiplication prob

Discussion in 'VHDL' started by Nisheeth, Mar 31, 2005.

1. ### NisheethGuest

hello
my project demands to do
(84 bit no * 42 bit no)
42 BIT NO * 42 BIT no)
comparing 126 bit nos..
ip core supports maximum 64 bit no * 64 bit no.
i dont understand how to go about it....any library that
can help me out ?

nisheeth

Nisheeth, Mar 31, 2005

2. ### Jonathan BromleyGuest

On 31 Mar 2005 06:01:41 -0800, (Nisheeth) wrote:

> my project demands to do
> (84 bit no * 42 bit no)
> 42 BIT NO * 42 BIT no)
> comparing 126 bit nos..
> i dont understand how to go about it....

Imagine a constant F = 2^42. Then your 84-bit number
can be represented as (F*A)+B, where A is the upper 42
bits and B is the lower 42 bits. If the other 42-bit
number is C, then you want

result = ((F*A)+B) * C
= F*A*C + B*C

In other words:
- get B*C, an 84-bit result
- get A*C, an 84-bit result
- add the upper 42 bits of B*C to A*C to get the top 84
bits of result
- use the lower 42 bits of B*C as the bottom 42 bits of
result

It's just long multiplication, same as we learnt at school.

> ip core supports maximum 64 bit no * 64 bit no.

So - don't use the IP core. Hell, it's only a multiplier.
directly to it. The tool should infer a suitable collection
of multipliers and adders for you. For extra credit,
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL, Verilog, SystemC, Perl, Tcl/Tk, Verification, Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail:
Fax: +44 (0)1425 471573 Web: http://www.doulos.com

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

Jonathan Bromley, Mar 31, 2005