Nios II Classic Software Developer’s Handbook

ID 683282
Date 5/14/2015
Public
Document Table of Contents

14.1.25. 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® II 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.