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
- Modelsim: Interpretation of numbers in wave window

- 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

03-08-2018
12:29 AM

2,884 Views

Modelsim: Interpretation of numbers in wave window

Hello all!

I've encountered a problem that absolutely baffles me. It's regarding the radix interpretation in the Sim/Wave window. I've checked that the binary number is correct, 64-bit fixed with 32 bits decimals. When displayed with fixed#32#binary#signed everything is correct but when displayed with fixed#32#decimal#signed it shows nonsense (see picture attached). The bit sequence is: 00000000000000000000000000000000 . 00101110000000000000000000000000 in binary rep. it's showed correctly but decimal shows ~7.7e8 instead of the correct 0.1796875. Signed, unsigned makes no difference. Anybody that knows what error I'm doing here? Thanks in advance! BR/ eleteria

Link Copied

6 Replies

Altera_Forum

Honored Contributor I

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

03-08-2018
08:51 AM

401 Views

Hi eleteria,

The given bit sequence “00000000000000000000000000000000 . 00101110000000000000000000000000” represents fraction in binary so you should check “float32” option in Radix. Let me know if this has helped resolve the issue you are facing or if you need any further assistance. Best Regards Vikas Jathar Intel Customer Support – Engineering (Under Contract to Intel)
Altera_Forum

Honored Contributor I

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

03-08-2018
07:26 PM

401 Views

Hello!

First of all, thanks for your effort and interest in replying! The 64 bit sequence is a fixed fractional number, not a float number. I.e. the 32 first bits represents the number and the 32 last (LSB ) represents the fractional part, 1/2 and below. But the most amazing thing regarding this, is that if I do the same with a 32 bit, with 16 bit integer, 16 fractional bits, then everything works perfectly. The 32-bit sequence: 0000000000000000 . 0000000100000000 i.e. 1/128 = 0.0078125 is showed correctly with radix fixed#16#decimal#signed. (signed/unsigned does not matter, it works correctly) See attached image. This is nothing short of mind blowing to me, I simply can't understand it.
Altera_Forum

Honored Contributor I

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

03-12-2018
10:22 AM

401 Views

Anybody that has any idea here?

My test development has pretty much come to a halt. I guess this is just a bump. :)
Altera_Forum

Honored Contributor I

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

03-15-2018
02:57 PM

401 Views

Altera_Forum

Honored Contributor I

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

03-15-2018
05:37 PM

401 Views

Altera_Forum

Honored Contributor I

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

03-15-2018
07:28 PM

401 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.