Files
ROT-8-Machine/NEXT.md
T
dsh d7a41821cf docs: NEXT.md, so the next session starts cold without losing the thread
The design reasoning all lives in the repository already -- AGENTS.md for the traps,
docs/ for the decisions, the RTL for the contract -- so a fresh session only needs one
file that says what was finished, what comes next and the two commands that matter.  It
also records that the equivalence test wants a build of the toolchain made for eight bit
cells, which cost an hour the first time.
2026-11-25 17:06:25 +08:00

2.2 KiB

从这儿开始

上一轮做到了哪、下一步干什么、命令是什么 —— 换一个会话也不丢东西。

上一轮做完的(2026-11-25)

  • 仓库拆分:物理机从 R8Forge 独立成这个仓库;R8Forge 那边 10/10 测试仍全绿(57014cc)。
  • RTL 已验证:rtl/rot8.v 与 r8forge_tape_run --loop-stack --retest 逐字节一致 (hello 417 步、calc 166 741 步),用 tests/rtl_sim.cmake 复现。
  • 面板定稿:8800 排法 + 环形 CELL + 全氖灯 + 助记符灯(docs/panel.md,图在 img/)。
  • 料买了:宿舍版一车 ≈ ¥280,清单与链接在 docs/order.md / docs/links.txt。

下一步:微码(唯一"不用零件、又最省寒假时间"的活)

目标:把 microcode/README.md 里那三张表写出来,并且在电脑上验证,而不是等焊完发现错。

  1. microcode/fields.md —— 控制字段定义(每一位控制哪根线)
  2. microcode/isa.md —— 8 条指令 × 每拍的字段(插线时打印贴墙上)
  3. microcode/gen.py —— 由表生成 28C64/28C256 镜像
  4. tests/micro_sim/ —— 片级仿真(74LS161/6116/299/273 的行为模型 + 微码),跑 hello/term/calc,和 tape_run 的 OUT 流、步数对比

验收标准和 RTL 那条一样:OUT 流和步数逐字节一致,别的说法不算数。

常用命令

# 对拍(需要一份 8/64 的 R8Forge 构建,即 R8Forge/build8)
cmake -DRTL=rtl \
      -DPACK=<R8Forge>/build8/Release/r8forge_tape_pack.exe \
      -DRUN=<R8Forge>/build8/Release/r8forge_tape_run.exe \
      -DR8FORGE=<R8Forge>/build8/Release/r8forge.exe \
      -DSOURCE=../R8Forge/examples/calc.r8asm \
      -DINPUT="12 34 + ." -DWORK=build -P tests/rtl_sim.cmake
# => 51378 instructions, 166741 steps: RTL and interpreter agree

# 画图(改了面板/框图之后)
python tools/panel_mockup_vintage.py img/panel-mockup-vintage.png
python tools/bringup_sketch.py img/bringup.png

别忘的三条(详见 AGENTS.md)

  1. 改 RTL 必须重跑对拍,而且必须用 8/64 的工具链构建;
  2. RTL 里有五个"故意这么写"的地方,改之前先读 rtl/README.md;
  3. 面板只显示状态、不显示数字、每样信息一种表示 —— 删掉的东西别好心加回去。