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!

AR# 22356

MicroBlaze - Divide by 0 hardware exception is only supported when configured with hardware divider


Urgency: Standard

General Description:

When I configure MicroBlaze without the hardware divider (USE_DIV=0), divide by zero exceptions are not flagged.


In the case of software divides, the GNU libraries (not a divide instruction) calculates the divide.

The GCC libraries do not flag the error as there is no well defined mechanism in C to present the exception to the user. There is nothing that tells the processor that the arithmetic and logical sequence it is executing is actually a soft IDIV.

In order for MicroBlaze to identify a divide by zero exception, it must be configured with the hardware divider (USE_DIV=1). The same holds true for the floating point hardware exceptions.

AR# 22356
Date 12/15/2012
Status Active
Type General Article
Page Bookmarked