Skip to content

Commit 907539b

Browse files
Merge branch 'master' into feature-remove-warnings
2 parents 04f5b84 + 3dd2d4e commit 907539b

File tree

707 files changed

+16158
-8320
lines changed

Some content is hidden

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

707 files changed

+16158
-8320
lines changed

.clang-format

+5-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ AllowShortIfStatementsOnASingleLine: true
1515
AllowShortLoopsOnASingleLine: false
1616
AlwaysBreakAfterDefinitionReturnType: None
1717
AlwaysBreakAfterReturnType: None
18-
AlwaysBreakBeforeMultilineStrings: true
18+
AlwaysBreakBeforeMultilineStrings: false
1919
AlwaysBreakTemplateDeclarations: true
2020
BinPackArguments: true
2121
BinPackParameters: false
@@ -34,7 +34,7 @@ BraceWrapping:
3434
SplitEmptyFunction: false
3535
SplitEmptyRecord: true
3636
SplitEmptyNamespace: true
37-
BreakBeforeBinaryOperators: All
37+
BreakBeforeBinaryOperators: NonAssignment
3838
BreakBeforeBraces: Custom
3939
BreakBeforeInheritanceComma: false
4040
BreakBeforeTernaryOperators: true
@@ -68,10 +68,11 @@ IncludeIsMainRegex: '([-_](test|unittest))?$'
6868
IndentCaseLabels: true
6969
IndentWidth: 4
7070
IndentWrappedFunctionNames: false
71-
IndentPPDirectives: AfterHash
71+
IndentPPDirectives: None
72+
InsertNewlineAtEOF: true
7273
JavaScriptQuotes: Leave
7374
JavaScriptWrapImports: true
74-
KeepEmptyLinesAtTheStartOfBlocks: false
75+
KeepEmptyLinesAtTheStartOfBlocks: true
7576
MacroBlockBegin: ''
7677
MacroBlockEnd: ''
7778
MaxEmptyLinesToKeep: 1

.github/scripts/install_dependencies.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ sudo apt install -y \
5555
clang-16 \
5656
clang-17 \
5757
clang-18 \
58-
clang-format-14 \
58+
clang-format-18 \
5959
libtbb-dev
6060

6161
pip install -r requirements.txt

.github/workflows/nightly_test.yml

-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ on:
2222
# - '**.md'
2323
# - '**.rst'
2424
workflow_dispatch:
25-
schedule:
26-
- cron: '0 0 * * *' # daily
2725

2826
# We want to cancel previous runs for a given PR or branch / ref if another CI
2927
# run is requested.

.github/workflows/nightly_test_manual.yml

+7
Original file line numberDiff line numberDiff line change
@@ -63,37 +63,44 @@ jobs:
6363
# TODO: We could expose more parallelism if we had one task list which ran
6464
# all of these.
6565
- name: 'Run Nightly Test 1'
66+
if: success() || failure()
6667
run: |
6768
source .venv/bin/activate
6869
./run_reg_test.py -j12 vtr_reg_nightly_test1
6970
7071
- name: 'Run Nightly Test 2'
72+
if: success() || failure()
7173
run: |
7274
source .venv/bin/activate
7375
./run_reg_test.py -j12 vtr_reg_nightly_test2
7476
7577
- name: 'Run Nightly Test 3'
78+
if: success() || failure()
7679
run: |
7780
source .venv/bin/activate
7881
./run_reg_test.py -j12 vtr_reg_nightly_test3
7982
8083
8184
- name: 'Run Nightly Test 4'
85+
if: success() || failure()
8286
run: |
8387
source .venv/bin/activate
8488
./run_reg_test.py -j12 vtr_reg_nightly_test4
8589
8690
- name: 'Run Nightly Test 5'
91+
if: success() || failure()
8792
run: |
8893
source .venv/bin/activate
8994
./run_reg_test.py -j12 vtr_reg_nightly_test5
9095
9196
- name: 'Run Nightly Test 6'
97+
if: success() || failure()
9298
run: |
9399
source .venv/bin/activate
94100
./run_reg_test.py -j12 vtr_reg_nightly_test6
95101
96102
- name: 'Run Nightly Test 7'
103+
if: success() || failure()
97104
run: |
98105
source .venv/bin/activate
99106
./run_reg_test.py -j12 vtr_reg_nightly_test7

