Skip to content

Commit f1a3bcc

Browse files
authored
Merge pull request #545 from acomodi/sync_with_upstream
Sync with upstream
2 parents 8980e46 + b3c64e3 commit f1a3bcc

File tree

1,347 files changed

+415952
-28192
lines changed

Some content is hidden

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

1,347 files changed

+415952
-28192
lines changed

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ d91bc203bf1ae80e6a4371ef7c168886bb536c1c
77
# Autoformat run on 2019-07-25T20:04:01.740240
88
80de7854fa5fea9a281df72cbbd2413ae4018c7c
99

10+
# Autoformat run on 2020-08-13T15:57:15.777946
11+
03b0b77b06943b595e9cb1f38ffa0ff00ff1ab76
12+

.github/kokoro/run-vtr.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ set -x
66
set -e
77

88
# Set up the host
9-
source $SCRIPT_DIR/steps/hostsetup.sh
10-
source $SCRIPT_DIR/steps/hostinfo.sh
11-
12-
# Output git information
139
ls -l
1410
cd github
1511
ls -l
1612
cd vtr-verilog-to-routing
13+
source $SCRIPT_DIR/steps/hostsetup.sh
14+
source $SCRIPT_DIR/steps/hostinfo.sh
15+
16+
# Output git information
1717
source $SCRIPT_DIR/steps/git.sh
1818

1919
if [ $VTR_TEST == "vtr_reg_strong" ]; then

.github/kokoro/steps/hostsetup.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ echo
2828
echo "========================================"
2929
echo "Host install packages"
3030
echo "----------------------------------------"
31+
3132
sudo apt-get install -y \
3233
bash \
3334
bison \
@@ -58,6 +59,15 @@ sudo apt-get install -y \
5859
#Don't include libtbb-dev since it may increase memory usage
5960
#libtbb-dev \
6061

62+
export PATH="$PATH:/home/kbuilder/.local/bin"
63+
64+
pyenv install -f 3.6.3
65+
pyenv global 3.6.3
66+
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
67+
python3 get-pip.py
68+
rm get-pip.py
69+
python3 -m pip install -r requirements.txt
70+
6171
if [ -z "${BUILD_TOOL}" ]; then
6272
export BUILD_TOOL=make
6373
fi

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ vgcore*
6666
*.place
6767
*.route
6868
*.out
69+
*.bin
70+
71+
#
72+
# FASM result files
73+
#
74+
*.fasm
6975

7076
#
7177
#Odin test outputs

.readthedocs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ version: 2
77

88
# Build documentation in the docs/ directory with Sphinx
99
sphinx:
10-
builder: htmldir
10+
builder: dirhtml
1111
configuration: doc/src/conf.py
1212

1313
# Optionally build your docs in additional formats such as PDF and ePub
1414
formats: all
1515

1616
# Optionally set the version of Python and requirements required to build your docs
1717
python:
18-
version: 2
18+
version: 3.7
1919
install:
2020
- requirements: doc/requirements.txt

.travis.yml

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
version: ~> 1.0
22
language: cpp
33

4-
dist: trusty
4+
dist: bionic
55
addons:
66
apt:
77
sources:
8-
- sourceline: 'ppa:george-edison55/precise-backports' # For cmake
9-
- sourceline: 'deb http://apt.llvm.org/precise llvm-toolchain-precise-3.6 main'
10-
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
11-
- sourceline: 'deb http://apt.llvm.org/trusty llvm-toolchain-trusty-6.0 main'
12-
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
13-
- sourceline: 'deb http://apt.llvm.org/trusty llvm-toolchain-trusty-7 main' # For clang-format-7
14-
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
15-
- sourceline: 'deb http://apt.llvm.org/trusty llvm-toolchain-trusty-8 main'
16-
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
178
- sourceline: 'ppa:ubuntu-toolchain-r/test'
189
packages:
1910
- autoconf
@@ -43,8 +34,6 @@ addons:
4334
- libxft-dev
4435
- libxml++2.6-dev
4536
- perl
46-
- python
47-
- python-lxml
4837
- texinfo
4938
- time
5039
- valgrind
@@ -88,9 +77,17 @@ jobs:
8877
#- ./.github/travis/build.sh
8978

