|
@@ -78,6 +78,7 @@ EXPECTED_CDC_FALSE_PATH_ENDPOINTS = frozenset(
|
|
|
"u_temperature_i2c/sda_sync[0]",
|
|
"u_temperature_i2c/sda_sync[0]",
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
|
|
+EXPECTED_CDC_INPUT_REGISTERS = 3
|
|
|
EXPECTED_FSM_AXES = {"x": 2, "y": 2}
|
|
EXPECTED_FSM_AXES = {"x": 2, "y": 2}
|
|
|
BUILD_ROOT_RELATIVE = Path("td") / PROFILE
|
|
BUILD_ROOT_RELATIVE = Path("td") / PROFILE
|
|
|
TD_SCRIPTS = {
|
|
TD_SCRIPTS = {
|
|
@@ -2266,7 +2267,7 @@ def structural_cdc_gate(
|
|
|
|
|
|
|
|
if async_reg_count != len(EXPECTED_CDC_SYNC_REGISTERS):
|
|
if async_reg_count != len(EXPECTED_CDC_SYNC_REGISTERS):
|
|
|
failures.append(f"async_reg_used:{async_reg_count}")
|
|
failures.append(f"async_reg_used:{async_reg_count}")
|
|
|
- if input_register_count != 0:
|
|
|
|
|
|
|
+ if input_register_count != EXPECTED_CDC_INPUT_REGISTERS:
|
|
|
failures.append(f"input_registers_used:{input_register_count}")
|
|
failures.append(f"input_registers_used:{input_register_count}")
|
|
|
if register_set != EXPECTED_CDC_SYNC_REGISTERS:
|
|
if register_set != EXPECTED_CDC_SYNC_REGISTERS:
|
|
|
failures.append("retained_sync_registers_mismatch")
|
|
failures.append("retained_sync_registers_mismatch")
|
|
@@ -2283,7 +2284,7 @@ def structural_cdc_gate(
|
|
|
"used": async_reg_count,
|
|
"used": async_reg_count,
|
|
|
},
|
|
},
|
|
|
"input_registers": {
|
|
"input_registers": {
|
|
|
- "status": "pass" if input_register_count == 0 else "fail",
|
|
|
|
|
|
|
+ "status": "pass" if input_register_count == EXPECTED_CDC_INPUT_REGISTERS else "fail",
|
|
|
"used": input_register_count,
|
|
"used": input_register_count,
|
|
|
},
|
|
},
|
|
|
"retained_sync_registers": {
|
|
"retained_sync_registers": {
|
|
@@ -2622,7 +2623,7 @@ def structural_resource_gate(
|
|
|
failures: list[str] = []
|
|
failures: list[str] = []
|
|
|
utilization = resources.get("utilization") if isinstance(resources, Mapping) else None
|
|
utilization = resources.get("utilization") if isinstance(resources, Mapping) else None
|
|
|
reported_resources = ("bram", "bram32k", "bram128k", "bram256k", "dsp")
|
|
reported_resources = ("bram", "bram32k", "bram128k", "bram256k", "dsp")
|
|
|
- exact_resources = {"pad": len(active_pin_contract()), "ireg": 0}
|
|
|
|
|
|
|
+ exact_resources = {"pad": len(active_pin_contract()), "ireg": EXPECTED_CDC_INPUT_REGISTERS}
|
|
|
if not isinstance(utilization, Mapping):
|
|
if not isinstance(utilization, Mapping):
|
|
|
failures.append("resource_report_missing")
|
|
failures.append("resource_report_missing")
|
|
|
else:
|
|
else:
|
|
@@ -2645,7 +2646,7 @@ def structural_resource_gate(
|
|
|
"bram256k": "reported_nonnegative_integer",
|
|
"bram256k": "reported_nonnegative_integer",
|
|
|
"dsp": "reported_nonnegative_integer",
|
|
"dsp": "reported_nonnegative_integer",
|
|
|
"pad": exact_resources["pad"],
|
|
"pad": exact_resources["pad"],
|
|
|
- "ireg": 0,
|
|
|
|
|
|
|
+ "ireg": EXPECTED_CDC_INPUT_REGISTERS,
|
|
|
},
|
|
},
|
|
|
"failures": failures,
|
|
"failures": failures,
|
|
|
}
|
|
}
|
|
@@ -3541,7 +3542,7 @@ def _td_final_failures(
|
|
|
cdc = structural.get("cdc") if isinstance(structural, Mapping) else None
|
|
cdc = structural.get("cdc") if isinstance(structural, Mapping) else None
|
|
|
expected_cdc = {
|
|
expected_cdc = {
|
|
|
"async_reg": 6,
|
|
"async_reg": 6,
|
|
|
- "input_registers": 0,
|
|
|
|
|
|
|
+ "input_registers": EXPECTED_CDC_INPUT_REGISTERS,
|
|
|
"retained_sync_registers": 6,
|
|
"retained_sync_registers": 6,
|
|
|
"first_stage_endpoints": 3,
|
|
"first_stage_endpoints": 3,
|
|
|
}
|
|
}
|
|
@@ -3559,7 +3560,10 @@ def _td_final_failures(
|
|
|
used = item.get("used") if isinstance(item, Mapping) else None
|
|
used = item.get("used") if isinstance(item, Mapping) else None
|
|
|
if not isinstance(used, int) or isinstance(used, bool) or used < 0:
|
|
if not isinstance(used, int) or isinstance(used, bool) or used < 0:
|
|
|
failures.append(prefix + f"resource:{name}:{used}")
|
|
failures.append(prefix + f"resource:{name}:{used}")
|
|
|
- for name, expected in {"pad": len(active_pin_contract()), "ireg": 0}.items():
|
|
|
|
|
|
|
+ for name, expected in {
|
|
|
|
|
+ "pad": len(active_pin_contract()),
|
|
|
|
|
+ "ireg": EXPECTED_CDC_INPUT_REGISTERS,
|
|
|
|
|
+ }.items():
|
|
|
item = utilization.get(name) if isinstance(utilization, Mapping) else None
|
|
item = utilization.get(name) if isinstance(utilization, Mapping) else None
|
|
|
used = item.get("used") if isinstance(item, Mapping) else None
|
|
used = item.get("used") if isinstance(item, Mapping) else None
|
|
|
if used != expected or isinstance(used, bool):
|
|
if used != expected or isinstance(used, bool):
|