12.10 双可执行接线:编译产出 sidecar,BytecodeExecutor 跑周期。
- STCompiler -o:另写 <name>.runtime.toml(io 绑定 var→槽号→channel/bit,槽号来自链接结果) - BytecodeExecutor <name>.stb [--cycles N] [--replay <file>]:加载 .stb + sidecar, 逐周期采样 I(回放行按 io.input 顺序)→ 跑周期 → 打印 I/Q;故障打印 FAULT 退出码 1 - 手写 sidecar 解析(冻结 TOML 子集);Machine 暴露 header()(dt_ms/cycle_limit) - 验证:line1 回放 0/1 组合 Q 正确(急停/start 语义)、用例 06 CycleLimit FAULT;ctest 10/10
This commit is contained in:
@@ -78,6 +78,7 @@ bool Machine::step() {
|
||||
}
|
||||
|
||||
Fault Machine::fault() const { return fault_; }
|
||||
const isa::ImageHeader& Machine::header() const { return image_.header(); }
|
||||
uint32_t Machine::pc() const { return pc_; }
|
||||
uint32_t Machine::fn_id() const { return cur_frame().fn_id; }
|
||||
uint32_t Machine::cycle_count() const { return cycle_count_; }
|
||||
|
||||
Reference in New Issue
Block a user