Skip to content

Commit e3539e2

Browse files
committed
Merge remote-tracking branch 'origin' into two_stage_routing
2 parents 6aded0d + f265da9 commit e3539e2

File tree

588 files changed

+166581
-159907
lines changed

Some content is hidden

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

588 files changed

+166581
-159907
lines changed

.readthedocs.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# .readthedocs.yml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required configuration file version
6+
version: 2
7+
8+
# Build documentation in the docs/ directory with Sphinx
9+
sphinx:
10+
builder: htmldir
11+
configuration: doc/src/conf.py
12+
13+
# Optionally build your docs in additional formats such as PDF and ePub
14+
formats: all
15+
16+
# Optionally set the version of Python and requirements required to build your docs
17+
python:
18+
version: 2
19+
install:
20+
- requirements: doc/requirements.txt

.travis.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ addons:
3939
- libxml++2.6-dev
4040
- perl
4141
- python
42+
- python-lxml
4243
- texinfo
4344
- time
4445
- valgrind
@@ -75,8 +76,6 @@ stages:
7576
# if: type != cron
7677
- name: Test
7778
if: type != cron
78-
- name: Build Compatibility
79-
if: type != cron
8079
- name: Build Coverity
8180
if: type = cron
8281

@@ -104,67 +103,68 @@ jobs:
104103
name: "Basic Regression Tests"
105104
script:
106105
- ./.github/travis/build.sh
107-
- ./run_reg_test.pl vtr_reg_basic -j2
106+
- ./run_reg_test.pl vtr_reg_basic -show_failures -j2
108107
- stage: Test
109108
name: "Strong Regression Tests"
110109
script:
111110
- ./.github/travis/build.sh
112-
- travis_wait 30 ./run_reg_test.pl vtr_reg_strong -j2
111+
- travis_wait 30 ./run_reg_test.pl vtr_reg_strong -show_failures -j2
113112
- stage: Test
114113
name: "Basic Valgrind Memory Tests"
115114
script:
116115
- ./.github/travis/build.sh
117-
- ./run_reg_test.pl vtr_reg_valgrind_small -j2
116+
- ./run_reg_test.pl vtr_reg_valgrind_small -show_failures -j2
118117
- stage: Test
119118
name: "ODIN-II Micro Tests"
120119
script:
121120
- ./.github/travis/build.sh
122-
- ./run_reg_test.pl odin_reg_micro -j2
121+
- ./run_reg_test.pl odin_reg_micro -show_failures -j2
123122

124-
- stage: Build Compatibility
125-
name: "GCC 5 (Ubuntu Xenial - 16.04)"
123+
- stage: Test
124+
name: "Build Compatibility: GCC 5 (Ubuntu Xenial - 16.04)"
126125
env:
127126
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
128127
- BUILD_TYPE=release_strict
129128
script:
130129
- ./.github/travis/build.sh
131-
- stage: Build Compatibility
132-
name: "GCC 6 (Debian Stretch)"
130+
- stage: Test
131+
name: "Build Compatibility: GCC 6 (Debian Stretch)"
133132
env:
134133
- MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
135134
- BUILD_TYPE=release_strict
136135
script:
137136
- ./.github/travis/build.sh
138-
- stage: Build Compatibility
139-
name: "GCC 7 (Ubuntu Bionic - 18.04)"
137+
- stage: Test
138+
name: "Build Compatibility: GCC 7 (Ubuntu Bionic - 18.04)"
140139
env:
141140
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
142141
script:
143142
- ./.github/travis/build.sh
144-
- stage: Build Compatibility
145-
name: "GCC 8 (Ubuntu Latest)"
143+
- stage: Test
144+
name: "Build Compatibility: GCC 8 (Ubuntu Latest)"
146145
env:
147146
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
148147
script:
149148
- ./.github/travis/build.sh
150-
- stage: Build Compatibility
151-
name: "GCC 9 (Latest Release)"
149+
- stage: Test
150+
name: "Build Compatibility: GCC 9 (Latest Release)"
152151
env:
153152
- MATRIX_EVAL="CC=gcc-9 && CXX=g++-9"
154153
script:
155154
- ./.github/travis/build.sh
156-
- stage: Build Compatibility
157-
name: "clang-6.0 (Debian + Ubuntu common)"
155+
- stage: Test
156+
name: "Build Compatibility: Clang 6 (Debian + Ubuntu common)"
158157
env:
159158
- MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
160159
script:
161160
- ./.github/travis/build.sh
162-
- stage: Build Compatibility
163-
name: "clang-8 (Latest Release)"
161+
- stage: Test
162+
name: "Build Compatibility: Clang 8 (Latest Release)"
164163
env:
165164
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
166165
script:
167166
- ./.github/travis/build.sh
167+
168168
- stage: Build Coverity
169169
name: "Coverity Scan"
170170
env:

