Repository navigation
Make the device from the architectures, and add flat routing and the analytical placer to the staged flow - #2905
Open
ganeshgore wants to merge 4 commits into
Open
ganeshgore wants to merge 4 commits into
ganeshgore wants to merge 4 commits into
Conversation
ganeshgore
force-pushed
the
staged-flow-more
branch
from
December 1, 2026 03:42
f88c5ed to
8cfcec2
Compare
ganeshgore
force-pushed
the
staged-flow-more
branch
from
December 2, 2026 05:23
8cfcec2 to
64abde5
Compare
report_app_option --json, and the options of report_stage, give each option its flag on the command line of VPR (vpr_flag, e.g. --seed for place.seed), or null for an option of OpenFPGA. A program that holds options as the flags of VPR, e.g. a list of VPR options for a device, can then find the application option of each flag without a table of its own. AppOption.vpr_flag has it in the Python Session.
A grid made from a routing resource graph that was read (--read_rr_graph) is marked as fixed by it, and VPR then gives it back for every device that it makes in the process. Freeing a run now resets the grid, so that the next run, of another architecture or layout, makes its own.
A flow that a program or a model drives runs the stages one by one and routes with the channel width it is given. Session.fixed_width_refusal() says why such a flow does not run a command now, or None: vpr, which runs the whole flow in one command, and route (or analysis before a routing) while router.route_chan_width is not set, as VPR would then search for the smallest width. With flat_routing=False (a device that does not support flat routing) a route is refused while router.flat_routing is set. The shell and the rest of the Python API are unchanged. Also let RemoteSession.call() pass an option called name to the method: the name of the method is positional only.
…analytical placer The device (stage DEVICE) is now made as soon as the two architectures are read, before the circuit, so that the device can be looked at first. Reading the circuit makes it again with the design, and pack (or read_packing) is refused until a circuit is read, with the command to run. A checkpoint still needs the circuit. Flat routing (router.flat_routing) runs in the stage-by-stage flow as 'vpr --flat_routing on' does: route routes the atom netlist with the port equivalences turned off, and analysis syncs the clustering to the flat routing. The files, results, bitstream, fabric, testbench and SDC are those of the one-shot vpr command. report_run says routing.flat_routing. The new option place.placer chooses the placer: classic (pack, then place) or analytical, the analytical placement of VPR, which packs and places at once as 'vpr --analytical_place' does. With it, pack and place both run it and reach PACKED and PLACED together, and the two are one result: a change that drops the placement drops the packing too. The stages that are made again on fresh data run the analytical placer again, unless the packing was read from a file, as a checkpoint is restored. A placement is not read on its own on the packing of the analytical placer. report_run says the placer and the estimates of the global placement. The Python tests compare both with the vpr command on the golden designs, and check the run report, the files read back and the checkpoints.
tangxifan
force-pushed
the
staged-flow-more
branch
from
December 2, 2026 21:59
64abde5 to
a9c51e4
Compare
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.
Stacked on #2875 (base
gg_agent_api). It extends the flow that is run stage by stage so that it covers more of what the one-shotvprcommand does, and gives a program what it needs to drive it at a fixed channel width.What it adds
The device before the circuit
DEVICEis reached as soon as the two architectures are read, so that the device can be looked at before a design is chosen. Reading the circuit makes the device again with it;pack(andread_packing) is refused until a circuit is read, with the command to run.Flat routing
router.flat_routingruns in the staged flow asvpr --flat_routing ondoes: the atom netlist is routed with the port equivalences turned off, andanalysissyncs the clustering with the flat routing. The files, results, bitstream, fabric, testbench and SDC are those of the one-shot flow.report_runsaysrouting.flat_routing.The analytical placer
place.placer:classic(pack, then place) oranalytical(vpr --analytical_place). With it,packandplaceboth run the analytical placer and reachPACKEDandPLACEDtogether; the two are one result, so a change that drops the placement drops the packing too. A placement is not read on its own on such a packing.report_runsays the placer and the estimates of the global placement.For programs
report_app_option --json(andreport_stage) give each option its VPR flag (vpr_flag, e.g.--seed).Session.fixed_width_refusal(command, flat_routing=True)says why a flow that only routes at a fixed width does not run a command now (vpr, a route without a channel width, a flat route on a device that does not support it).Fixes found on the way
RemoteSession.call()passed an option callednameto itself.Tests
test_equivalencecompares the staged flow withvpr --flat_routing onon three more golden designs;test_flat_routing(run report, files read back, fabric/testbench/SDC, checkpoints) andtest_analytical_placement(equivalence withvpr --analytical_placeon all golden designs, what drops what, run report, checkpoints, a failure) are new;test_stagesandtest_run_reportcover the device without a circuit;test_fixed_widthcovers the refusals.test_openfpga_session(device without circuit, analytical placer),test_json_writerandtest_vpr_app_options(vpr_flag, place.placer).openfpga_flow/tasks/python_binding_testsand the ctest subset of the session, options, JSON and glob tests pass.Not included