文档:executor 计划项——可选 --sidecar 参数(显式指定 I/O 绑定文件,缺省回退同名推导)

This commit is contained in:
2026-08-24 09:31:51 +08:00
parent d109a3ca77
commit 06a497636e
+5
View File
@@ -15,6 +15,11 @@ BytecodeExecutor <name>.stb [--cycles N] [--replay <file>] [--step]
- `--step`:单步——采样 I 后逐指令打印(pc/fn/反汇编 + 执行后非零寄存器),跑 1 个周期,最后打印 I/Q
- 每周期打印 `cycle N: I=[...] Q=[...]`(按 sidecar 绑定顺序);故障打印 `FAULT(n)` 并退出码 1
### sidecar 定位(当前 + 计划)
- **当前(已实现)**:sidecar 路径按「同名替换扩展名」推导——`<name>.stb``<name>.runtime.toml`。依据:sidecar 是编译产物的配对文件,同名约束由 STCompiler 写侧强制,约定即可。
- **计划(未实现)**:加可选参数 `--sidecar <path>` 显式指定 I/O 绑定文件。适用场景:同一程序多套接线配置并存(厂内/现场不同 sidecar)、接线文件与 `.stb` 不同目录。缺省行为**不变**(未指定时回退到同名推导),向后兼容。
## 职责
- 加载 `.stb` 映像与 `<name>.runtime.toml` sidecarI/O 绑定 var → 槽号 → channel/bit