Skip to content

Commit f3b49e7

Browse files
Merge branch 'master' into temp_place_est_chan_util
2 parents 898c73d + 5160a12 commit f3b49e7

File tree

3,875 files changed

+1269901
-31968
lines changed

Some content is hidden

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

3,875 files changed

+1269901
-31968
lines changed

.github/workflows/nightly_test_manual.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,25 @@ jobs:
112112
name: nightly_test_results
113113
path: |
114114
vtr_flow/**/*.log
115+
vtr_flow/**/vpr.out
115116
vtr_flow/**/parse_results*.txt
117+
118+
- name: Generate golden results
119+
if: success() || failure()
120+
run: |
121+
source .venv/bin/activate
122+
./run_reg_test.py vtr_reg_nightly_test1 -create_golden
123+
./run_reg_test.py vtr_reg_nightly_test2 -create_golden
124+
./run_reg_test.py vtr_reg_nightly_test3 -create_golden
125+
./run_reg_test.py vtr_reg_nightly_test4 -create_golden
126+
./run_reg_test.py vtr_reg_nightly_test5 -create_golden
127+
./run_reg_test.py vtr_reg_nightly_test6 -create_golden
128+
./run_reg_test.py vtr_reg_nightly_test7 -create_golden
129+
130+
- name: Upload golden results
131+
if: success() || failure()
132+
uses: actions/upload-artifact@v4
133+
with:
134+
name: nightly_tests_golden
135+
path: |
136+
vtr_flow/**/vtr_reg_nightly*/**/golden_results.txt

.github/workflows/test.yml

Lines changed: 87 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,26 @@ jobs:
9999
run: ./dev/${{ matrix.script }}
100100

101101

102-
UniTests:
102+
VerifyTestSuites:
103+
runs-on: ubuntu-24.04
104+
name: 'Verify Test Suites'
105+
steps:
106+
107+
- uses: actions/setup-python@v5
108+
with:
109+
python-version: 3.12.3
110+
111+
- uses: actions/checkout@v4
112+
# NOTE: We do not need sub-modules. This only verifies the tests, does not run them.
113+
114+
- name: 'Run test suite verification'
115+
run: |
116+
./dev/vtr_test_suite_verifier/verify_test_suites.py \
117+
-vtr_regression_tests_dir vtr_flow/tasks/regression_tests \
118+
-test_suite_info dev/vtr_test_suite_verifier/test_suites_info.json
119+
120+
121+
UnitTests:
103122
name: 'U: C++ Unit Tests'
104123
runs-on: ubuntu-24.04
105124
steps:
@@ -125,36 +144,90 @@ jobs:
125144
run: ./.github/scripts/unittest.sh
126145

127146

128-
Warnings:
129-
name: 'W: Check Compilation Warnings'
147+
# This test builds different variations of VTR (with different CMake Params)
148+
# and ensures that they can run the basic regression tests. This also ensures
149+
# that these build variations are warning clean.
150+
BuildVariations:
130151
runs-on: ubuntu-24.04
152+
name: 'B: Build Variations'
153+
env:
154+
# For the CI, we want all build variations to be warning clean.
155+
# NOTE: Need to turn IPO off due to false warnings being produced.
156+
COMMON_CMAKE_PARAMS: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off'
131157
steps:
132158

133159
- uses: actions/setup-python@v5
134160
with:
135161
python-version: 3.12.3
162+
136163
- uses: actions/checkout@v4
137164
with:
138165
submodules: 'true'
139166

140-
- name: Get number of CPU cores
167+
- name: 'Get number of CPU cores'
141168
uses: SimenB/github-actions-cpu-cores@v2
142169
id: cpu-cores
143170

144-
- name: Install dependencies
171+
- name: 'Install dependencies'
145172
run: ./.github/scripts/install_dependencies.sh
146173

147-
- uses: hendrikmuhs/[email protected]
174+
- name: 'ccache'
175+
uses: hendrikmuhs/[email protected]
148176

