Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how can i use another multiply algorithm in my code?

Status
Not open for further replies.

fahim1

Member level 4
Joined
Jun 4, 2015
Messages
75
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Activity points
517
hi
i wrote anthor code for multiply algorithm and i want to use it instead of * that is defined in my vhdl code,
how could i do this to be synthesizable???
 

fahim1

Member level 4
Joined
Jun 4, 2015
Messages
75
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Activity points
517
:grin:
it is not completed so i cant put it here :) but assume there is a code for booth multiply algorithm and and i have this line in my main code
Code:
prod := coef(1)*reg(2)+coef(2)*reg(1)+coef(3)*reg(0);
i want to use booth multiply algorithm istead of *.
 

dpaul

Advanced Member level 5
Joined
Jan 16, 2008
Messages
1,687
Helped
316
Reputation
632
Reaction score
331
Trophy points
1,373
Location
Germany
Activity points
12,377
There are two ways in which you can use it!
Easiest way would be to use it as a function or you can also use it as a separate entity and use it in your top-module.
 
  • Like
Reactions: fahim1

    fahim1

    Points: 2
    Helpful Answer Positive Rating

fahim1

Member level 4
Joined
Jun 4, 2015
Messages
75
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Activity points
517
There are two ways in which you can use it!
Easiest way would be to use it as a function or you can also use it as a separate entity and use it in your top-module.
you mean i put it as a function in apackage then add package.and if the name of entity of algorithm is booth
i should write it what instead of * ??
Code:
prod := coef(1)*reg(2)+coef(2)*reg(1)+coef(3)*reg(0);
 

dpaul

Advanced Member level 5
Joined
Jan 16, 2008
Messages
1,687
Helped
316
Reputation
632
Reaction score
331
Trophy points
1,373
Location
Germany
Activity points
12,377
The mulf_fn() function can be the substitute for the "coef(1)*reg(2)" part. The fn. can take 2 inputs and generate/return the product as its output.

So your code can look like-
prod := mult_fn(...) + mult_fn(...) + mult_fn(...);
 
  • Like
Reactions: fahim1

    fahim1

    Points: 2
    Helpful Answer Positive Rating

TrickyDicky

Advanced Member level 5
Joined
Jun 7, 2010
Messages
7,103
Helped
2,079
Reputation
4,177
Reaction score
2,042
Trophy points
1,393
Activity points
39,706
You can do it by a function if you want, but it wont have any pipelining, so the fmax will be very slow. You'll need to do an entity instantiation for that.
Why do you want to use booth over * (which will us the fast build in multipliers) anyway?
 

fahim1

Member level 4
Joined
Jun 4, 2015
Messages
75
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Activity points
517
You can do it by a function if you want, but it wont have any pipelining, so the fmax will be very slow. You'll need to do an entity instantiation for that.
Why do you want to use booth over * (which will us the fast build in multipliers) anyway?

i want to implenet a low power fir filter and modified booth making traditional multipliers lowpower according to decreasing partial products
 

ads-ee

Super Moderator
Staff member
Joined
Sep 10, 2013
Messages
7,932
Helped
1,822
Reputation
3,654
Reaction score
1,806
Trophy points
1,393
Location
USA
Activity points
60,087
i want to implenet a low power fir filter and modified booth making traditional multipliers lowpower according to decreasing partial products

I highly doubt that creating a multiplier in an FPGA LUT fabric will use less power than the hard IP macro for DSP that is in many FPGA families. There's a reason FPGA vendors "waste" silicon area for DSP macros, i.e.: less power, higher performance, and less area.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top