Skip to content

Commit 47cd0b7

Browse files
Merge branch 'master' into improve-nightly-test
2 parents f2bbf35 + 7f0f9fc commit 47cd0b7

File tree

107 files changed

+1768
-1249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+1768
-1249
lines changed

README.developers.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,17 +301,29 @@ For the very large runs, you can submit your runs on a large cluster. A template
301301
a Slurm-managed cluster can be found under vtr_flow/tasks/slurm/
302302

303303
## Continuous integration (CI)
304+
305+
### Automatic (Github runner) CI tests
306+
304307
For the following tests, you can use remote servers instead of running them locally. Once the changes are pushed into the
305308
remote repository, or a PR is created, the [Test Workflow](https://github.com/verilog-to-routing/vtr-verilog-to-routing/blob/master/.github/workflows/test.yml)
306309
will be triggered. Many tests are included in the workflow, including:
307-
* [vtr_reg_nightly_test1-N](#vtr_reg_nightly_test1-N)
310+
* [vtr_reg_nightly_test1-N](#vtr_reg_nightly_test1-n)
308311
* [vtr_reg_strong](#vtr_reg_strong)
309312
* [vtr_reg_basic](#vtr_reg_basic)
310313
* odin_reg_strong
311314
* parmys_reg_basic
312315

313316
instructions on how to gather QoR results of CI runs can be found [here](#example-extracting-qor-data-from-ci-runs).
314317

318+
### Manual Nightly Tests
319+
320+
You can use remote servers to run the [vtr_reg_nightly_test1-7](#vtr_reg_nightly_test1-n) tests. These tests are triggered manually by going to the GitHub Actions menu, selecting the NightlyTestManual workflow and selecting run workflow on the branch you want to test. Once you do that, the [Nightly Test Manual Workflow](https://github.com/verilog-to-routing/vtr-verilog-to-routing/blob/master/.github/workflows/nightly_test_manual.yml) will be triggered. This run will take approximately 15 hours to complete and will cancel all other workflow runs for the same branch.
321+
322+
<img src="https://raw.githubusercontent.com/verilog-to-routing/vtr-verilog-to-routing/master/doc/src/dev/run_ci_manual/select_actions.png" alt="Select GitHub Actions menu" width="60%"/>
323+
<br/>
324+
<img src="https://raw.githubusercontent.com/verilog-to-routing/vtr-verilog-to-routing/master/doc/src/dev/run_ci_manual/select_workflow.png" alt="Select the NightlyTestManual workflow" width="30%"/>
325+
<img src="https://raw.githubusercontent.com/verilog-to-routing/vtr-verilog-to-routing/master/doc/src/dev/run_ci_manual/run_workflow.png" alt="Run the Workflow" width="30%"/>
326+
315327
#### Re-run CI Tests
316328
In the case that you want to re-run the CI tests, due to certain issues such as infrastructure failure,
317329
go to the "Action" tab and find your workflow under Test Workflow.

doc/_doxygen/vpr.dox

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ EXTRACT_ALL = YES
66
EXTRACT_PRIVATE = YES
77
EXTRACT_STATIC = YES
88
WARN_IF_UNDOCUMENTED = NO
9-
INPUT = ../../vpr
9+
INPUT = ../../vpr ../../libs/libarchfpga/
1010
RECURSIVE = YES
1111
GENERATE_HTML = NO
1212
GENERATE_LATEX = NO
53.5 KB
Loading
117 KB
Loading
52.5 KB
Loading

doc/src/vpr/command_line_usage.rst

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ VPR runs all stages of (pack, place, route, and analysis) if none of :option:`--
8989
as such, the :option:`--pack` and :option:`--place` options should not be set when this option is set.
9090
This flow requires that the device has a fixed size and some of the primitive blocks are fixed somewhere on the device grid.
9191

92+
.. seealso:: See :ref:`analytical_placement_options` for the options for this flow.
93+
9294
.. seealso:: See :ref:`Fixed FPGA Grid Layout <fixed_arch_grid_layout>` and :option:`--device` for how to fix the device size.
9395

9496
.. seealso:: See :ref:`VPR Placement Constraints <placement_constraints>` for how to fix primitive blocks in a design to the device grid.
@@ -1163,6 +1165,40 @@ The following options are only used when FPGA device and netlist contain a NoC r
11631165

11641166
**Default:** ``vpr_noc_placement_output.txt``
11651167

1168+
1169+
.. _analytical_placement_options:
1170+
1171+
Analytical Placement Options
1172+
^^^^^^^^^^^^^^^
1173+
Instead of Packing atoms into clusters and placing the clusters into valid tile
1174+
sites on the FPGA, Analytical Placement uses analytical techniques to place atoms
1175+
on the FPGA device by relaxing the constraints on where they can be placed. This
1176+
atom-level placement is then legalized into a clustered placement and passed into
1177+
the router in VPR.
1178+
1179+
Analytical Placement is generally split into three stages:
1180+
1181+
* Global Placement: Uses analytical techniques to place atoms on the FPGA grid.
1182+
1183+
* Full Legalization: Legalizes a flat (atom) placement into legal clusters placed on the FPGA grid.
1184+
1185+
* Detailed Placement: While keeping the clusters legal, performs optimizations on the clustered placement.
1186+
1187+
.. warning::
1188+
1189+
Analytical Placement is experimental and under active development.
1190+
1191+
.. option:: --ap_full_legalizer {naive | appack}
1192+
1193+
Controls which Full Legalizer to use in the AP Flow.
1194+
1195+
* ``naive`` Use a Naive Full Legalizer which will try to create clusters exactly where their atoms are placed.
1196+
1197+
* ``appack`` Use APPack, which takes the Packer in VPR and uses the flat atom placement to create better clusters.
1198+
1199+
**Default:** ``appack``
1200+
1201+
11661202
.. _router_options:
11671203

11681204
Router Options
@@ -1179,7 +1215,7 @@ VPR uses a negotiated congestion algorithm (based on Pathfinder) to perform rout
11791215
This means that during the routing stage, all nets, both intra- and inter-cluster, are routed directly from one primitive pin to another primitive pin.
11801216
This increases routing time but can improve routing quality by re-arranging LUT inputs and exposing additional optimization opportunities in architectures with local intra-cluster routing that is not a full crossbar.
11811217

1182-
**Default:** ``OFF`
1218+
**Default:** ``off``
11831219

11841220
.. option:: --max_router_iterations <int>
11851221

libs/libarchfpga/src/device_grid.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ struct t_grid_tile {
1919
const t_metadata_dict* meta = nullptr;
2020
};
2121

22-
///@brief DeviceGrid represents the FPGA fabric. It is used to get information about different layers and tiles.
23-
// TODO: All of the function that use helper functions of this class should pass the layer_num to the functions, and the default value of layer_num should be deleted eventually.
22+
23+
//TODO: All of the functions that use helper functions of this class should pass the layer_num to the functions, and the default value of layer_num should be deleted eventually.
24+
/**
25+
* @class DeviceGrid
26+
* @brief Represents the FPGA fabric. It is used to get information about different layers and tiles.
27+
*/
2428
class DeviceGrid {
2529
public:
2630
DeviceGrid() = default;

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ numpy
66
scipy
77
# Python linter and formatter
88
click==8.0.2 # Our version of black needs an older version of click (https://stackoverflow.com/questions/71673404/importerror-cannot-import-name-unicodefun-from-click)
9-
black==21.4b0
9+
black==24.3.0
1010
pylint==2.7.4
1111

1212
# Surelog

vpr/src/analytical_place/analytical_placement_flow.cpp

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ void run_analytical_placement_flow(t_vpr_setup& vpr_setup) {
6868
const UserPlaceConstraints& constraints = g_vpr_ctx.floorplanning().constraints;
6969

7070
// Run the prepacker
71-
Prepacker prepacker;
72-
prepacker.init(atom_nlist, device_ctx.logical_block_types);
71+
const Prepacker prepacker(atom_nlist, device_ctx.logical_block_types);
7372

7473
// Create the ap netlist from the atom netlist using the result from the
7574
// prepacker.
@@ -80,7 +79,8 @@ void run_analytical_placement_flow(t_vpr_setup& vpr_setup) {
8079

8180
// Run the Global Placer
8281
std::unique_ptr<GlobalPlacer> global_placer = make_global_placer(e_global_placer::SimPL,
83-
ap_netlist);
82+
ap_netlist,
83+
prepacker);
8484
PartialPlacement p_placement = global_placer->place();
8585

8686
// Verify that the partial placement is valid before running the full
@@ -93,17 +93,15 @@ void run_analytical_placement_flow(t_vpr_setup& vpr_setup) {
9393
device_ctx.grid.get_num_layers()));
9494

9595
// Run the Full Legalizer.
96-
FullLegalizer full_legalizer(ap_netlist,
97-
vpr_setup,
98-
device_ctx.grid,
99-
device_ctx.arch,
100-
atom_nlist,
101-
prepacker,
102-
device_ctx.logical_block_types,
103-
vpr_setup.PackerRRGraph,
104-
device_ctx.arch->models,
105-
device_ctx.arch->model_library,
106-
vpr_setup.PackerOpts);
107-
full_legalizer.legalize(p_placement);
96+
const t_ap_opts& ap_opts = vpr_setup.APOpts;
97+
std::unique_ptr<FullLegalizer> full_legalizer = make_full_legalizer(ap_opts.full_legalizer_type,
98+
ap_netlist,
99+
atom_nlist,
100+
prepacker,
101+
vpr_setup,
102+
*device_ctx.arch,
103+
device_ctx.grid,
104+
device_ctx.logical_block_types);
105+
full_legalizer->legalize(p_placement);
108106
}
109107

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* @file
3+
* @author Alex Singer
4+
* @date February 2025
5+
* @brief Enumerations used by the Analytical Placement Flow.
6+
*/
7+
8+
#pragma once
9+
10+
/**
11+
* @brief The type of a Full Legalizer.
12+
*
13+
* The Analytical Placement flow may implement different Full Legalizers. This
14+
* enum can select between these different Full Legalizers.
15+
*/
16+
enum class e_ap_full_legalizer {
17+
Naive, ///< The Naive Full Legalizer, which clusters atoms placed in the same tile and tries to place them in that tile according to the flat placement.
18+
APPack ///< The APPack Full Legalizer, which uses the flat placement to improve the Packer and Placer.
19+
};
20+

0 commit comments

Comments
 (0)