BUILDING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ apt-get install \
6666
libfontconfig1-dev \
6767
libx11-dev \
6868
libxft-dev \
69+
libgtk-3-dev \
6970
perl \
7071
liblist-moreutils-perl \
7172
python \

CMakeLists.txt

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ include(SupportCcache)
55

66
project("VTR")
77

8+
#
9+
# VTR Build Options
10+
#
11+
set(VTR_COMPILE_OPTIONS "none" CACHE STRING "Specify whether vpr uses strict compiling options, e.g. -Werror")
12+
set(CACHE VTR_COMPILE_OPTIONS PROPERTY STRING strict none)
13+
14+
815
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
916
message("CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}")
1017
message("CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}")
@@ -31,6 +38,7 @@ option(VTR_ENABLE_DEBUG_LOGGING "Enable debug logging" OFF)
3138
#Allow the user to decide weather to compile the graphics library
3239
set(VPR_USE_EZGL "auto" CACHE STRING "Specify whether vpr uses the graphics library")
3340
set_property(CACHE VPR_USE_EZGL PROPERTY STRINGS auto off on)
41+
option(VTR_ENABLE_CAPNPROTO "Enable capnproto binary serialization support in VPR." ON)
3442

3543
option(WITH_BLIFEXPLORER "Enable build with blifexplorer" OFF)
3644
option(WITH_LIBRTLNUMBER "Enable build with librtlnumber" OFF)
@@ -196,7 +204,7 @@ endforeach()
196204

197205
#Suppress IPO link warnings
198206
set(IPO_LINK_WARN_SUPRESS_FLAGS " ")
199-
set(IPO_LINK_WARN_SUPRESS_FLAGS_TO_CHECK
207+
set(IPO_LINK_WARN_SUPRESS_FLAGS_TO_CHECK
200208
"-Wno-null-dereference"
201209
)
202210
foreach(flag ${IPO_LINK_WARN_SUPRESS_FLAGS_TO_CHECK})
@@ -269,8 +277,13 @@ endif()
269277
#
270278
# Set final flags
271279
#
272-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARN_FLAGS} ${SANITIZE_FLAGS} ${PROFILING_FLAGS} ${COVERAGE_FLAGS} ${LOGGING_FLAGS} ${COLORED_COMPILE}")
273-
message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
280+
separate_arguments(
281+
ADDITIONAL_FLAGS UNIX_COMMAND "${SANITIZE_FLAGS} ${PROFILING_FLAGS} ${COVERAGE_FLAGS} ${LOGGING_FLAGS} ${COLORED_COMPILE}"
282+
)
283+
add_compile_options(${ADDITIONAL_FLAGS})
284+
separate_arguments(
285+
WARN_FLAGS UNIX_COMMAND "${WARN_FLAGS}"
286+
)
274287

275288

276289
#
@@ -301,9 +314,9 @@ enable_testing()
301314
set(READLINE_FOUND FALSE)
302315

303316

304-
# set VPR_USE_EZGL in the root of VTR to decide whether to add
305-
# subdirectory of graphics library, which prevents users
306-
# without gtk/x11 libraries installed to build. VPR_USE_EZGL is
317+
# set VPR_USE_EZGL in the root of VTR to decide whether to add
318+
# subdirectory of graphics library, which prevents users
319+
# without gtk/x11 libraries installed to build. VPR_USE_EZGL is
307320
# being used in both the vpr CMakeLists and libs/EXTERNAL CMakeLists.
308321
#
309322
# check if GTK and X11 are installed and turn on/off graphics
@@ -314,16 +327,21 @@ if (VPR_USE_EZGL STREQUAL "auto")
314327

