Crates.io | brubeck |
lib.rs | brubeck |
version | 0.0.4 |
source | src |
created_at | 2023-01-05 07:47:19.235709 |
updated_at | 2023-06-27 23:36:42.346944 |
description | A RISC-V REPL and emulation library ... a work in progress! |
homepage | https://github.com/peat/brubeck |
repository | https://github.com/peat/brubeck |
max_upload_size | |
id | 751383 |
size | 89,921 |
The goal of Brubeck is to create a REPL for RISC-V assembly language, and a very easy to use emulator library -- a playground for learning, not a high performance emulator.
This is a very early prototype. See the brubeck crate documentation for more information about running the REPL and working with the library.
Please follow this repo if you're interested in the project! I'm also very keen on feedback and thoughts on what you think would be awesome to see in a RISC-V assembly playground.
EBREAK
, ECALL
, and FENCE
instructions.ADD x1, x2, x3
) and inspect registers.The example below demonstrates using the ADDI
and ADD
instructions as well as inspecting the state of registers.
$ cargo run
Brubeck: A RISC-V REPL
Ctrl-C to quit
ADDI x1, x0, 5
=> ✅ ADDI(IType { opcode: 0, rd: X1, funct3: 0, rs1: X0, imm: Immediate { value: 5, bits: 12 } })
x1
=> ✅ X1: 5 (0x5)
ADDI x2, x0, 3
=> ✅ ADDI(IType { opcode: 0, rd: X2, funct3: 0, rs1: X0, imm: Immediate { value: 3, bits: 12 } })
x2
=> ✅ X2: 3 (0x3)
ADD x3, x2, x1
=> ✅ ADD(RType { opcode: 0, rd: X3, funct3: 0, rs1: X2, rs2: X1, funct7: 0 })
x3
=> ✅ X3: 8 (0x8)
interpreter.rs