9079
- stage: Test
91-
name: "Code Formatting"
80+
name: "Code Formatting - C/C++"
9281
script:
9382
- ./dev/check-format.sh
83+
- stage: Test
84+
name: "Code Formatting - Python"
85+
script:
86+
- ./dev/check-format-py.sh
87+
- stage: Test
88+
name: "Python Lint"
89+
script:
90+
- python3 ./dev/pylint_check.py
9491
- stage: Test
9592
name: "C++ Unit Tests"
9693
env:
@@ -116,6 +113,22 @@ jobs:
116113
script:
117114
- ./.github/travis/build.sh
118115
- travis_wait 30 ./run_reg_test.pl vtr_reg_basic -show_failures -j2
116+
- stage: Test
117+
name: "Basic Regression Tests with NO_GRAPHICS"
118+
env:
119+
- CMAKE_PARAMS="-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVPR_USE_EZGL=off"
120+
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
121+
script:
122+
- ./.github/travis/build.sh
123+
- travis_wait 30 ./run_reg_test.pl vtr_reg_basic -show_failures -j2
124+
- stage: Test
125+
name: "Basic Regression Tests with VTR_ENABLE_DEBUG_LOGGING"
126+
env:
127+
- CMAKE_PARAMS="-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_DEBUG_LOGGING=on"
128+
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
129+
script:
130+
- ./.github/travis/build.sh
131+
- travis_wait 30 ./run_reg_test.pl vtr_reg_basic -show_failures -j2
119132
- stage: Test
120133
name: "Strong Regression Tests"
121134
env:
@@ -228,6 +241,15 @@ jobs:
228241
- ./.github/travis/cron_build.sh
229242

230243
before_script:
244+
# Switch to python 3.6.3
245+
- pyenv install -f 3.6.3
246+
- pyenv global 3.6.3
247+
# Install python modules
248+
- curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
249+
- python3 get-pip.py
250+
- rm get-pip.py
251+
- python3 -m pip install -r requirements.txt
252+
231253
- source .github/travis/common.sh
232254
- ./.github/travis/setup.sh
233255

CMakeLists.txt

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,15 @@ option(VTR_ENABLE_PROFILING "Enable performance profiler (gprof)" OFF)
3232
option(VTR_ENABLE_COVERAGE "Enable code coverage tracking (gcov)" OFF)
3333
option(VTR_ENABLE_DEBUG_LOGGING "Enable debug logging" OFF)
3434

35-
#Allow the user to decide weather to compile the graphics library
35+
#Allow the user to decide whether to compile the graphics library
3636
set(VPR_USE_EZGL "auto" CACHE STRING "Specify whether vpr uses the graphics library")
3737
set_property(CACHE VPR_USE_EZGL PROPERTY STRINGS auto off on)
3838
option(VTR_ENABLE_CAPNPROTO "Enable capnproto binary serialization support in VPR." ON)
3939

40+
#Allow the user to enable/disable VPR analytic placement
41+
#VPR option --enable_analytic_placer is also required for Analytic Placement
42+
option(VPR_ANALYTIC_PLACE "Enable analytic placement in VPR." ON)
43+
4044
option(WITH_BLIFEXPLORER "Enable build with blifexplorer" OFF)
4145

4246
option(WITH_ABC "Enable building abc" ON)
@@ -109,6 +113,16 @@ else()
109113
message(STATUS "Building with IPO: off")
110114
endif()
111115

116+
#
117+
# Build type flags
118+
#
119+
120+
if(NOT MSVC)
121+
# for GCC and Clang
122+
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -g3")
123+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g3")
124+
endif()
125+
112126
#
113127
# Warning flags
114128
#
@@ -336,7 +350,7 @@ if (VPR_USE_EZGL STREQUAL "auto")
336350
message(STATUS "VPR Graphics: Enabled")
337351
else()
338352
set(VPR_USE_EZGL "off")
339-
message(STATUS "VPR Graphics: Disabled (required libraries missing, on debia/ubuntu try: sudo apt install libgtk-3 libx11-dev")
353+
message(STATUS "VPR Graphics: Disabled (required libraries missing, on debian/ubuntu try: sudo apt install libgtk-3-dev libx11-dev")
340354
endif()
341355
endif()
342356