315328
if(GTK3_FOUND AND X11_FOUND)
316329
set(VPR_USE_EZGL "on")
330+
message(STATUS "VPR Graphics: Enabled")
317331
else()
318332
set(VPR_USE_EZGL "off")
333+
message(STATUS "VPR Graphics: Disabled (required libraries missing, on debia/ubuntu try: sudo apt install libgtk-3 libx11-dev")
319334
endif()
320335
endif()
321336

322337

323338
#Add the various sub-projects
324-
add_subdirectory(libs)
325-
add_subdirectory(vpr)
326339
add_subdirectory(abc)
340+
add_subdirectory(libs) #libs/CMakeLists.txt handles adding warnings flags to non-external libraries
341+
342+
#Add the various tools
343+
add_compile_options(${WARN_FLAGS}) #Add warn flags for VTR tools
344+
add_subdirectory(vpr)
327345
add_subdirectory(ODIN_II)
328346
add_subdirectory(ace2)
329347
add_subdirectory(utils)

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ override CMAKE_PARAMS := -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) -G 'Unix Makefil
3333
#Are we doing a strict (i.e. warnings as errors) build?
3434
ifneq (,$(findstring strict,$(BUILD_TYPE)))
3535
#Configure for strict build with VPR warning treated as errors
36-
override CMAKE_PARAMS := -DVPR_COMPILE_OPTIONS=strict ${CMAKE_PARAMS}
36+
override CMAKE_PARAMS := -DVTR_COMPILE_OPTIONS=strict ${CMAKE_PARAMS}
3737
endif #Strict build type
3838

3939
# -s : Suppresss makefile output (e.g. entering/leaving directories)

ODIN_II/CMakeLists.txt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ file(GLOB_RECURSE PARSER_SOURCES SRC/*.y)
7979

8080
#Make the flex and bison targets
8181
flex_target(VerilogLexer ${LEXER_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/verilog_flex.c)
82-
bison_target(VerilogParser ${PARSER_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/verilog_bison.c)
82+
bison_target(VerilogParser ${PARSER_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/verilog_bison.c COMPILE_FLAGS "--verbose")
8383
add_flex_bison_dependency(VerilogLexer VerilogParser)
8484

8585
#Get the include directories for the generated headers
@@ -112,7 +112,7 @@ add_library(libodin_ii STATIC
112112
${LIB_HEADERS_H}
113113
${LIB_HEADERS_HPP}
114114
${LIB_SOURCES}
115-
${FLEX_VerilogLexer_OUTPUTS}
115+
${FLEX_VerilogLexer_OUTPUTS}
116116
${BISON_VerilogParser_OUTPUT_SOURCE})
117117

118118
target_include_directories(libodin_ii PUBLIC ${LIB_INCLUDE_DIRS})
@@ -164,4 +164,19 @@ if (ODIN_USES_IPO)
164164
set_target_properties(odin_II PROPERTIES LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
165165
endif()
166166

167+
set(ODIN_COMPILE_OPTIONS_FLAGS
168+
#GCC-like
169+
"-Werror"
170+
)
171+
172+
#add strict odin compiler flags, if set
173+
if(VTR_COMPILE_OPTIONS STREQUAL "strict")
174+
message(STATUS "ODIN_II: building with strict flags")
175+
foreach(ODIN_FLAG ${ODIN_COMPILE_OPTIONS_FLAGS})
176+
message(STATUS "\tAdding CXX flag: ${ODIN_FLAG}")
177+
target_compile_options(libodin_ii PRIVATE ${ODIN_FLAG})
178+
target_compile_options(odin_II PRIVATE ${ODIN_FLAG})
179+
endforeach()
180+
endif()
181+
167182
install(TARGETS odin_II libodin_ii DESTINATION bin)

ODIN_II/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ODIN_ROOT=$(PWD)
2-
NB_OF_PROCESS ?= $(shell nproc --all)
2+
NB_OF_PROCESS ?= $(shell python -c "import multiprocessing; print(multiprocessing.cpu_count())")
33

44
################
55
# build with ninja when doable
@@ -47,6 +47,7 @@ clean:
4747
define _build_it_gen
4848
_build_it_$(1): _set_$(1)
4949
cd $(BUILD_DIR) &&\
50+
echo "Building with $(NB_OF_PROCESS) threads" &&\
5051
$(BUILDER)
5152

5253
$(1): _build_it_$(1)

0 commit comments

Comments
 (0)