prod2u_p4_campaign.schema.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. {
  2. "$schema": "https://json-schema.org/draft/2020-12/schema",
  3. "$id": "prod2u-p4-campaign-v2",
  4. "title": "Prod2U P4 ten-round offline campaign v2",
  5. "type": "object",
  6. "required": ["schema", "campaign_id", "campaign_identity", "bmc", "qualification", "rounds", "evidence_bindings"],
  7. "properties": {
  8. "schema": {"const": "prod2u-p4-campaign-v2"},
  9. "campaign_id": {"type": "string", "minLength": 1},
  10. "campaign_identity": {
  11. "allOf": [
  12. {"$ref": "#/$defs/identity"},
  13. {"required": ["planned_rounds"], "properties": {"planned_rounds": {"const": 10}}}
  14. ]
  15. },
  16. "bmc": {"$ref": "#/$defs/bmc"},
  17. "qualification": {"$ref": "#/$defs/staticQualification"},
  18. "layers": {"$ref": "#/$defs/layers"},
  19. "rounds": {"type": "array", "minItems": 10, "maxItems": 10, "items": {"$ref": "#/$defs/round"}},
  20. "evidence_bindings": {
  21. "type": "array",
  22. "minItems": 10,
  23. "maxItems": 10,
  24. "items": {
  25. "type": "object",
  26. "required": ["round", "evidence_binding"],
  27. "properties": {
  28. "round": {"type": "integer", "minimum": 1, "maximum": 10},
  29. "evidence_binding": {"$ref": "#/$defs/evidenceBinding"}
  30. },
  31. "additionalProperties": true
  32. }
  33. }
  34. },
  35. "additionalProperties": true,
  36. "$defs": {
  37. "identity": {
  38. "type": "object",
  39. "required": ["dut_id", "build_id", "bitstream_sha256", "profile"],
  40. "properties": {
  41. "dut_id": {"type": "string", "minLength": 1},
  42. "build_id": {"type": "string", "minLength": 1},
  43. "bitstream_sha256": {"type": "string", "pattern": "^[0-9a-fA-F]{64}$"},
  44. "variant": {"enum": ["trace", "normal"]},
  45. "profile": {"type": "string", "minLength": 1},
  46. "source_manifest_sha256": {"type": "string", "pattern": "^[0-9a-fA-F]{64}$"},
  47. "planned_rounds": {"type": "integer", "minimum": 1}
  48. },
  49. "additionalProperties": true
  50. },
  51. "bmc": {
  52. "type": "object",
  53. "required": ["status", "reason"],
  54. "properties": {
  55. "status": {"const": "out_of_scope"},
  56. "reason": {"type": "string", "minLength": 1}
  57. },
  58. "additionalProperties": true
  59. },
  60. "layerStatus": {"enum": ["pass", "fail", "blocked", "not_run"]},
  61. "layers": {
  62. "type": "object",
  63. "required": ["required", "optional"],
  64. "properties": {
  65. "required": {
  66. "type": "object",
  67. "required": ["program_sram", "fresh_ready", "host_ack", "pwm_state", "fan3_tach_trend", "timeout_fallback", "disable", "ptc_command_path"],
  68. "properties": {
  69. "program_sram": {"$ref": "#/$defs/layerStatus"},
  70. "fresh_ready": {"$ref": "#/$defs/layerStatus"},
  71. "host_ack": {"$ref": "#/$defs/layerStatus"},
  72. "pwm_state": {"$ref": "#/$defs/layerStatus"},
  73. "fan3_tach_trend": {"$ref": "#/$defs/layerStatus"},
  74. "timeout_fallback": {"$ref": "#/$defs/layerStatus"},
  75. "disable": {"$ref": "#/$defs/layerStatus"},
  76. "ptc_command_path": {"$ref": "#/$defs/layerStatus"}
  77. },
  78. "additionalProperties": {"$ref": "#/$defs/layerStatus"}
  79. },
  80. "optional": {"type": "object", "additionalProperties": {"$ref": "#/$defs/layerStatus"}}
  81. },
  82. "additionalProperties": true
  83. },
  84. "round": {
  85. "type": "object",
  86. "required": ["round", "identity", "layers", "fan", "windows", "raw_samples", "correlation", "rpm", "ptc", "evidence_binding"],
  87. "properties": {
  88. "round": {"type": "integer", "minimum": 1, "maximum": 10},
  89. "identity": {"$ref": "#/$defs/identity"},
  90. "layers": {"$ref": "#/$defs/layers"},
  91. "fan": {
  92. "type": "object",
  93. "required": ["FAN3"],
  94. "properties": {
  95. "FAN3": {
  96. "type": "object",
  97. "required": ["FG5", "FG6"],
  98. "properties": {
  99. "FG5": {"enum": ["detected", "absent", "intermittent"]},
  100. "FG6": {"enum": ["detected", "absent", "intermittent"]}
  101. },
  102. "anyOf": [
  103. {"properties": {"FG5": {"const": "detected"}}, "required": ["FG5"]},
  104. {"properties": {"FG6": {"const": "detected"}}, "required": ["FG6"]}
  105. ],
  106. "additionalProperties": true
  107. }
  108. },
  109. "additionalProperties": true
  110. },
  111. "windows": {"type": "array", "minItems": 42, "maxItems": 42, "items": {"$ref": "#/$defs/window"}},
  112. "raw_samples": {"$ref": "#/$defs/rawSamples"},
  113. "correlation": {"$ref": "#/$defs/correlation"},
  114. "rpm": {"$ref": "#/$defs/rpm"},
  115. "ptc": {"$ref": "#/$defs/ptc"},
  116. "evidence_binding": {"$ref": "#/$defs/evidenceBinding"}
  117. },
  118. "additionalProperties": true
  119. },
  120. "window": {
  121. "type": "object",
  122. "required": ["index", "start_s", "end_s", "continuous", "snapshot_seq", "overflow_mask"],
  123. "properties": {
  124. "index": {"type": "integer", "minimum": 0},
  125. "start_s": {"type": "number"},
  126. "end_s": {"type": "number"},
  127. "continuous": {"const": true},
  128. "snapshot_seq": {"type": "integer", "minimum": 0, "maximum": 4294967295},
  129. "overflow_mask": {"type": "integer", "minimum": 0, "maximum": 255}
  130. },
  131. "additionalProperties": true
  132. },
  133. "fanSample": {
  134. "type": "object",
  135. "required": ["window_edges", "rpm"],
  136. "properties": {
  137. "window_edges": {"type": "integer", "minimum": 0},
  138. "rpm": {"type": "number", "minimum": 0}
  139. },
  140. "additionalProperties": true
  141. },
  142. "rawSample": {
  143. "type": "object",
  144. "required": ["fan_setting_percent", "snapshot_seq", "overflow_mask", "FG5", "FG6"],
  145. "properties": {
  146. "fan_setting_percent": {"enum": [0, 20, 40, 60, 80, 100]},
  147. "snapshot_seq": {"type": "integer", "minimum": 0, "maximum": 4294967295},
  148. "overflow_mask": {"type": "integer", "minimum": 0, "maximum": 255},
  149. "FG5": {"$ref": "#/$defs/fanSample"},
  150. "FG6": {"$ref": "#/$defs/fanSample"}
  151. },
  152. "additionalProperties": true
  153. },
  154. "rawSamples": {
  155. "type": "array",
  156. "minItems": 30,
  157. "maxItems": 30,
  158. "items": {"$ref": "#/$defs/rawSample"}
  159. },
  160. "correlation": {
  161. "type": "object",
  162. "required": ["spearman_rho", "low_mean_rpm", "high_mean_rpm", "high_significantly_higher", "samples"],
  163. "properties": {
  164. "spearman_rho": {"type": "number", "minimum": -1, "maximum": 1},
  165. "low_mean_rpm": {"type": "number", "minimum": 0},
  166. "high_mean_rpm": {"type": "number", "minimum": 0},
  167. "high_significantly_higher": {"const": true},
  168. "samples": {
  169. "type": "array",
  170. "minItems": 6,
  171. "maxItems": 6,
  172. "items": {
  173. "type": "object",
  174. "required": ["fan_setting_percent", "rpm"],
  175. "properties": {
  176. "fan_setting_percent": {"type": "number"},
  177. "rpm": {"type": "number", "minimum": 0}
  178. },
  179. "additionalProperties": true
  180. }
  181. }
  182. },
  183. "additionalProperties": true
  184. },
  185. "rpm": {
  186. "type": "object",
  187. "required": ["status", "reason"],
  188. "properties": {"status": {"const": "not_qualified"}, "reason": {"type": "string", "minLength": 1}},
  189. "additionalProperties": true
  190. },
  191. "ptc": {
  192. "type": "object",
  193. "required": ["actuation", "measurement"],
  194. "properties": {"actuation": {"const": true}, "measurement": {"const": "not_run"}},
  195. "additionalProperties": true
  196. },
  197. "artifactBinding": {
  198. "type": "object",
  199. "required": ["path", "sha256"],
  200. "properties": {
  201. "path": {"type": "string", "minLength": 1},
  202. "sha256": {"type": "string", "pattern": "^[0-9a-fA-F]{64}$"},
  203. "status": {"type": "string"}
  204. },
  205. "additionalProperties": true
  206. },
  207. "staticQualificationLayer": {
  208. "type": "object",
  209. "required": ["status", "artifacts"],
  210. "properties": {
  211. "status": {"const": "pass"},
  212. "artifacts": {"type": "object", "minProperties": 1, "additionalProperties": {"$ref": "#/$defs/artifactBinding"}}
  213. },
  214. "additionalProperties": true
  215. },
  216. "staticQualification": {
  217. "type": "object",
  218. "required": ["schema", "status", "profile", "profile_id", "layers", "variants", "failures"],
  219. "properties": {
  220. "schema": {"const": "prod2u-p4-static-qualification-v1"},
  221. "status": {"const": "pass"},
  222. "profile": {"const": "prod2u-fan-tach-binary921-v2"},
  223. "profile_id": {"const": 4},
  224. "layers": {
  225. "type": "object",
  226. "required": ["source", "protocol", "rtl", "formal", "td_normal", "td_trace", "package"],
  227. "properties": {
  228. "source": {"$ref": "#/$defs/staticQualificationLayer"},
  229. "protocol": {"$ref": "#/$defs/staticQualificationLayer"},
  230. "rtl": {"$ref": "#/$defs/staticQualificationLayer"},
  231. "formal": {"$ref": "#/$defs/staticQualificationLayer"},
  232. "td_normal": {"$ref": "#/$defs/staticQualificationLayer"},
  233. "td_trace": {"$ref": "#/$defs/staticQualificationLayer"},
  234. "package": {"$ref": "#/$defs/staticQualificationLayer"}
  235. },
  236. "additionalProperties": false
  237. },
  238. "variants": {"type": "object"},
  239. "failures": {"type": "array", "maxItems": 0, "items": {"type": "string"}}
  240. },
  241. "additionalProperties": true
  242. },
  243. "receiptBinding": {
  244. "allOf": [
  245. {"$ref": "#/$defs/artifactBinding"},
  246. {"required": ["status"], "properties": {"status": {"const": "pass"}}}
  247. ]
  248. },
  249. "bindingIdentity": {
  250. "type": "object",
  251. "required": ["dut_id", "build_id", "bitstream_sha256", "variant", "profile", "source_manifest_sha256"],
  252. "properties": {
  253. "dut_id": {"type": "string", "minLength": 1},
  254. "build_id": {"type": "string", "minLength": 1},
  255. "bitstream_sha256": {"type": "string", "pattern": "^[0-9a-fA-F]{64}$"},
  256. "variant": {"enum": ["trace", "normal"]},
  257. "profile": {"type": "string", "minLength": 1},
  258. "source_manifest_sha256": {"type": "string", "pattern": "^[0-9a-fA-F]{64}$"}
  259. },
  260. "additionalProperties": true
  261. },
  262. "evidenceBinding": {
  263. "type": "object",
  264. "required": ["programmer_receipt", "pre_program_raw", "combined_rx_raw", "raw_transcript", "td_receipt", "source_manifest", "package_manifest", "package_inventory", "identity"],
  265. "properties": {
  266. "programmer_receipt": {"$ref": "#/$defs/receiptBinding"},
  267. "pre_program_raw": {"$ref": "#/$defs/artifactBinding"},
  268. "combined_rx_raw": {"$ref": "#/$defs/artifactBinding"},
  269. "raw_transcript": {"$ref": "#/$defs/artifactBinding"},
  270. "td_receipt": {"$ref": "#/$defs/artifactBinding"},
  271. "source_manifest": {"$ref": "#/$defs/artifactBinding"},
  272. "package_manifest": {"$ref": "#/$defs/artifactBinding"},
  273. "package_inventory": {"$ref": "#/$defs/artifactBinding"},
  274. "identity": {"$ref": "#/$defs/bindingIdentity"}
  275. },
  276. "additionalProperties": true
  277. }
  278. }
  279. }