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???
 

: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 *.
 

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
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);
 

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
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?
 

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
 

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

Back
Top