- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I need to add two numbers in Nios II. For that i simply add two numbers in Nios II C program. I have assigned the maximum possible 32 bit positive value .i.e. 0x7FFFFFFF in both. What i expect is the result should saturate to 0x7FFFFFFF as in the case of micro controllers. But the Nios II does not do like that.What can be the reason for that?Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The result doesn't saturate but Nios overflows and set the overflow status.
AFAIK this is the normal behaviour on other microprocessors, too. I have worked with a few uP which could saturate the result instead of generating an overflow, but this was always an option you had to explicitly enable.
Reply
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