amos 2f32624d3b Batch 18 (20261026-C-hwe-codegen-18): add 100 calibrated HWE code-gen tasks; pause production for rollout
100 tasks from the HWE arm-linux code-gen pool (outside the lk/man/pth
range given to batch 22), each with at least one independent
contract-edge defect and plain public docs. Claude reviewed 100/100
USABLE against current digests; no ID or source overlap with main or
batch 22. Difficulty is unmeasured.

progress.md records the wrap-up: all Codex sessions and Qwen schedulers
stopped for the user's rollout, Qwen results so far (57 HARD of 373),
and what is left on each batch branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:52:13 +08:00

70 lines
2.2 KiB
C++

#include "console.hpp"
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace clockmodel;
int main()
{
Bus first, second;
std::string mode;
std::getline(std::cin, mode);
std::string line;
while (std::getline(std::cin, line)) {
if (mode == "T") {
std::cout << encode(command(first, second, line));
continue;
}
std::istringstream input(line);
if (mode == "E") {
Reply reply;
input >> reply.status;
std::uint64_t word;
while (input >> word) {
reply.values.push_back(static_cast<Word>(word));
}
std::cout << encode(reply);
continue;
}
std::string selector, operation;
input >> selector >> operation;
Bus& bus = selector == "a" ? first : second;
Arg id = 0, reg = 0, value = 0;
input >> id;
Reply reply;
if (operation == "read") {
input >> reg;
reply = bus.read(id, reg);
} else if (operation == "write") {
input >> reg >> value;
reply = bus.write(id, reg, value);
} else if (operation == "configure") {
Arg clock, reset, enable, data;
input >> clock >> reset >> enable >> data;
reply = bus.configure(id, clock, reset, enable, data);
} else if (operation == "burst") {
std::vector<Arg> values;
while (input >> value) {
values.push_back(value);
}
reply = bus.burst(id, values);
} else if (operation == "drain") {
input >> value;
reply = bus.drain(id, value);
} else if (operation == "history") {
input >> value;
reply = bus.history(id, value);
} else if (operation == "snapshot") {
reply = bus.snapshot(id);
} else if (operation == "clear") {
reply = bus.clear(id);
}
std::cout << reply.status << ' ' << reply.values.size();
for (Word word : reply.values) {
std::cout << ' ' << word;
}
std::cout << '\n';
}
return 0;
}