.github/workflows/stale.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: 'Close Stale Issues'
2+
on:
3+
schedule:
4+
# Run everyday at 1 PM UTC
5+
- cron: '0 13 * * *'
6+
7+
jobs:
8+
stale:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/stale@v9
12+
with:
13+
# The message to be shown for stale issues
14+
stale-issue-message: 'This issue has been inactive for a year and has been marked as stale. It will be closed in 15 days if it continues to be stale. If you believe this is still an issue, please add a comment.'
15+
close-issue-message: 'This issue has been marked stale for 15 days and has been automatically closed.'
16+
# If you want to exempt an issue from being marked stale/deleted, label it as 'no-stale'
17+
exempt-issue-labels: 'no-stale'
18+
days-before-issue-stale: 365
19+
days-before-issue-close: 15
20+
# Start from the oldest issues
21+
ascending: true
22+
23+
# The configuration below can be used to allow the same behaviour with PRs.
24+
# Since we currently don't want to close old PRs, it is commented out but
25+
# left here in case we change our mind.
26+
27+
# stale-pr-message: 'This PR has been inactive for a year and has been marked as stale. It will be closed in 15 days if it continues to be stale. If you are still working on this PR, please add a comment.'
28+
# close-pr-message: 'This PR has been marked stale for 15 days and has been automatically closed.'
29+
# exempt-pr-labels: 'no-stale'
30+
# days-before-pr-stale: 365
31+
# days-before-pr-close: 15

.github/workflows/test.yml

+2
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ jobs:
8989
with:
9090
python-version: 3.10.10
9191
- uses: actions/checkout@v4
92+
with:
93+
submodules: 'true'
9294

9395
- name: Install dependencies
9496
run: ./.github/scripts/install_dependencies.sh

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ This information helps us to quickly reproduce (and hopefully fix) the issue:
7777

7878
Tell us what version of VTR you are using (e.g. the output of `vpr --version`), which Operating System and compiler you are using, or any other relevant information about where or how you are building/running VTR.
7979

80-
Once you've gathered all the information [open an Issue](https://github.com/verilog-to-routing/vtr-verilog-to-routing/issues/new?template=bug_report.md) on our issue tracker.
80+
Once you've gathered all the information [open an Issue](https://github.com/verilog-to-routing/vtr-verilog-to-routing/issues/new?template=bug_report.md) on our issue tracker. Issues that do not have any activity for a year will be automatically marked as stale and will be closed after 15 days of being marked as stale.
8181

8282
If you know how to fix the issue, or already have it coded-up, please also consider [submitting the fix](#submitting-code-to-vtr).
8383
This is likely the fastest way to get bugs fixed!

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ ifeq ($(VERBOSE),1)
4848
override CMAKE_PARAMS := -DVTR_ENABLE_VERBOSE=on ${CMAKE_PARAMS}
4949
endif
5050

51-
# -s : Suppresss makefile output (e.g. entering/leaving directories)
51+
# -s : Suppresses makefile output (e.g. entering/leaving directories)
5252
# --output-sync target : For parallel compilation ensure output for each target is synchronized (make version >= 4.0)
5353
MAKEFLAGS := -s
5454

5555
SOURCE_DIR := $(PWD)
5656
BUILD_DIR ?= build
5757

58-
#Check for the cmake exectuable
58+
#Check for the cmake executable
5959
CMAKE := $(shell command -v cmake 2> /dev/null)
6060

6161
#Show test log on failures with 'make test'

cmake/modules/AutoClangFormat.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ add_custom_target(format-cpp-files
2121
COMMAND find ${DIRS_TO_FORMAT_CPP} ${FIND_TO_FORMAT_CPP})
2222

2323
#
24-
# Use clang-format-14 for code format
24+
# Use clang-format for code format
2525
#
2626
add_custom_target(format-cpp
2727
COMMAND find ${DIRS_TO_FORMAT_CPP} ${FIND_TO_FORMAT_CPP} |
28-
xargs -P ${CPU_COUNT} clang-format-14 -style=file -i)
28+
xargs -P ${CPU_COUNT} clang-format-18 -style=file -i)
2929

3030
#
3131
# Use simple python script for fixing C like boxed comments

dev/pylint_check.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def expand_paths():
132132
"""Build a list of all python files to process by going through 'paths_to_lint'"""
133133

134134
paths = []
135-
for (path, is_recursive) in paths_to_lint:
135+
for path, is_recursive in paths_to_lint:
136136
# Make sure all hard-coded paths point to .py files
137137
if path.is_file():
138138
if path.suffix.lower() != ".py":

dev/submit_slurm.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def get_resource_estimates(filepath):
188188
mem_bytes = float(match.groupdict()["mem_bytes"])
189189

190190
time_minutes = time_sec / 60
191-
mem_mb = mem_bytes / (1024 ** 2)
191+
mem_mb = mem_bytes / (1024**2)
192192

193193
return time_minutes, mem_mb
194194

dev/vtr_gdb_pretty_printers.py