149-
- name: Test
177+
- name: 'Test with VTR_ASSERT_LEVEL 4'
178+
if: success() || failure()
150179
env:
151-
#In order to get compilation warnings produced per source file, we must do a non-IPO build
152-
#We also turn warnings into errors for this target by doing a strict compile
153-
CMAKE_PARAMS: "-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_STRICT_COMPILE=on -DVTR_IPO_BUILD=off"
180+
CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVTR_ASSERT_LEVEL=4"
154181
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
155182
run: |
183+
rm -f build/CMakeCache.txt
156184
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
157-
./.github/scripts/build.sh
185+
make -j${{ steps.cpu-cores.outputs.count}}
186+
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
187+
188+
- name: 'Test with NO_GRAPHICS'
189+
if: success() || failure()
190+
env:
191+
CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVPR_USE_EZGL=off"
192+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
193+
run: |
194+
rm -f build/CMakeCache.txt
195+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
196+
make -j${{ steps.cpu-cores.outputs.count}}
197+
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
198+
199+
- name: 'Test with NO_SERVER'
200+
if: success() || failure()
201+
env:
202+
CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVPR_USE_SERVER=off"
203+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
204+
run: |
205+
rm -f build/CMakeCache.txt
206+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
207+
make -j${{ steps.cpu-cores.outputs.count}}
208+
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
209+
210+
- name: 'Test with CAPNPROTO disabled'
211+
if: success() || failure()
212+
env:
213+
CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVTR_ENABLE_CAPNPROTO=off"
214+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
215+
run: |
216+
rm -f build/CMakeCache.txt
217+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
218+
make -j${{ steps.cpu-cores.outputs.count}}
219+
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
220+
221+
- name: 'Test with serial VPR_EXECUTION_ENGINE'
222+
if: success() || failure()
223+
env:
224+
CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVPR_EXECUTION_ENGINE=serial -DTATUM_EXECUTION_ENGINE=serial"
225+
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
226+
run: |
227+
rm -f build/CMakeCache.txt
228+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
229+
make -j${{ steps.cpu-cores.outputs.count}}
230+
./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
158231
159232
160233
Regression:
@@ -169,36 +242,12 @@ jobs:
169242
suite: 'vtr_reg_basic',
170243
extra_pkgs: ""
171244
},
172-
{
173-
name: 'Basic with highest assertion level',
174-
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=4 -DWITH_BLIFEXPLORER=on',
175-
suite: 'vtr_reg_basic',
176-
extra_pkgs: ""
177-
},
178245
{
179246
name: 'Basic_odin',
180247
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DWITH_PARMYS=OFF -DWITH_ODIN=on',
181248
suite: 'vtr_reg_basic_odin',
182249
extra_pkgs: ""
183250
},
184-
{
185-
name: 'Basic with NO_GRAPHICS',
186-
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVPR_USE_EZGL=off',
187-
suite: 'vtr_reg_basic',
188-
extra_pkgs: ""
189-
},
190-
{
191-
name: 'Basic with NO_SERVER',
192-
params: '-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVPR_USE_EZGL=on -DVPR_USE_SERVER=off',
193-
suite: 'vtr_reg_basic',
194-
extra_pkgs: ""
195-
},
196-
{
197-
name: 'Basic with CAPNPROTO disabled',
198-
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_CAPNPROTO=off',
199-
suite: 'vtr_reg_basic',
200-
extra_pkgs: ""
201-
},
202251
{
203252
name: 'Basic with VTR_ENABLE_DEBUG_LOGGING',
204253
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_DEBUG_LOGGING=on',
@@ -510,8 +559,9 @@ jobs:
510559
needs:
511560
- Build
512561
- Format
513-
- UniTests
514-
- Warnings
562+
- VerifyTestSuites
563+
- UnitTests
564+
- BuildVariations
515565
- Regression
516566
- Sanitized
517567
- Parmys

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@
66
[submodule "libs/EXTERNAL/sockpp"]
77
path = libs/EXTERNAL/sockpp
88
url = https://github.com/w0lek/sockpp.git
9+
10+
[submodule "libs/EXTERNAL/libezgl"]
11+
path = libs/EXTERNAL/libezgl
12+
url = https://github.com/verilog-to-routing/ezgl.git

.readthedocs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ build:
1919
tools:
2020
python: "3.11"
2121

22+
submodules:
23+
include: all
24+
2225
python:
2326
install:
2427
- requirements: doc/requirements.txt
28+
- requirements: requirements.txt

CMakeLists.txt

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ set_property(CACHE VTR_IPO_BUILD PROPERTY STRINGS auto on off)
2626
set(VTR_ASSERT_LEVEL "2" CACHE STRING "VTR assertion checking level. 0: no assertions, 1: fast assertions, 2: regular assertions, 3: additional assertions with noticeable run-time overhead, 4: all assertions (including those with significant run-time cost)")
2727
set_property(CACHE VTR_ASSERT_LEVEL PROPERTY STRINGS 0 1 2 3 4)
2828

29-
option(VTR_ENABLE_STRICT_COMPILE "Specifies whether compiler warnings should be treated as errors (e.g. -Werror)" OFF)
3029
option(VTR_ENABLE_SANITIZE "Enable address/leak/undefined-behaviour sanitizers (i.e. run-time error checking)" OFF)
3130
option(VTR_ENABLE_PROFILING "Enable performance profiler (gprof)" OFF)
3231
option(VTR_ENABLE_COVERAGE "Enable code coverage tracking (gcov)" OFF)
@@ -228,18 +227,17 @@ foreach(flag ${FLEX_BISON_WARN_SUPPRESS_FLAGS_TO_CHECK})
228227
endif()
229228
endforeach()
230229

231-
#Suppress IPO link warnings
232-
set(IPO_LINK_WARN_SUPRESS_FLAGS " ")
233-
set(IPO_LINK_WARN_SUPRESS_FLAGS_TO_CHECK
234-
"-Wno-null-dereference"
235-
)
236-
foreach(flag ${IPO_LINK_WARN_SUPRESS_FLAGS_TO_CHECK})
237-
CHECK_CXX_COMPILER_FLAG(${flag} CXX_COMPILER_SUPPORTS_${flag})
238-
if(CXX_COMPILER_SUPPORTS_${flag})
239-
#Flag supported, so enable it
240-
set(IPO_LINK_WARN_SUPRESS_FLAGS "${IPO_LINK_WARN_SUPRESS_FLAGS} ${flag}")
241-
endif()
242-
endforeach()
230+
# Suppress IPO link warnings.
231+
# When IPO is turned on, it sometimes leads to false positives for warnings
232+
# since it checks for warnings after some of the source files have been compiled.
233+
# We globally suppress these warnings here. Any CMake executable which is added
234+
# after this line will have these warnings suppressed at link time.
235+
if (CMAKE_INTERPROCEDURAL_OPTIMIZATION)
236+
message(STATUS "IPO: Suppressing known VTR warnings.")
237+
add_link_options(-Wno-alloc-size-larger-than # libarchfpga allocates C-style arrays using integers.
238+
-Wno-stringop-overflow # EXTERNAL/capnproto has some string overflow warnings.
239+
)
240+
endif()
243241

244242
#
245243
# Sanitizer flags

Makefile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#This is a simple wrapper which hides cmake (for convenience, and from non-expert end users).
1+
# This is a simple wrapper which hides cmake (for convenience, and from non-expert end users).
22
#
33
# It supports the targets:
44
# 'make' - builds everything (all libaries/executables)
@@ -15,12 +15,14 @@
1515
#
1616
# 'make BUILD_TYPE=debug VERBOSE=1'
1717

18-
#Default build type
19-
# Possible values:
20-
# release_pgo #Perform a 2-stage build with profile-guided compiler optimization
21-
# release #Build with compiler optimization
22-
# debug #Build with debug info and no compiler optimization
23-
# strict #Build VPR with warnings treated as errors
18+
# Build type
19+
# Possible values (not case sensitive):
20+
# release #Build with compiler optimization (Default)
21+
# RelWithDebInfo #Build with debug info and compiler optimizations
22+
# debug #Build with debug info and no compiler optimization
23+
# Possible suffixes:
24+
# _pgo #Perform a 2-stage build with profile-guided compiler optimization
25+
# _strict #Build VPR with warnings treated as errors
2426
BUILD_TYPE ?= release
2527

2628
#Debugging verbosity enable
@@ -40,7 +42,7 @@ override CMAKE_PARAMS := -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) -G 'Unix Makefil
4042
#Are we doing a strict (i.e. warnings as errors) build?
4143
ifneq (,$(findstring strict,$(BUILD_TYPE)))
4244
#Configure for strict build with VPR warning treated as errors
43-
override CMAKE_PARAMS := -DVTR_ENABLE_STRICT_COMPILE=on ${CMAKE_PARAMS}
45+
override CMAKE_PARAMS := -DCMAKE_COMPILE_WARNING_AS_ERROR=on ${CMAKE_PARAMS}
4446
endif #Strict build type
4547

