Nios® V Processor Software Developer Handbook

ID 743810
Date 2/14/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

12.1.1.26. alt_exception_cause_generated_bad_addr()

Prototype

int alt_exception_cause_generated_bad_addr ( alt_exception_cause cause)

Commonly Called By

C/C++ programs

Device drivers

Thread-safe

--

Available from ISR

--

Include

<sys/alt_exceptions.h>

Description

This function validates the bad_addr argument to an instruction-related exception handler. The function parses the handler’s cause argument to determine whether the bad_addr register contains the exception-causing address.

If the exception is of a type that generates a valid address in bad_addr, this function returns a nonzero value. Otherwise, it returns zero.

If the cause register is unimplemented in the Nios® V processor core, this function always returns zero.

Return

A nonzero value means bad_addr contains the exception-causing address.

Zero means the value of bad_addr is to be ignored.