Skip to content

Commit 9ca4776

Browse files
committed
2 parents 06d02f4 + 1e479b9 commit 9ca4776

File tree

746 files changed

+19917
-9231
lines changed

Some content is hidden

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

746 files changed

+19917
-9231
lines changed

.clang-format

Lines changed: 5 additions & 4 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 4 deletions
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.
@@ -65,9 +63,9 @@ jobs:
6563
- {test: "vtr_reg_strong", cores: "16", options: "", cmake: "-DVTR_ASSERT_LEVEL=3", extra_pkgs: "libeigen3-dev"}
6664
- {test: "vtr_reg_strong_odin", cores: "16", options: "", cmake: "-DVTR_ASSERT_LEVEL=3 -DWITH_ODIN=ON", extra_pkgs: "libeigen3-dev"}
6765
- {test: "vtr_reg_strong_odin", cores: "16", options: "-skip_qor", cmake: "-DVTR_ASSERT_LEVEL=3 -DVTR_ENABLE_SANITIZE=ON -DWITH_ODIN=ON", extra_pkgs: "libeigen3-dev"}
68-
# - {test: "vtr_reg_system_verilog", cores: "16", options: "", cmake: "-DYOSYS_F4PGA_PLUGINS=ON", extra_pkgs: ""} # Test turned off -> F4PGA conflicts with Yosys (version 42)
66+
- {test: "vtr_reg_system_verilog", cores: "16", options: "", cmake: "-DSYNLIG_SYSTEMVERILOG=ON", extra_pkgs: ""}
6967
- {test: "odin_reg_strong", cores: "16", options: "", cmake: "-DWITH_ODIN=ON", extra_pkgs: ""}
70-
- {test: "parmys_reg_strong", cores: "16", options: "", cmake: "-DYOSYS_F4PGA_PLUGINS=OFF", extra_pkgs: ""}
68+
- {test: "parmys_reg_strong", cores: "16", options: "", cmake: "-DSYNLIG_SYSTEMVERILOG=ON", extra_pkgs: ""}
7169

