feat(flow): run synthesis LEC before floorplan - #259
Merged
Conversation
Insert Yosys LEC after Synthesis in the default rtl2gds chain. Read mapped netlists with -icells and split ports with -format _ so LEC matches the synthesis netlist contract.
The hand-written two-step Synthesis+Floorplan ledger is no longer a contiguous slice of the canonical chain now that the synthesis LEC step sits between them, so migrate rejected every fixture workspace with flow_mismatch. Cut the ledger from the real chain instead of hardcoding step names; states keep their (first, last) semantics and interior steps inherit the first state.
Replace the hardcoded 11-step RTL2GDS_NAMES literal with names derived from the rtl2gds/rcx presets, and cut the Success/Unstart split by step name instead of positional counts so inserting the lec step cannot silently shift the state boundaries.
The hardcoded 11-step ledger stopped being a prefix of the canonical chain once the synthesis LEC step landed, so every reconcile test hit flow_mismatch. Cut RTL2GDS_STEPS from the rtl2gds preset and the RCX_SUFFIX from the rcx preset's tail instead of duplicating step names, and express the state splits by derived lengths instead of positional counts.
The TestWorkspaceNoOp fixture indexed the harden chain at fixed positions 11-12 to split the rtl2gds target from the RCX/sta extras; the synthesis LEC step shifted every index by one. Split by the derived rtl2gds length instead.
The Synth..CTS display range now expands to the canonical slice that includes the synthesis LEC step.
The default-flow contract test keeps its literal expectation and gains the (LEC, yosys_lec) step between Synthesis and Floorplan.
Yell-walkalone
approved these changes
Sep 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
Default
rtl2gdsnow proves synthesis LEC before physical design, and Yosys LEC reads mapped netlists the same way synthesis writes them.LEC(yosys_lec) immediately afterSYNTHESISinbuild_rtl2gds_flow().rcxandhardeninherit this because they start from that builder.EngineFlowalready skipsyosys_lecwhen chaining physical I/O, so Floorplan still consumes Synthesis outputs; a LEC step after Synthesis already uses the synthesis golden netlist.run_lec.tcl, changesplitnets -portsfrom-format __vto-format _so LEC matches the synthesis final netlist (splitnets -format _ -ports).__vis the internal-net format used earlier in synthesis, and it would make gold/gate port bits disagree (foo_0vsfoo__v0).read_verilog -sv -icellsafter liberty models are loaded, so mapped standard-cell instances stay cells instead of unknown modules.Resulting default
rtl2gdschain:SYNTHESIS → LEC → FLOORPLAN → PLACEMENT → CTS → LEGALIZATION → TIMING_OPT → ROUTING → DRC → LVS → FILLER → POST_ROUTE_LECsynthesis_lecalready had this post-synth LEC step; this PR turns it on for the physical presets as well.Scope
Select the areas touched by this PR:
uv.lock, or release artifacts.Runtime And Packaging Impact
ecc-toolsorecc-dreamplacedependency changedNotes:
rtl2gds/rcx/hardengain alec_yosys_lecstep between Synthesis and Floorplan. Existing workspaces keep their persisted step list until reconcile/rebuild.synthesis_lecand post-route LEC.rtl2gdsasSYNTHESIS → FLOORPLAN → .... Tests that pin the exact default step list are not updated in this diff (test/rtl2gds/test_builder.py,test/engine/test_reconcile.pyRTL2GDS_STEPS, and any CLI continuation fixtures that hard-code the 11-step rtl2gds chain).Validation
List the commands you ran. Mark checks that are not applicable as N/A.
uv run pytest test/uv run ruff check chipcompiler testuv run ruff format --check chipcompiler testecc --help,ecc --version,ecc version --jsonnix run .#cli -- --helpSkipped checks and reason:
test_build_rtl2gds_flow_includes_lvs_after_drcand reconcile fixtures that assume Synthesis is followed by Floorplan.rtl2gds/ GCD LEC smoke was run, so mapped-netlist ingest (-icells+ portsplitnets -format _) is not proven on a real PDK netlist here.Checklist