Skip to content

[Bug] Failed RCX with no SPEF can be marked Success #229

Description

@WilliamHHL

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

  1. Configure a hardening flow with RCX.
  2. Run ecc run --only RCX --force when no valid routed database is available to the RCX step.
  3. Observe that iRCX logs database initialization failure and creates no SPEF.
  4. 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

  1. A stub tool returns False while its output list is empty: step must not be Success.
  2. RCX has zero expected SPEFs: step must not be Success when RCX is enabled.
  3. RCX expects N corners but produces N-1 SPEFs: step must not be Success.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions