Visible to Intel only — GUID: zfe1643182065334
Ixiasoft
Visible to Intel only — GUID: zfe1643182065334
Ixiasoft
8.7.1. Writing an Instruction-Related Exception Handler
alt_exception_result handler(alt_exception_cause cause,
alt_u32 exception_pc, alt_u32 bad_addr);
The instruction-related exception handler’s return value is a flag requesting that the HAL either re-execute the instruction or skip it.
- cause — A value representing the exception type, as shown in the Nios V Processor Exception Cause Codes table
- exception_pc — Instruction address at which exception occurred
- bad_addr — Bad address associated with exception (if applicable)
#include “sys/alt_exceptions.h”
alt_exceptions.h provides type macro definitions required to interface your instruction-related exception handler to the HAL, including the cause codes shown in the Nios V Processor Exception Cause Codes table.
For more information about RISCV-based processor exception causes, refer to the The RISC-V Instruction Set Manual Volume II in RISC-V International website.