File size: 3,093 Bytes
1eff9b2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | {
"$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
}
}
}
|