@@ -407,5 +421,13 @@ list(APPEND DIRS_TO_FORMAT_CPP "${CMAKE_CURRENT_SOURCE_DIR}/libs/liblog")
407421
list(APPEND DIRS_TO_FORMAT_CPP "${CMAKE_CURRENT_SOURCE_DIR}/libs/librtlnumber")
408422
list(APPEND DIRS_TO_FORMAT_CPP "${CMAKE_CURRENT_SOURCE_DIR}/ODIN_II")
409423

410-
411424
include(AutoClangFormat)
425+
426+
list(APPEND DIRS_TO_FORMAT_PY "${CMAKE_CURRENT_SOURCE_DIR}/ODIN_II")
427+
list(APPEND DIRS_TO_FORMAT_PY "${CMAKE_CURRENT_SOURCE_DIR}/ace2")
428+
list(APPEND DIRS_TO_FORMAT_PY "${CMAKE_CURRENT_SOURCE_DIR}/dev")
429+
list(APPEND DIRS_TO_FORMAT_PY "${CMAKE_CURRENT_SOURCE_DIR}/doc")
430+
list(APPEND DIRS_TO_FORMAT_PY "${CMAKE_CURRENT_SOURCE_DIR}/vpr")
431+
list(APPEND DIRS_TO_FORMAT_PY "${CMAKE_CURRENT_SOURCE_DIR}/vtr_flow")
432+
433+
include(AutoPyFormat)

ODIN_II/CMakeLists.txt

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ if(ODIN_COVERAGE)
6464
)
6565

6666
set(ODIN_EXTRA_LINK_FLAGS
67-
"-lgcov --coverage"
67+
"-lgcov"
68+
"--coverage"
69+
${ODIN_EXTRA_LINK_FLAGS}
6870
)
6971

7072
endif()
@@ -74,13 +76,23 @@ if(ODIN_SANITIZE)
7476
message("*** Compiling with Odin Coverage flags")
7577

7678
set(ODIN_EXTRA_FLAGS
77-
"-g"
79+
"-O1"
80+
"-fno-omit-frame-pointer"
7881
"-fsanitize=address"
82+
"-fsanitize=leak"
83+
"-fsanitize=undefined"
84+
"-fuse-ld=gold"
7985
${ODIN_EXTRA_FLAGS}
8086
)
8187

8288
set(ODIN_EXTRA_LINK_FLAGS
89+
"-O1"
90+
"-fno-omit-frame-pointer"
8391
"-fsanitize=address"
92+
"-fsanitize=leak"
93+
"-fsanitize=undefined"
94+
"-fuse-ld=gold"
95+
${ODIN_EXTRA_LINK_FLAGS}
8496
)
8597

8698
endif()
@@ -169,10 +181,10 @@ foreach(ODIN_FLAG ${ODIN_EXTRA_FLAGS})
169181
endforeach()
170182

171183
#add extra link flags for odin
172-
if(ODIN_EXTRA_LINK_FLAGS)
173-
set_target_properties(libodin_ii PROPERTIES LINK_FLAGS ${ODIN_EXTRA_LINK_FLAGS})
174-
set_target_properties(odin_II PROPERTIES LINK_FLAGS ${ODIN_EXTRA_LINK_FLAGS})
175-
endif()
184+
foreach(ODIN_LINK_FLAG ${ODIN_EXTRA_LINK_FLAGS})
185+
target_link_libraries(libodin_ii ${ODIN_LINK_FLAG})
186+
target_link_libraries(odin_II ${ODIN_LINK_FLAG})
187+
endforeach()
176188

177189
#Supress IPO link warnings if IPO is enabled
178190
get_target_property(ODIN_USES_IPO odin_II INTERPROCEDURAL_OPTIMIZATION)

ODIN_II/Makefile

Lines changed: 25 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -101,41 +101,32 @@ test_coverage:
101101
$(MAKE) gcovr
102102

