UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie toni28
Newbie
810 Views
Registered: ‎06-02-2018

Multiplier with DSP48

Hello everyone. First of all thank you for your attention. I have a problem with the DSP48 in the chip xc7a100tcsg324-1 (active) of the ARTIX-7 family, that is, I would like to make three multiplications, more precisely, a multiplication between STD_LOGIC_VECTOR (7 downto 0) and a constant. The problem arises in that the constants are three, each one of which must be multiplied by one STD_LOGIC_VECTOR (7 downto 0), but I noticed reading the datasheet of the DSP that it is not possible to do it with a single DSP48. HELP? 

 

0 Kudos
2 Replies
Highlighted
Mentor jmcclusk
Mentor
786 Views
Registered: ‎02-24-2014

Re: Multiplier with DSP48

Well, first of all, you haven't said how big your constants are..   Vivado is capable of implementing a signal X constant multiplication either using the DSP48 or using lookup tables and adders.   

 

Having said that,  to implement a multiplier in VHDL you should be using the numeric_std package and defining your signals as "signed" or "unsigned" before multiplying them..    And remember, you can only multiply "signed" X "signed"  or   "unsigned" X "unsigned", but NOT "signed" X "unsigned".

 

Just write a little code and you'll see that Vivado will most likely generate the DSP48's as expected.  If not, you can use attributes to force the usage.

 

Don't forget to close a thread when possible by accepting a post as a solution.
0 Kudos
Newbie toni28
Newbie
726 Views
Registered: ‎06-02-2018

Re: Multiplier with DSP48

Oooops i forgot the size of the costants,there are three constants, one from 7 bits, one from 8 and one from 5, which are multiplied by the three 8-bit vectors I was talking about. Basically it is a conversion from RGB to gray. For the combinatorial part I used four DSPs, ie three for the multiplications and one to add the three products and then obtain the gray pixel.

I work only with unsigned values,I already know how the LUTs work in broad terms and for this reason I prefer to use the DSPs, but use four DSP for only one pixel color conversion i think is bad idea. 

0 Kudos