---
name: "riscemu"
section: "1"
platform: "linux"
package: "riscemu"
version: "2.2.7-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/riscemu"
---

# riscemu(1)

RISC-V emulator in Python.

## NAME

**riscemu** - RISC-V emulator in Python.

## SYNOPSIS

```
 riscemu [-h] [--options OPTIONS] [--syscall-opts SYSCALL_OPTS] [--instruction-sets INSTRUCTION_SETS]
            [--stack_size [STACK_SIZE]] [--flen [FLEN]] [-v] [--interactive] [--ignore-exit-code]
            file.asm [file.asm ...]
```

## DESCRIPTION

**This emulator contains:**

- **-**

  **RISC-V Assembly parser**

- **-**

  **RISC-V Assembly loader**

- **-**

  **Emulation for most parts of the basic RISC-V instruction set and** **the M and A extensions**

- **-**

  **Naive memory emulator**

- **-**

  **Basic implementation of some syscalls**

- **-**

  **A debugging environment**

## OPTIONS

- **--strict-whitespace**

  **- Do not treat all horizontal whitespace as equivalent**

- **--check-prefix**

  **- Allows changing a default match keyword CHECK to an arbitrary keyword**

- **--implicit-check-not**

  **- Adds implicit CHECK-NOT check that works on every input line**

- **--help**

  **- Display available options**

- **-h, --help**

  **show this help message and exit** **--options** *OPTIONS***, -o** *OPTIONS* **Toggle options. Available options are:**

  - **disable\_debug:**

    **Disable ebreak instructions**

  - **no\_syscall\_symbols:**

    **Don't add symbols for SCALL\_EXIT and others**

  - **fail\_on\_ex:**

    **If set, exceptions won't trigger the debugger**

  - **add\_accept\_imm:**

    **Accept "add rd, rs, imm" instruction (instead of addi)**

  - **unlimited\_regs:**

    **Allow an unlimited number of registers**

  - **libc:**

    **Load a libc-like runtime (for malloc, etc.)**

  - **ignore\_exit\_code:**

    **Don't exit with the programs exit code.** **--syscall-opts** *SYSCALL\_OPTS***, -so** *SYSCALL\_OPTS* **--instruction-sets** *INSTRUCTION\_SETS***, -is** *INSTRUCTION\_SETS* **Instruction sets to load, available are: RV32I, RV32M, RV32A, RV32F, RV32D, Zicsr, RV\_Debug.**  **All are enabled by default** **--stack\_size \[***STACK\_SIZE***\]** **Stack size of loaded programs, defaults to 8MB**

- **--flen \[*FLEN*\]**

  **hardware** *FLEN***, either 32 or 64. Defaults to 64**

- **-v, --verbose**

  **Verbosity level (can be used multiple times)**

- **--interactive**

  **Launch the interactive debugger instantly instead of loading any programs**

- **--ignore-exit-code**

  **Ignore exit code of the program and always return 0 if the program ran to completion.**

## REPORTING BUGS

**To report a bug please visit riscemu issues tracking system at:** **https://github.com/AntonLydike/riscemu/issues**

## AUTHORS

**This manual page was written by Bo YU \<tsu.yubo@gmail.com\> for the Debian project** **(but may be used by others).**
