**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!

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community Forums
- :
- Forums
- :
- Hardware Development
- :
- AI Engine, DSP IP and Tools
- :
- Using Embedded Multipliers in Spartan 3AN for fixe...

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

rutali

Visitor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-01-2013 01:56 AM

4,430 Views

Registered:
01-22-2013

I am using the spartan 3AN XC3S50AN-4TQG144 for a design in which I have to implement a digital filter, which would require the following operations

1. Fixed point number A Q12.4 ( 16 bits -12 bits integer and 4 bits fraction) has to be added to B (16 bits integer) using a adder

2. Result of addition ( Fixed point number) has to be multiplied with a scalar K ( 8 bit integer)

Product = K * [A+B]

Is it possible to utilize the embedded multiplier MULT18X18 available with the chosen part for the above mentioned operations.

When I tried using the float IP core or the Multipliers i was unable to find the right settings to define the type operands.

Does the multiplier expect the operands A,B, K to all be of the same type? ( either fixed point or integers)

Thanks

RDM

1 Solution

Accepted Solutions

bwiec

Xilinx Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-04-2013 06:17 AM

4,976 Views

Registered:
08-02-2011

If K is constant, use the constant-coeff multiplier type.

This will allow you to select your input widths.

You are responsible for aligning binary points as necessary.

You could also do something as simple as:

y <= k*x;

in your behavioral code instead of instantiating a core. You'll have to be a bit careful about port widths, but that's really just as simple as sign extending the inputs to the required size before multiplying.

www.xilinx.com

4 Replies

bwiec

Xilinx Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-01-2013 06:59 AM

4,421 Views

Registered:
08-02-2011

Re: Using Embedded Multipliers in Spartan 3AN for fixed point number and integer

Is it possible to utilize the embedded multiplier MULT18X18 available with the chosen part for the above mentioned operations.

Sure.

Does the multiplier expect the operands A,B, K to all be of the same type?

Yes. You select what type you want to use with those radio buttons and that applies to all the ports. If you want to use this core, you have to convert all the inputs to the same precision float format.

It sounds like all your numbers are already setup for fixed point calculations. Are you sure you need to go float for the mult? It will cost you a lot of area to do so. Particularly if 'scalar K' means that it's constant.

www.xilinx.com

rutali

Visitor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-04-2013 01:39 AM

4,402 Views

Registered:
01-22-2013

Re: Using Embedded Multipliers in Spartan 3AN for fixed point number and integer

I aslo tried instantiating the multiplier core, but this core also expects the two operands to be of the same type (precision)

So maybe the decimal point needs to be aligned before adding A and B i.e q12.4 (2's comp 16 bit fixed point number) and B, so that they are of the same type

Scalar K is a constant that needs to be multiplied with the result of addition

So do we need to convert the operands to the same type to be able to use the adder/multiplier cores?

bwiec

Xilinx Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-04-2013 06:17 AM

4,977 Views

Registered:
08-02-2011

If K is constant, use the constant-coeff multiplier type.

This will allow you to select your input widths.

You are responsible for aligning binary points as necessary.

You could also do something as simple as:

y <= k*x;

in your behavioral code instead of instantiating a core. You'll have to be a bit careful about port widths, but that's really just as simple as sign extending the inputs to the required size before multiplying.

www.xilinx.com

rutali

Visitor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-04-2013 08:03 PM

4,388 Views

Registered:
01-22-2013

Re: Using Embedded Multipliers in Spartan 3AN for fixed point number and integer

Thanks a lot for the early resolution!