lib_rv32_isa/
error.rs

1/// Enum that encapsulates the various different ways execution can fail.
2/// Some errors are caused by other errors and reference them.
3///
4/// Instruction format errors contain `(instruction: u32, bad_field: u8)`.
5///
6/// Memory errors contain `(address: u32)`.
7///
8/// Register file errors contain `(reg_num: u8)`.
9#[derive(Debug, PartialEq)]
10pub enum RiscvError {
11    InvalidOpcodeError(u32, u8),
12    InvalidFunc3Error(u32, u8),
13    InvalidFunc7Error(u32, u8),
14    RegisterOutOfRangeError(u8),
15    MemoryOutOfBoundsError(u32),
16    MemoryAlignmentError(u32),
17}