Turn on suggestions

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

Showing results for

- Intel Community
- FPGAs and Programmable Solutions
- Intel® Quartus® Prime Software
- Floating Point multiplication problem!

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

Altera_Forum

Honored Contributor I

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

08-07-2017
09:57 PM

871 Views

Floating Point multiplication problem!

Hello!

I'm trying to mult 10-bit bus with floating point constant 0.5. To do this I am using a IP FP arithmetic blocks. First - conversion 10 bit bus to 32 float, then - multiplication block (32 x 32 bits) by LPM_constant block(LPM_CVALUE = 0.5 float, LPM_width = 32) and finally - conversion to integer (from 32 to 10 bits). To check the operation I'm creating a waveform. The results is zero. Am I missing something?Link Copied

8 Replies

Altera_Forum

Honored Contributor I

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

08-08-2017
08:10 AM

63 Views

Altera_Forum

Honored Contributor I

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

08-08-2017
08:16 AM

63 Views

Multiplying by 0.5 is the same as divide by 2, which is just a 1 bit shift to the right, and discard the LSB (and/or maybe do some rounding).

Why do you want to use floating point? LPM_Constant just drives an integer, not a floating point.
Altera_Forum

Honored Contributor I

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

08-08-2017
08:29 AM

63 Views

Altera_Forum

Honored Contributor I

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

08-08-2017
08:50 AM

63 Views

Altera_Forum

Honored Contributor I

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

08-08-2017
09:18 AM

63 Views

Altera_Forum

Honored Contributor I

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

08-08-2017
09:26 AM

63 Views

Altera_Forum

Honored Contributor I

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

08-08-2017
11:04 AM

63 Views

Thanks for help!

On the other hand. I want to add a little offset to my NCO 10 bit sin signal. Sinus is represented by samples from 500 to -500. After adding 100 signed integer with adder from Altera IP (10 bits + 10 bits) at the DAC output I get a deformed sinus - the peak is inverted. Thanks in advance for any suggestion.
Altera_Forum

Honored Contributor I

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

08-08-2017
11:25 AM

63 Views

Topic Options

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

For more complete information about compiler optimizations, see our Optimization Notice.