lib_rv32 0.1.1

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