+2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
88
https://docs.verilogtorouting.org/en/latest/dev/developing#vtr-pretty-printers
99
"""
10+
1011
import re
1112

13+
1214
# VTR related
1315
class VtrStrongIdPrinter:
1416
def __init__(self, val, typename="vtr::StrongId"):

doc/src/api/vpr/mapping.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
===============
22
Netlist mapping
33
===============
4-
As shown in the previous section, there are multiple levels of abstraction (multiple netlists) in VPR which are the ClusteredNetlist and the AtomNetlist. To fully use these netlists, we provide some functions to map between them.
4+
As shown in the previous section, there are multiple levels of abstraction (multiple netlists) in VPR which are the ClusteredNetlist and the AtomNetlist. To fully use these netlists, we provide some functions to map between them.
55

66
In this section, we will state how to map between the atom and clustered netlists.
77

@@ -16,11 +16,11 @@ To get the block Id of a cluster in the ClusteredNetlist from the block Id of on
1616

1717
.. code-block:: cpp
1818
19-
ClusterBlockId clb_index = g_vpr_ctx.atom().lookup.atom_clb(atom_blk_id);
19+
ClusterBlockId clb_index = g_vpr_ctx.atom().lookup().atom_clb(atom_blk_id);
2020
2121
2222
* Using re_cluster_util.h helper functions
23-
23+
2424
.. code-block:: cpp
2525
2626
ClusterBlockId clb_index = atom_to_cluster(atom_blk_id);
@@ -53,7 +53,7 @@ To get the net Id in the ClusteredNetlist from its Id in the AtomNetlist, use At
5353

5454
.. code-block:: cpp
5555
56-
ClusterNetId clb_net = g_vpr_ctx.atom().lookup.clb_net(atom_net);
56+
ClusterNetId clb_net = g_vpr_ctx.atom().lookup().clb_net(atom_net);
5757
5858
5959
Cluster net Id to Atom net Id
@@ -62,4 +62,4 @@ To get the net Id in the AtomNetlist from its Id in the ClusteredNetlist, use At
6262

6363
.. code-block:: cpp
6464
65-
ClusterNetId atom_net = g_vpr_ctx.atom().lookup.atom_net(clb_net);
65+
ClusterNetId atom_net = g_vpr_ctx.atom().lookup().atom_net(clb_net);

doc/src/api/vtrutil/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ VTRUTIL API
1111
container_utils
1212
logging
1313
geometry
14+
parallel
1415
other

doc/src/api/vtrutil/parallel.rst

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=====
2+
Parallel
3+
=====
4+
5+
vtr_thread_pool
6+
-------------
7+
.. doxygenfile:: vtr_thread_pool.h
8+
:project: vtr
9+
:sections: briefdescription detaileddescription func innernamespace enum
10+
11+
.. doxygenclass:: vtr::thread_pool
12+
:project: vtr
13+
:members:

doc/src/arch/reference.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ Each tile type is specified with the ``<tile>`` tag withing the ``<tiles>`` tag.
849849
850850
Tile
851851
~~~~
852-
.. arch:tag:: <tile name="string" capacity="int" width="int" height="int" area="float"/>
852+
.. arch:tag:: <tile name="string" width="int" height="int" area="float"/>
853853
854854
A tile refers to a placeable element within an FPGA architecture and describes its physical compositions on the grid.
855855
The following attributes are applicable to each tile.

doc/src/vpr/command_line_usage.rst

+90-1
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,14 @@ Use the options below to override this default naming behaviour.
379379

380380
.. seealso:: :ref:`Routing Resource XML File <vpr_route_resource_file>`.
381381

382+
.. option:: --read_rr_edge_override <file>
383+
384+
Reads a file that overrides the intrinsic delay of specific edges in RR graph.
385+
386+
This option should be used with both :option:`--read_rr_graph` and :option:`--write_rr_graph`. When used this way,
387+
VPR reads the RR graph, updates the delays of selected edges using :option:`--read_rr_edge_override`,
388+
and writes the updated RR graph. The modified RR graph can then be used in later VPR runs.
389+
382390
.. option:: --read_vpr_constraints <file>
383391

384392
Reads the :ref:`VPR constraints <vpr_constraints>` that the flow must respect from the specified XML file.
@@ -657,7 +665,7 @@ For people not working on CAD, you can probably leave all the options to their d
657665

658666
.. note::
659667

660-
If a pin utilization target is unspecified it defaults to 1.0 (i.e. 100% utilization).
668+
If some pin utilizations are specified, ``auto`` mode is turned off and the utilization target for any unspecified pin types defaults to 1.0 (i.e. 100% utilization).
661669

662670
For example:
663671

@@ -926,6 +934,13 @@ If any of init_t, exit_t or alpha_t is specified, the user schedule, with a fixe
926934

927935
**Default:** ``move_block_type``
928936

937+
.. option:: --place_quench_only {on | off}
938+
939+
If this option is set to ``on``, the placement will skip the annealing phase and only perform the placement quench.
940+
This option is useful when the the quality of initial placement is good enough and there is no need to perform the
941+
annealing phase.
942+
943+
**Default:** ``off``
929944

930945

931946
.. option:: --placer_debug_block <int>
@@ -1188,6 +1203,44 @@ Analytical Placement is generally split into three stages:
11881203

11891204
Analytical Placement is experimental and under active development.
11901205

1206+
.. option:: --ap_analytical_solver {qp-hybrid | lp-b2b}
1207+
1208+
Controls which Analytical Solver the Global Placer will use in the AP Flow.
1209+
The Analytical Solver solves for a placement which optimizes some objective
1210+
function, ignorant of the FPGA legality constraints. This provides a "lower-
1211+
bound" solution. The Global Placer will legalize this solution and feed it
1212+
back to the analytical solver to make its solution more legal.
1213+
1214+
* ``qp-hybrid`` Solves for a placement that minimizes the quadratic HPWL of
1215+
the flat placement using a hybrid clique/star net model (as described in
1216+
FastPlace :cite:`Viswanathan2005_FastPlace`).
1217+
Uses the legalized solution as anchor-points to pull the solution to a
1218+
more legal solution (similar to the approach from SimPL :cite:`Kim2013_SimPL`).
1219+
1220+
* ``lp-b2b`` Solves for a placement that minimizes the linear HPWL of the
1221+
flat placement using the Bound2Bound net model (as described in Kraftwerk2 :cite:`Spindler2008_Kraftwerk2`).
1222+
Uses the legalized solution as anchor-points to pull the solution to a
1223+
more legal solution (similar to the approach from SimPL :cite:`Kim2013_SimPL`).
1224+
1225+
**Default:** ``lp-b2b``
1226+
1227+
.. option:: --ap_partial_legalizer {bipartitioning | flow-based}
1228+
1229+
Controls which Partial Legalizer the Global Placer will use in the AP Flow.
1230+
The Partial Legalizer legalizes a placement generated by an Analytical Solver.
1231+
It is used within the Global Placer to guide the solver to a more legal
1232+
solution.
1233+
1234+
* ``bipartitioning`` Creates minimum windows around over-dense regions of
1235+
the device bi-partitions the atoms in these windows such that the region
1236+
is no longer over-dense and the atoms are in tiles that they can be placed
1237+
into.
1238+
1239+
* ``flow-based`` Flows atoms from regions that are overfilled to regions that
1240+
are underfilled.
1241+
1242+
**Default:** ``bipartitioning``
1243+
11911244
.. option:: --ap_full_legalizer {naive | appack}
11921245

11931246
Controls which Full Legalizer to use in the AP Flow.
@@ -1198,6 +1251,42 @@ Analytical Placement is generally split into three stages:
11981251

11991252
**Default:** ``appack``
12001253

1254+
.. option:: --ap_detailed_placer {none | annealer}
1255+
1256+
Controls which Detailed Placer to use in the AP Flow.
1257+
1258+
* ``none`` Do not use any Detailed Placer.
1259+
1260+
* ``annealer`` Use the Annealer from the Placement stage as a Detailed Placer. This will use the same Placer Options from the Place stage to configure the annealer.
1261+
1262+
**Default:** ``annealer``
1263+
1264+
.. option:: --ap_timing_tradeoff <float>
1265+
1266+
Controls the trade-off between wirelength (HPWL) and delay minimization in the AP flow.
1267+
1268+
A value of 0.0 makes the AP flow focus completely on wirelength minimization,
1269+
while a value of 1.0 makes the AP flow focus completely on timing optimization.
1270+
1271+
**Default:** ``0.5``
1272+
1273+
.. option:: --ap_verbosity <int>
1274+
1275+
Controls the verbosity of the AP flow output.
1276+
Larger values produce more detailed output, which may be useful for
1277+
debugging the algorithms in the AP flow.
1278+
1279+
* ``1 <= verbosity < 10`` Print standard, stage-level messages. This will
1280+
print messages at the GP, FL, or DP level.
1281+
1282+
* ``10 <= verbosity < 20`` Print more detailed messages of what is happening
1283+
within stages. For example, show high-level information on the legalization
1284+
iterations within the Global Placer.
1285+
1286+
* ``20 <= verbosity`` Print very detailed messages on intra-stage algorithms.
1287+
1288+
**Default:** ``1``
1289+
12011290

12021291
.. _router_options:
12031292

0 commit comments

Comments
 (0)