4648
#Enable verbosity

README.developers.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,11 +1131,17 @@ All tests passed (1 assertion in 1 test case)
11311131
VTR has support for several additional tools/features to aid debugging.
11321132

11331133
## Basic
1134-
To build vpr with make in debug mode, simply add `BUILD_TYPE=debug` at the end of your make command.
1134+
To build a tool with make in debug mode, simply add `BUILD_TYPE=debug` at the end of your make command. For example, to build all tools in debug mode use:
11351135
```shell
1136-
$ make vpr BUILD_TYPE=debug
1136+
$ make BUILD_TYPE=debug
11371137
```
11381138

1139+
You can also enable additional (verbose) output from some tools. To build vpr with both debug information and additional output, use:
1140+
```shell
1141+
$ make vpr BUILD_TYPE=debug VERBOSE=1
1142+
```
1143+
1144+
11391145
## Sanitizers
11401146
VTR can be compiled using *sanitizers* which will detect invalid memory accesses, memory leaks and undefined behaviour (supported by both GCC and LLVM):
11411147
```shell

blifexplorer/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,6 @@ else()
5656
${CMAKE_DL_LIBS}
5757
)
5858

59-
#Supress IPO link warnings if IPO is enabled
60-
get_target_property(TEST_BLIFEXPLORER_USES_IPO blifexplorer INTERPROCEDURAL_OPTIMIZATION)
61-
if (TEST_BLIFEXPLORER_USES_IPO)
62-
set_property(TARGET blifexplorer APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
63-
endif()
64-
65-
6659
install(TARGETS blifexplorer DESTINATION bin)
6760

6861
endif()

dev/subtree_config.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
internal_path="libs/EXTERNAL/libtatum"
2525
external_url="https://github.com/verilog-to-routing/tatum.git"
2626
default_external_ref="master"/>
27-
<subtree
28-
name="libezgl"
29-
internal_path="libs/EXTERNAL/libezgl"
30-
external_url="https://github.com/mariobadr/ezgl.git"
31-
default_external_ref="master"/>
3227
<subtree
3328
name="capnproto"
3429
internal_path="libs/EXTERNAL/capnproto"

0 commit comments

Comments
 (0)