103103
test:
104-
# rebuild with sanitize flags on to run the same test as travis
105-
$(MAKE) sanitize
106-
./verify_odin.sh -j $(NB_OF_PROCESS) \
107-
-t regression_test/benchmark/suite/light_suite \
108-
-t vtr_reg_basic \
109-
-t vtr_reg_strong
110-
# larger test should run with regular flags to speed up the process
111-
$(MAKE) build
112-
./verify_odin.sh -j $(NB_OF_PROCESS) \
113-
-t regression_test/benchmark/suite/heavy_suite
104+
$(MAKE) sanitize \
105+
&& ./verify_odin.sh --no_report -j $(NB_OF_PROCESS) \
106+
-t regression_test/benchmark/suite/light_suite \
107+
-t regression_test/benchmark/suite/vtr_light_suite \
108+
&& $(MAKE) build \
109+
&& ./verify_odin.sh --no_report --continue -j $(NB_OF_PROCESS) \
110+
-t regression_test/benchmark/suite/heavy_suite; \
111+
./verify_odin.sh --status_only
112+
114113

115114
generate_expectation:
116-
# rebuild with sanitize flags on to run the same test as travis
117-
$(MAKE) sanitize
118-
./verify_odin.sh -j $(NB_OF_PROCESS) \
119-
--generate_expectation\
120-
-t regression_test/benchmark/suite/light_suite \
121-
-t vtr_reg_basic \
122-
-t vtr_reg_strong || true
123-
# larger test should run with regular flags to speed up the process
124-
$(MAKE) build
125-
./verify_odin.sh -j $(NB_OF_PROCESS) \
126-
--generate_expectation \
127-
-t regression_test/benchmark/suite/heavy_suite
115+
$(MAKE) sanitize \
116+
&& ./verify_odin.sh --$@ --no_report -j $(NB_OF_PROCESS) \
117+
-t regression_test/benchmark/suite/light_suite \
118+
-t regression_test/benchmark/suite/vtr_light_suite; \
119+
$(MAKE) build \
120+
&& ./verify_odin.sh --$@ --no_report --continue -j $(NB_OF_PROCESS) \
121+
-t regression_test/benchmark/suite/heavy_suite; \
122+
./verify_odin.sh --status_only
128123

129124
regenerate_expectation:
130-
# rebuild with sanitize flags on to run the same test as travis
131-
$(MAKE) sanitize
132-
./verify_odin.sh -j $(NB_OF_PROCESS) \
133-
--regenerate_expectation\
134-
-t regression_test/benchmark/suite/light_suite \
135-
-t vtr_reg_basic \
136-
-t vtr_reg_strong || true
137-
# larger test should run with regular flags to speed up the process
138-
$(MAKE) build
139-
./verify_odin.sh -j $(NB_OF_PROCESS) \
140-
--regenerate_expectation \
141-
-t regression_test/benchmark/suite/heavy_suite
125+
$(MAKE) sanitize \
126+
&& ./verify_odin.sh --$@ --no_report -j $(NB_OF_PROCESS) \
127+
-t regression_test/benchmark/suite/light_suite \
128+
-t regression_test/benchmark/suite/vtr_light_suite; \
129+
$(MAKE) build \
130+
&& ./verify_odin.sh --$@ --no_report --continue -j $(NB_OF_PROCESS) \
131+
-t regression_test/benchmark/suite/heavy_suite; \
132+
./verify_odin.sh --status_only

ODIN_II/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Odin_II
2+
=======
3+
4+
Odin II is used for logic synthesis and elaboration, converting a subset of the Verilog Hardware Description Language (HDL) into a BLIF netlist.
5+
6+
-----------------
7+
8+
* **[Quick Start](../doc/src/odin/quickstart.md)**
9+
* **[User Guide](../doc/src/odin/user_guide.md)**
10+
* **[Verilog Support](../doc/src/odin/verilog_support.md)**
11+
* **Developper guide**
12+
* [Contributing](../doc/src/odin/dev_guide/contributing)
13+
* [Regression Tests](../doc/src/odin/dev_guide/regression_test)
14+
* [Regression Tool](../doc/src/odin/dev_guide/verify_script)
15+
* [Validating Tests](../doc/src/odin/dev_guide/testing)

ODIN_II/README.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)