7270
env:
7371
DEBIAN_FRONTEND: "noninteractive"
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: NightlyTestManual
2+
3+
# This workflow can only be dispatched.
4+
on:
5+
workflow_dispatch:
6+
7+
# Automatically runs every Sunday 5 AM UTC.
8+
# Results should be ready ~15 hours later (Sunday 8 PM UTC), on time for Monday mornings.
9+
schedule:
10+
- cron: '0 5 * * 0'
11+
12+
# We want to cancel previous runs for a given PR or branch / ref if another CI
13+
# run is requested.
14+
# See: https://docs.github.com/en/actions/using-jobs/using-concurrency
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17+
cancel-in-progress: true
18+
19+
env:
20+
# default compiler for all non-compatibility tests
21+
MATRIX_EVAL: "CC=gcc-13 && CXX=g++-13"
22+
23+
jobs:
24+
Run-tests:
25+
# Prevents from running on forks where no custom runners are available
26+
if: ${{ github.repository_owner == 'verilog-to-routing' }}
27+
28+
name: 'Nightly Tests Manual Run'
29+
# This workflow is expected to take around 19 hours. Giving it 24 hours
30+
# before timing out.
31+
timeout-minutes: 1440
32+
runs-on: [self-hosted, Linux, X64, SAVI]
33+
34+
steps:
35+
# Clean previous runs of this workflow.
36+
- name: 'Cleanup build folder'
37+
run: |
38+
rm -rf ./* || true
39+
rm -rf ./.??* || true
40+
41+
# Checkout the VTR repo.
42+
- uses: actions/checkout@v4
43+
with:
44+
submodules: 'true'
45+
46+
# Get the extra benchmarks
47+
- name: 'Get Extra Benchmarks'
48+
run: |
49+
make get_titan_benchmarks
50+
make get_ispd_benchmarks
51+
./dev/upgrade_vtr_archs.sh
52+
make get_symbiflow_benchmarks
53+
54+
# Build VTR using the default build options.
55+
- name: 'Build VTR'
56+
run: |
57+
make -j12
58+
make env
59+
source .venv/bin/activate
60+
pip install -r requirements.txt
61+
62+
# Run all of the nightly tests.
63+
# TODO: We could expose more parallelism if we had one task list which ran
64+
# all of these.
65+
- name: 'Run Nightly Test 1'
66+
if: success() || failure()
67+
run: |
68+
source .venv/bin/activate
69+
./run_reg_test.py -j12 vtr_reg_nightly_test1
70+
71+
- name: 'Run Nightly Test 2'
72+
if: success() || failure()
73+
run: |
74+
source .venv/bin/activate
75+
./run_reg_test.py -j12 vtr_reg_nightly_test2
76+
77+
- name: 'Run Nightly Test 3'
78+
if: success() || failure()
79+
run: |
80+
source .venv/bin/activate
81+
./run_reg_test.py -j12 vtr_reg_nightly_test3
82+
83+
84+
- name: 'Run Nightly Test 4'
85+
if: success() || failure()
86+
run: |
87+
source .venv/bin/activate
88+
./run_reg_test.py -j12 vtr_reg_nightly_test4
89+
90+
- name: 'Run Nightly Test 5'
91+
if: success() || failure()
92+
run: |
93+
source .venv/bin/activate
94+
./run_reg_test.py -j12 vtr_reg_nightly_test5
95+
96+
- name: 'Run Nightly Test 6'
97+
if: success() || failure()
98+
run: |
99+
source .venv/bin/activate
100+
./run_reg_test.py -j12 vtr_reg_nightly_test6
101+
102+
- name: 'Run Nightly Test 7'
103+
if: success() || failure()
104+
run: |
105+
source .venv/bin/activate
106+
./run_reg_test.py -j12 vtr_reg_nightly_test7

.github/workflows/stale.yml

Lines changed: 31 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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

.gitmodules

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[submodule "libs/EXTERNAL/libcatch2"]
22
path = libs/EXTERNAL/libcatch2
33
url = https://github.com/catchorg/Catch2.git
4+
5+
# fork where in branch v1.0.0_no_complication_warnings there are compilation warnings fixes for upstream tag v1.0.0 of sockpp
46
[submodule "libs/EXTERNAL/sockpp"]
57
path = libs/EXTERNAL/sockpp
6-
url = https://github.com/w0lek/sockpp.git # fork where in branch v1.0.0_no_complication_warnings there are compilation warnings fixes for upstream tag v1.0.0 of sockpp
8+
url = https://github.com/w0lek/sockpp.git

.gitpod.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ RUN apt-get update \
3030
python-lxml \
3131
qt5-default \
3232
wget \
33+
default-jre \
3334
&& apt-get clean \
3435
&& rm -rf /var/lib/apt/lists/*
3536

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ option(ODIN_SANITIZE "Enable building odin with sanitize flags" OFF)
6060

6161
# Allow the user to enable building Yosys
6262
option(WITH_PARMYS "Enable Yosys as elaborator and parmys-plugin as partial mapper" ON)
63-
option(YOSYS_F4PGA_PLUGINS "Enable building and installing Yosys SystemVerilog and UHDM plugins" OFF)
63+
option(SYNLIG_SYSTEMVERILOG "Enable building and installing Synlig SystemVerilog and UHDM plugins" OFF)
6464

6565
set(VTR_VERSION_MAJOR 9)
6666
set(VTR_VERSION_MINOR 0)
@@ -453,7 +453,7 @@ if(${WITH_ODIN})
453453
endif()
454454

455455
# handle cmake params to compile Yosys SystemVerilog/UHDM plugins
456-
if(${YOSYS_F4PGA_PLUGINS})
456+
if(${SYNLIG_SYSTEMVERILOG})
457457
# avoid compiling plugins in case the Parmys frontend is not active
458458
if(NOT ${WITH_PARMYS})
459459
message(SEND_ERROR "Utilizing SystemVerilog/UHDM plugins requires activating Parmys frontend. Please set WITH_PARMYS.")

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
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!

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ RUN apt-get update -qq \
1515
&& apt-get -y install --no-install-recommends \
1616
wget \
1717
ninja-build \
18+
default-jre \
1819
libeigen3-dev \
1920
libtbb-dev \
2021
python3-pip \

Makefile

Lines changed: 2 additions & 2 deletions
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'

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.

cmake/modules/AutoClangFormat.cmake

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 0 deletions
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/_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

0 commit comments

Comments
 (0)