Files
Interpreter/Doc/vm/扫描周期.md
T
Admin 7c855b1618 文档同步双可执行架构:STCompiler + BytecodeExecutor。
- 12.10 重写为两条命令:STCompiler 编译出 .stb + sidecar,BytecodeExecutor 加载执行
- 12.0 删独立 stc.exe,12.13 依赖方向改为 STCompiler/BytecodeExecutor
- 指令与映像.md 新增「映像文件(.stb)与 sidecar」节,I/O 绑定不进映像
- host/ 改名 executor/,宿主入口.md 重写为执行器入口.md
- README / tests / examples / isa README 同步
2026-08-19 13:59:50 +08:00

23 lines
943 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 扫描周期
vm 模块:寄存器虚拟机。CMake 目标:`vm``STATIC`),只依赖 [`指令与映像.md`](../isa/指令与映像.md)。
运行时是 **一台 VM、一个入口、一份映像**。不链接 `compiler`。扫描周期与确定性见 [`初步计划.md`](../初步计划.md) 第 2、8 节。
## 扫描周期
```text
1. 按 sidecar 的 io 绑定,采样 → I / 输入全局
2. 从 PROGRAM MAIN 的 pc=0 执行到 RET
3. 写回 Q / 输出全局
4. 用本周期 Δt 推进 TON / TOF / CTU(不用 wall clock
```
## 边界
- 只认 `isa` 映像;类型与溢出按 [`指令与映像.md`](../isa/指令与映像.md)`INT` 饱和)
- 局部 / `VAR` = 固定寄存器;`nregs` 在函数头
- `CALL` 目标是立即数 `fn_id`,有界调用栈
- 无 GC、无堆、无线程;每周期受 `cycle_limit` 限制
- I/O 从哪来、Δt 谁给、回放怎么喂,属于 `BytecodeExecutor`(读 `.stb` + sidecar