- Go 1.21 or later (for bootstrapping TamaGo)
- Rust toolchain (for building emulator)
- Make
makeThis will:
- Download and build TamaGo
- Build the emulator
Build only TamaGo:
make build-tamagoBuild only ZisK emulator:
make build-zisktamago-go-latest/- TamaGo compilerzisk/- emulator sourcetamaboards/zkvm/- Board support packagetama-programs/- Example programsempty/- Minimal empty program
Using make (recommended):
make compile-emptyOr manually with all the correct flags:
cd tama-programs/empty
GOOS=tamago GOARCH=riscv64 ../../tamago-go-latest/bin/go build \
-gcflags="all=-d=softfloat" \
-ldflags="-T 0x80000000" \
-tags tamago,linkcpuinit,linkramstart,linkramsize,linkprintk \
-o empty.elf .Run the compiled program:
make run-emptyDebug with instruction tracing:
# Run with RISC-V instruction tracing and verbose output
make trace-empty
# Log every step with step counter
make log-empty
# Save trace to file (tama-programs/empty/trace.out)
make trace-file-emptyOr manually:
cd tama-programs/empty
../../zisk/target/release/ziskemu -e empty.elf -i empty_input.binAfter building, the following environment variables are available:
TAMAGO- Path to the TamaGo compilerZISKEMU- Path to the ZisK emulator
The VM provides minimal "peripherals".
- Input Buffer at
0xa0000000- Where input data is placed for the program - Output Buffer at
0xa0010000- Where programs write output data - RAM starting at
0xa0020000- Main memory for program execution (~512MB)
- RISC-V RV64IMA instruction set (
cis not actually in the go compiler yet) - Simple I/O model: read input → compute → write output → exit
- Hardware timers (time is simulated/deterministic)
- Hardware Interrupts
- MMU (Memory Management Unit)
- Hardware RNG (random numbers must be deterministic)
- Traditional peripherals (UART, GPIO, network, storage, display)
Note: Basic floating-point instruction decoding has been added (opcodes 7, 39, 83) but the instructions currently execute as NOPs.
The only system call is ecall for program termination and to call special functions.
The ZisK emulator provides several tracing options for debugging:
# Enable RISC-V instruction tracing
ziskemu -e program.elf -i input.bin -a
# Log every step
ziskemu -e program.elf -i input.bin -l
# Print trace every N steps
ziskemu -e program.elf -i input.bin -p 100
# Save trace to file
ziskemu -e program.elf -i input.bin -t trace.out
# Verbose mode
ziskemu -e program.elf -i input.bin -v
# Generate statistics
ziskemu -e program.elf -i input.bin -xRemove all built artifacts:
make clean