Summary
ECC can mark a flow step Success even when the tool runner returned False. RCX is especially vulnerable because an empty output.spef list is explicitly considered successful.
I reproduced this by starting RCX without a valid predecessor database. iRCX logged database initialization failure, generated no SPEF, and left its internal substeps Unstart, but ECC reported the RCX step Success in 0.036 seconds.
Version
- ECC:
f783db8d8c4d22559993d27ddeac314fa35a58ca (current main / 0.1.0a10)
- ecc-tools:
33617742b6dbaaa4dd6711def4bf81d4920d3bfc
Reproduction
- Configure a hardening flow with RCX.
- Run
ecc run --only RCX --force when no valid routed database is available to the RCX step.
- Observe that iRCX logs database initialization failure and creates no SPEF.
- Observe that ECC records the step as successful.
Root cause
In chipcompiler/engine/flow.py, run_tool_step() returns a result which is logged but not used when determining state:
result = run_tool_step(...)
...
state = (
StateEnum.Success
if self.check_step_result(workspace_step=workspace_step)
else StateEnum.Imcomplete
)
test/test_engine_flow.py::test_rcx_succeeds_with_empty_spef_list also codifies that EccOutput(spef=[]) is successful. Together, a failed RCX invocation with no expected artifacts is indistinguishable from a valid step.
Expected behavior
- A
False tool result must make the step incomplete/failed.
- RCX should require at least one expected SPEF for every enabled analysis corner.
- The step should verify that every required SPEF exists, is non-empty, and is parseable.
- A hardening/signoff flow should not proceed after an invalid extraction stage.
Suggested regression tests
- A stub tool returns
False while its output list is empty: step must not be Success.
- RCX has zero expected SPEFs: step must not be
Success when RCX is enabled.
- RCX expects N corners but produces N-1 SPEFs: step must not be
Success.
Summary
ECC can mark a flow step
Successeven when the tool runner returnedFalse. RCX is especially vulnerable because an emptyoutput.speflist is explicitly considered successful.I reproduced this by starting RCX without a valid predecessor database. iRCX logged database initialization failure, generated no SPEF, and left its internal substeps
Unstart, but ECC reported the RCX stepSuccessin 0.036 seconds.Version
f783db8d8c4d22559993d27ddeac314fa35a58ca(currentmain/ 0.1.0a10)33617742b6dbaaa4dd6711def4bf81d4920d3bfcReproduction
ecc run --only RCX --forcewhen no valid routed database is available to the RCX step.Root cause
In
chipcompiler/engine/flow.py,run_tool_step()returns a result which is logged but not used when determining state:test/test_engine_flow.py::test_rcx_succeeds_with_empty_spef_listalso codifies thatEccOutput(spef=[])is successful. Together, a failed RCX invocation with no expected artifacts is indistinguishable from a valid step.Expected behavior
Falsetool result must make the step incomplete/failed.Suggested regression tests
Falsewhile its output list is empty: step must not beSuccess.Successwhen RCX is enabled.Success.