ortho32-sdk-java / schemas /execution-trace.schema.json
SNAPKITTYWEST's picture
push from SNAPKITTYWEST/ortho32-sdk-java
1eff9b2 verified
Raw
History Blame Contribute Delete
3.09 kB
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ortho32.dev/schemas/execution-trace.schema.json",
"title": "ExecutionTrace",
"description": "Immutable ordered list of CycleRecord. Same input must produce same canonical TraceHash across N runs (H=0 determinism). All cycles are architectural integers.",
"type": "array",
"items": {
"$ref": "#/$defs/CycleRecord"
},
"$defs": {
"CycleRecord": {
"title": "CycleRecord",
"type": "object",
"properties": {
"cycleNumber": {
"type": "integer",
"minimum": 0,
"description": "Architectural cycle number, integer logical time, not wall-clock"
},
"scalarStage": {
"type": "string",
"enum": ["IF", "ID", "EX", "MEM", "WB", "STALL", "FLUSH"],
"description": "Scalar pipeline stage occupancy"
},
"tensorStage": {
"type": "string",
"enum": ["IDLE", "TLOAD", "TMUL", "TSTORE", "WAIT"],
"description": "Tensor pipeline stage"
},
"commitStatus": {
"type": "string",
"enum": ["COMMITTED", "FLUSHED", "STALLED", "EXCEPTION"],
"description": "Commit status for this cycle"
},
"registerWrites": {
"type": "array",
"description": "Register writes committed this cycle",
"items": {
"type": "object",
"properties": {
"register": { "type": "string" },
"value": { "type": "string" }
},
"required": ["register", "value"],
"additionalProperties": false
}
},
"memoryEvents": {
"type": "array",
"description": "Memory read/write events",
"items": {
"type": "object",
"properties": {
"address": { "type": "string", "pattern": "^0x[0-9a-fA-F]+$" },
"type": { "type": "string", "enum": ["READ", "WRITE"] },
"value": { "type": "string" }
},
"required": ["address", "type"],
"additionalProperties": false
}
},
"pipelineState": {
"type": "object",
"description": "IF/ID/EX/MEM/WB occupancy, forwarding events, branch flushes",
"properties": {
"ifOccupied": { "type": "boolean" },
"idOccupied": { "type": "boolean" },
"exOccupied": { "type": "boolean" },
"memOccupied": { "type": "boolean" },
"wbOccupied": { "type": "boolean" },
"forwarding": { "type": "array", "items": { "type": "string" } },
"branchFlush": { "type": "boolean" }
},
"additionalProperties": true
},
"instructionId": {
"type": "string",
"description": "Instruction identifier retired or in flight"
}
},
"required": ["cycleNumber", "scalarStage", "tensorStage", "commitStatus", "registerWrites", "memoryEvents"],
"additionalProperties": true
}
}
}