Core-2 previewnormative preview; implementation unavailable

Vendor-neutral subprocess, toolchain and fabric contracts.

Core-2 Toolchain and Fabric Adapter Protocol

Status: normative preview; no executable adapter supplied

C2-ADAPTER-001 — Transport. Protocol zerglang.target-adapter/1 uses one UTF-8 JSON object per line on subprocess stdin/stdout. Stderr carries bounded diagnostic logs. Each request has protocol, unique request_id, operation, inputs, limits; each final response echoes protocol/request ID and has status, outputs, reports, diagnostics, receipt. Status is ok, failed, unsupported, cancelled or indeterminate. Exactly one final response is allowed per request. Unknown protocol/operation or required input feature returns unsupported without executing the operation. Invalid framing, duplicate request IDs, duplicate JSON keys, nonfinite numbers and mismatched response IDs are protocol failures. No unsolicited stdout text is accepted.

Limits contain positive integers wall_time_ms, memory_bytes, output_bytes, log_bytes and an operation-specific step/evaluation budget. The host terminates a subprocess that violates the transport/resource contract and records failure; termination cannot undo an already issued physical action. The host starts adapters using an argument vector, never interpolated shell commands. An adapter declaration alone cannot install or execute a program; the host must already have admitted that toolchain and its authority.

C2-ADAPTER-002 — Operations and inputs. describe returns protocol version, supported operations/features/targets and immutable toolchain identity without device access. Other operations require the common inputs design, realization, target, constraints, toolchain, dependencies as content references; constraints may identify the canonical empty set. A content reference contains kind, schema version, content digest, byte length and a host-provided read-only relative path within the invocation input directory. Absolute paths, traversal and references escaping the directory are rejected. Schema/digest verification precedes use; ZLM3 binary inputs cannot be admitted until their encoding tranche is specified and supported.

Operation Additional inputs Required successful outputs
elaborate root component and static bindings canonical elaborated graph, feature/constraint closure
simulate stimulus, initial state, observation schedule, horizon/event budget observations, final state, completion/uncertainty facts
synthesize synthesis policy and admitted libraries target netlist, mappings, equivalence report
implement netlist, pin/placement/routing constraints bitstream when supported, pin map, implementation netlist and reports
configure target artifact, session-bound authority reference configuration receipt and verification state
readback configured artifact identity, supported verification policy readback/comparison receipt
exchange typed port commands, deduplication key, session reference typed results or explicit indeterminate outcome
observe signal selection, sampling/envelope/instrument facts observations with uncertainty and device/time binding
measure stimulus, measurement plan, calibration/envelope facts device-bound measurements and raw-data references

Simulation state is an artifact, not a physical device snapshot. Output files are confined to an invocation output directory, length-bounded and digest- verified by the host. Outputs identify their kind, schema, target and toolchain. Optional netlist/bitstream formats are vendor-specific declared artifact kinds; there is no universal normative bitstream encoding.

C2-ADAPTER-003 — Reports and failures. Reports have kind, subject digest, checker/tool identity, status, units, assumptions and a bounded payload or content reference. Standard report kinds include equivalence, timing, resources, power, pin mapping and configuration verification. Every requested report is returned as pass/fail/unsupported/inconclusive; absent power estimates are not zero power and absent timing paths are not timing closure. The final receipt binds operation, request inputs, toolchain, target, output digests, limits, actual usage and timestamps. Diagnostic entries use the Core-2 envelope. An ok tool invocation is not semantic promotion: the host independently validates all required evidence and report applicability. Partial outputs from failed/cancelled operations may be retained as evidence but cannot be promoted.

C2-ADAPTER-004 — Target identity. Portable FPGA targets bind family, part, package, speed grade, supported features and toolchain support. Pin voltage, clock and implementation constraints are explicit typed facts. Intrinsic targets additionally bind exact enrolled device instances, placement/routing, environment, calibration and the accepted population. A source target family does not imply admission to every board carrying a related device.

C2-ADAPTER-005 — Configuration authority. A live Fabric session must match the target and permit each issued operation. JSON carries only a session-bound opaque reference, valid on the admitted local channel; it is not a serializable capability and must be removed from durable artifacts. Check configuration identity and use readback where supported. Unsupported readback is recorded explicitly; a policy requiring readback rejects that target. Readback proves only the stated verification relation, not functional or analog correctness. On timeout/disconnect during configuration or exchange, mark physical outcome indeterminate until reconciled. No blind retry is permitted without a target deduplication/reconciliation contract. Closing a session releases authority but does not imply that configured hardware has stopped; stop/isolation behavior must be part of the session policy and produce a receipt.

Projected fromspec/editions/core-2/adapters.md