Basys 3 RISC-V computer

The Basys 3 Z-80 computer with the Z-80 replaced by an RV32IM processor
written from scratch (rtl/rv32_cpu.v): multi-cycle, 90 MHz, CSRs and
traps, interrupts, two hardware triggers and a resumable NMI for the
monitor. Passes riscv-tests rv32ui/um/mi.

rv32_system.v keeps all the Z-80 machine's peripherals, with I/O port N
at FFFFFF00h + N, 80 KB of RAM with BASIC preloaded, and a 32 KB monitor
ROM. BASIC, the five games and the monitor (with an RV32 disassembler,
assembler, breakpoints and single step) are ported to RISC-V GCC. Python
emulator and tests in tools/; full-system simulation in sim/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
brad ArantandClaude Opus 5.5 committed 2026-11-30 18:09:18 -08:00
commit 5930b958b4
103 files changed
+55677

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
#!/bin/bash
# Turn docs/basic-manual.md into docs/basic-manual.pdf (needs python3-markdown and Chrome).
set -e
cd "$(dirname "$0")"
python3 - <<'PY'
import markdown
body = markdown.markdown(open("basic-manual.md").read(), extensions=["tables", "fenced_code"])
css = """
@page { size: A4; margin: 18mm 16mm; }
body { font-family: "DejaVu Serif", Georgia, serif; font-size: 10.5pt; line-height: 1.45; color: #111; }
h1 { font-size: 24pt; margin: 0 0 4pt; }
h1 + p { font-size: 12pt; color: #444; margin-bottom: 18pt; }
h2 { font-size: 15pt; border-bottom: 1px solid #999; padding-bottom: 2pt; margin-top: 22pt;
page-break-after: avoid; }
h3 { font-size: 12pt; margin-top: 14pt; page-break-after: avoid; }
code, pre { font-family: "DejaVu Sans Mono", monospace; font-size: 9pt; }
pre { background: #f2f2f2; border-left: 3px solid #4a7; padding: 6pt 8pt; page-break-inside: avoid; }
table { border-collapse: collapse; margin: 6pt 0; page-break-inside: avoid; }
th, td { border: 1px solid #bbb; padding: 3pt 6pt; vertical-align: top; text-align: left; }
th { background: #e8e8e8; }
"""
open("basic-manual.html", "w").write(
"<!doctype html><html><head><meta charset='utf-8'><title>Basys 3 RISC-V BASIC</title>"
"<style>%s</style></head><body>%s</body></html>" % (css, body))
PY
google-chrome --headless --disable-gpu --no-pdf-header-footer \
--print-to-pdf="$PWD/basic-manual.pdf" "file://$PWD/basic-manual.html" 2>/dev/null
rm basic-manual.html
echo "wrote docs/basic-manual.pdf"