Skip to main content

CLI

Invocation and run-time flags for the ziskemu binary, which emulates a RISC-V ELF (or prebuilt ROM) against an input and writes the output, with no proof generated. Documents the program-input, execution, output, quick-check, trace, and diagnostic flags.

ziskemu converts a RISC-V ELF into a ZisK ROM (or loads a prebuilt ROM), emulates it against the provided input, and writes the output to the console or a file. No proof is generated. For the profiling reports see Statistics & reports and Function analysis.

ziskemu [OPTIONS] [CHUNK_SIZE]

You must provide the program either as an ELF (--elf) or as a prebuilt ROM (--rom). The optional positional CHUNK_SIZE traces every that-many steps (used by the chunk player).

Program input

FlagShortDefaultDescription
--elf <ELF_FILE>-eRISC-V ELF to convert to a ZisK ROM and emulate.
--rom <ROM_FILE>-rPrebuilt ZisK ROM to emulate, instead of converting an ELF.
--inputs <INPUT_FILE>-iInput data file fed to the guest. Omit for no input.
--legacy-inputs <FILE>Input data file in the legacy format.
--output <OUTPUT_FILE>-oWrite the guest output to this file instead of (or alongside) the console.

Execution

FlagShortDefaultDescription
--max-steps <MAX_STEPS>-n68719476735Maximum number of steps to execute before stopping.
--print-step <PRINT_STEP>-p0Print progress every N steps (0 disables).
--max-input-mem <BYTES>134217728Maximum input memory (default 128 MiB).

Output and logging

FlagShortDefaultDescription
--log-output-ctruePrint the guest output to the console (on by default).
--log-output-riscof-ffalsePrint the guest output in RISCOF format.
--verbose-vfalseVerbose logging.
--log-step-lfalseLog step progress.
--log-metrics-mfalseLog performance metrics for the run.

Quick checks

Lightweight flags for fast runs and machine-readable output:

FlagDefaultDescription
--stepsfalsePrint only the step count, skipping full statistics.
--with-progressfalsePrint a progress update every 16M steps for long runs.
--no-thousands-sepfalseDrop the thousands separator for machine-readable output.

Traces and coverage

FlagShortDefaultDescription
--coveragefalseShow coverage of opcodes and precompiles (requires -X).
--generate-minimal-traces-gfalseGenerate minimal execution traces.
--trace <TRACE_FILE>-tWrite an execution trace to a file.
--store-op-output <FILE>-sStore operation data to a file for analysis.
--disasm <DISASM_FILE>Write a disassembly annotated with execution counts (requires -S -X).

Advanced & diagnostic

FlagShortDefaultDescription
--with-memory-datatrueLoad data sections into memory so they can be read during full emulation (off in chunk-player mode).
--tracerv-afalseEnable the RISC-V tracer.
--legacy-stats-xfalseGenerate the legacy step/usage statistics report (superseded by -X / --sdk).
note

ziskemu exposes further advanced and diagnostic flags. Run ziskemu --help for the complete, version-exact list.

Examples

Run an ELF and print its output:

ziskemu -e program.elf -i input.bin -c

Load a prebuilt ROM instead of converting an ELF each time:

ziskemu -r program.rom -i input.bin -c

Cap the step count and print progress while running:

ziskemu -e program.elf -i input.bin -n 5000000 -p 1000000 -c

To profile a run, add -X (and -S for function-level detail) — see Statistics & reports and Function analysis.