ROT-8-Machine: one physical ROT-8, split out of R8Forge

This repository is a machine, not a toolchain.  R8Forge keeps the language, the ISA
specification and the tools that assemble, pack and run tapes; this one keeps what it
takes to build the thing: the RTL and its testbench, the requirements note, the 34 chip
board wiring, the panel design and its mockups, the mechanics analysis, the bill of
materials, the buying guide and the order sheet, the bring up plan, and the microcode
directory that is still empty.

The equivalence test came with the RTL, since it needs both halves: it assembles a tape
with r8forge, packs it with tape_pack, runs it with tape_run --loop-stack --retest, then
compiles rtl/rot8.v with iverilog and requires the same OUT stream and the same step
count.  It takes those three binaries as parameters and its header says they must be
built for eight bit cells and sixty four cells, because an eleven bit packer feeding an
eight bit machine produces different output and looks like an RTL bug.

Verified here: hello 577 instructions 417 steps, calc 51378 instructions 166741 steps
with "12 34 + ." fed in, both agreeing with the interpreter.
This commit is contained in:
dsh committed 2026-11-25 17:02:09 +08:00
commit d0dc2d4d66
25 files changed
+2710

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
# 控制存储器(微码)
**还没开始。** 这里将来放:
| 文件 | 内容 |
|---|---|
| `fields.md` | 控制字段定义:每一位控制什么(`RAM_OE` / `RAM_WE` / `L299_LOAD` / `ROR` / `FLB` / `PUSH` / `POP` / `IP_CE` / `DP_UP` / `DP_DN` / `OUT_CLK` / `AWAIT_RDRF` / `AWAIT_TDRE` …) |
| `isa.md` | 8 条指令 × 每拍的字段表(插线时打印出来贴墙上) |
| `gen.py` 或 `gen.cc` | 由上面两张表生成 28C64 / 28C256 的镜像 |
| `rom.bin` | 生成的镜像(烧片用) |
## 为什么值得先做
这是整个硬件里**最容易错、又完全不需要零件**的部分:
* 表错了 → 焊好的板子上表现为"某条指令偶尔不对",查起来几小时;
* 表对了 + 逻辑仿真 → 上电就能跑。
验证方式(不需要面包板):把控制字段灌进一份**片级仿真**(74LS161/6116/299/273 的行为模型),
跑 `hello` / `term` / 计算器,和 `r8forge_tape_run` 的 OUT 流与步数比对 —— 和 `rtl/rot8.v`
现在做的事情一样,只是换成"照着真板子的连线"跑。