**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
- :
- Software Development and Acceleration
- :
- HLS
- :
- Re: Fixed Point Matrix Inversion by using XAPP1317

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

ismail1293

Visitor

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

10-10-2019 12:56 AM

529 Views

Registered:
10-10-2019

Fixed Point Matrix Inversion by using XAPP1317

Hi all,

I tried to convert Scalable Floating-Point Matrix Inversion to Fixed Point Matrix Inversion Design by Using Vivado high-Level Synthesis. I tried to change the XAPP1317 Xilinx code. I changed all float datas with fixed point data type. I used ap_fixed library ( ap_fixed<16,3> Word length = 16 , fraction = 13). But, it did'n work. It gives error through C code simulation steps. By the way, I generated test vectors in matlab by using fi() function in matlab. What can be my possible mistakes ? Do you have any suggestions ?

7 Replies

archangel-lightworks

Voyager

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

10-10-2019 01:23 AM

512 Views

Registered:
07-23-2019

Re: Fixed Point Matrix Inversion by using XAPP1317

ismail1293

Visitor

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

10-10-2019 01:41 AM

503 Views

Registered:
10-10-2019

Re: Fixed Point Matrix Inversion by using XAPP1317

You can find the code here. It is a bit long code doctor . I just changed the typedef float with typedef ap_fixed<16,3>. My question is that when I changed the data type to fixed point, can I directly multiply or add two different fixed point without rounding or normalizing ?

For example ;

3.45 + 3 = 6.45 but it should be equal to 3.99 according to ap_fixed<16,3>.

Can I do that directly adding two different fixed point Mr. doctor ?

archangel-lightworks

Voyager

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

10-10-2019 01:51 AM

489 Views

Registered:
07-23-2019

Re: Fixed Point Matrix Inversion by using XAPP1317

Maths are maths. There is no floats, doubles or fixed point there. These are an invention of **engineers** who work with computing machines. All these types are **representations** of numbers, with their limitations (precision, range, etc.). Operations, too, have limitations inherited by the types they operate on.

So, in short, you **cannot** simply change the types and expect everything else does the job. Sorry, you need to check many other things.

Highlighted
##

archangel-lightworks

Voyager

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

10-10-2019 01:57 AM

487 Views

Registered:
07-23-2019

Re: Fixed Point Matrix Inversion by using XAPP1317

With floats you have a range from -1e38 to +1e38, most of the times your values won't go that far, but with fixed point, you have a very limited range you need to check at every operation.

Most fixed point systems are devised as to never have overflow by design. for example, values in the 0 to 10 range, worst case three products, so you set up some type in the range 0 to 1000. Many times, different fp types are used for internediate values to maximize accuracy.

aoifem

Moderator

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

10-22-2019 09:43 AM

276 Views

Registered:
11-21-2018

Re: Fixed Point Matrix Inversion by using XAPP1317

Hi @ismail1293

If your question is answered or your issue is solved, please kindly mark the response which helped as solution (click on "Accept as solution" button below the reply).

If this is not solved/answered, please reply in the topic giving more information on your current status.

Thanks and Regards,

Aoife

Product Application Engineer - Xilinx Technical Support EMEA

**~ Don't forget to reply, give kudos, and accept as solution.~**

Product Application Engineer - Xilinx Technical Support EMEA

**~ Don't forget to reply, give kudos, and accept as solution.~**

ismail1293

Visitor

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

10-22-2019 11:59 PM

248 Views

Registered:
10-10-2019

Re: Fixed Point Matrix Inversion by using XAPP1317

archangel-lightworks

Voyager

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

10-23-2019 12:51 AM

235 Views

Registered:
07-23-2019

Re: Fixed Point Matrix Inversion by using XAPP1317