Better HN
topnewbestaskshowjobs
Log inSign up

s-holst

1 karma · joined Apr 29, 2024 (2y ago) · 1 submissions

Submissions

comment 2y ago · link · parent

Here is one in less than 200 lines of python: https://github.com/s-holst/tinyrv . It uses machine-readable specs from https://github.com/riscv/riscv-opcodes ; yet I needed to extract immediate bit scrambling from their LaTeX sources :). I wonder if there is an easier way. Anyways, the opcode semantics are hand-coded and it simulates enough to boot linux.