Skip to content

Commit 46b0700

Browse files
committed
2 parents 6f3ee69 + 9cc02c3 commit 46b0700

File tree

146 files changed

+9496
-1071
lines changed

Some content is hidden

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

146 files changed

+9496
-1071
lines changed

.github/scripts/install_dependencies.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ sudo apt install -y \
2929
libncurses5-dev \
3030
libx11-dev \
3131
libxft-dev \
32+
libxml2-utils \
3233
libxml++2.6-dev \
3334
libreadline-dev \
3435
tcllib \

.github/workflows/test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@ jobs:
197197
params: '-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVPR_USE_EZGL=off',
198198
suite: 'vtr_reg_basic'
199199
},
200+
{
201+
name: 'Basic with CAPNPROTO disabled',
202+
params: '-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_CAPNPROTO=off',
203+
suite: 'vtr_reg_basic'
204+
},
200205
{
201206
name: 'Basic with VTR_ENABLE_DEBUG_LOGGING',
202207
params: '-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_DEBUG_LOGGING=on',
@@ -297,7 +302,13 @@ jobs:
297302
CMAKE_PARAMS: ${{ matrix.params }}
298303
BUILD_TYPE: debug
299304
LSAN_OPTIONS: 'exitcode=42' #Use a non-standard exit code to ensure LSAN errors are detected
305+
# In Ubuntu 20240310.1.0, the entropy of ASLR has increased (28 -> 32). LLVM 14 in this
306+
# image is not compatible with this increased ASLR entropy. Apparently, memory sanitizer
307+
# depends on LLVM and all CI tests where VTR_ENABLE_SANITIZE is enabled fail. For a temporary
308+
# fix, we manually reduce the entropy. This quick fix should be removed in the future
309+
# when github deploys a more stable Ubuntu image.
300310
run: |
311+
sudo sysctl -w vm.mmap_rnd_bits=28
301312
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
302313
./.github/scripts/build.sh
303314
# We skip QoR since we are only checking for errors in sanitizer runs
@@ -349,6 +360,7 @@ jobs:
349360
CMAKE_PARAMS: '-DVTR_ASSERT_LEVEL=3 -DVTR_ENABLE_SANITIZE=on -DVTR_IPO_BUILD=off -DWITH_BLIFEXPLORER=on -DWITH_PARMYS=OFF -DWITH_ODIN=on'
350361
BUILD_TYPE: debug
351362
run: |
363+
sudo sysctl -w vm.mmap_rnd_bits=28
352364
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
353365
./.github/scripts/build.sh
354366
./run_reg_test.py odin_reg_basic -show_failures -j2

CMakeLists.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ set(VTR_IPO_BUILD "auto" CACHE STRING "Should VTR be compiled with interprocedur
2323
set_property(CACHE VTR_IPO_BUILD PROPERTY STRINGS auto on off)
2424

2525
#Allow the user to configure how much assertion checking should occur
26-
set(VTR_ASSERT_LEVEL "2" CACHE STRING "VTR assertion checking level. 0: no assertions, 1: fast assertions, 2: regular assertions, 3: additional assertions with noticable run-time overhead, 4: all assertions (including those with significant run-time cost)")
26+
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

2929
option(VTR_ENABLE_STRICT_COMPILE "Specifies whether compiler warnings should be treated as errors (e.g. -Werror)" OFF)
@@ -418,11 +418,13 @@ if(${WITH_PARMYS}) # define cmake params to compile Yosys
418418
set(MAKE_PROGRAM "make")
419419
endif()
420420

421-
if(NOT DEFINED "${CMAKE_BUILD_PARALLEL_LEVEL}")
422-
set(CUSTOM_BUILD_PARALLEL_LEVEL 16)
423-
else()
424-
set(CUSTOM_BUILD_PARALLEL_LEVEL "${CMAKE_BUILD_PARALLEL_LEVEL}")
425-
endif()
421+
# Commented out since a make file should not call another make command with
422+
# threads. It should pass this information from the parent automatically.
423+
# if(NOT DEFINED "${CMAKE_BUILD_PARALLEL_LEVEL}")
424+
# set(CUSTOM_BUILD_PARALLEL_LEVEL 16)
425+
# else()
426+
# set(CUSTOM_BUILD_PARALLEL_LEVEL "${CMAKE_BUILD_PARALLEL_LEVEL}")
427+
# endif()
426428
add_subdirectory(yosys)
427429
endif()
428430

blifexplorer/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16)
22

33
project("blifexplorer")
44

5-
set(CMAKE_CXX_STANDARD 14)
5+
set(CMAKE_CXX_STANDARD 17)
66
set(CMAKE_CXX_STANDARD_REQUIRED ON)
77
set(CMAKE_CXX_EXTENSIONS OFF)
88

doc/src/quickstart/index.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ On most unix-like systems you can run:
4848
4949
> make
5050
51+
The default front-end for VTR is :ref:`Parmys<parmys>`, but you can build with ODIN II instead using the command below. This is required to run :ref:`Synthesizing with ODIN II<synthesizing_with_odin_ii>`.
52+
53+
.. code-block:: bash
54+
55+
> make CMAKE_PARAMS="-DWITH_ODIN=on"
56+
5157
from the VTR root directory (hereafter referred to as :term:`$VTR_ROOT`) to build VTR.
5258

5359
.. note::
@@ -63,6 +69,8 @@ from the VTR root directory (hereafter referred to as :term:`$VTR_ROOT`) to buil
6369
* define VTR_ROOT as a variable in your shell (e.g. if ``~/trees/vtr`` is the path to the VTR source tree on your machine, run the equivalent of ``VTR_ROOT=~/trees/vtr`` in BASH) which will allow you to run the commands as written in this guide, or
6470
* manually replace `$VTR_ROOT` in the example commands below with your path to the VTR source tree.
6571

72+
73+
6674
For more details on building VTR on various operating systems/platforms see :doc:`Building VTR</BUILDING>`.
6775

6876

@@ -235,6 +243,7 @@ Next we need to run the three main sets of tools:
235243
* :ref:`ABC` performs 'logic optimization' which simplifies the circuit logic, and 'technology mapping' which converts logic equations into the Look-Up-Tables (LUTs) available on an FPGA, and
236244
* :ref:`VPR` which performs packing, placement and routing of the circuit to implement it on the targetted FPGA architecture.
237245

246+
.. _synthesizing_with_odin_ii:
238247
Synthesizing with ODIN II
239248
~~~~~~~~~~~~~~~~~~~~~~~~~
240249

doc/src/tutorials/flow/basic_flow.rst

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,9 @@ The following steps show you to run the VTR design flow to map a sample circuit
1717
1818
$VTR_ROOT/vtr_flow/scripts/run_vtr_task.py basic_no_timing
1919
20-
The subdirectory ``regression_tests/vtr_reg_basic`` contains tests that are to be run before each commit. They check for basic functionallity to make sure nothing was extremely out of order. This command runs the VTR flow on a set of circuits and a single architecture.
20+
The subdirectory ``regression_tests/vtr_reg_basic`` contains tests that are to be run before each commit. They check for basic functionality to make sure nothing was extremely out of order. This command runs the VTR flow on a set of circuits and a single architecture.
2121
The files generated from the run are stored in ``basic_no_timing/run[#]`` where ``[#]`` is the number of runs you have done.
22-
If this is your first time running the flow, the results will be stored in basic_no_timing/run001.
23-
When the script completes, enter the following command:
24-
25-
.. code-block:: shell
26-
27-
../../../scripts/python_libs/vtr/parse_vtr_task.py basic_no_timing/
28-
29-
This parses out the information of the VTR run and outputs the results in a text file called ``run[#]/parse_results.txt``.
22+
If this is your first time running the flow, the results will be stored in basic_no_timing/run001. The command parses out the information of the VTR run and outputs the results in a text file called ``run[#]/parse_results.txt``.
3023

3124
More info on how to run the flow on multiple circuits and architectures along with different options later.
3225
Before that, we need to ensure that the run that you have done works.

doc/src/vpr/basic_flow.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Basic flow
44
The Place and Route process in VPR consists of several steps:
55

66
- Packing (combinines primitives into complex blocks)
7-
- Placment (places complex blocks within the FPGA grid)
7+
- Placement (places complex blocks within the FPGA grid)
88
- Routing (determines interconnections between blocks)
99
- Analysis (analyzes the implementation)
1010

doc/src/vpr/command_line_usage.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,6 +1298,14 @@ The following options are only valid when the router is in timing-driven mode (t
12981298

12991299
**Default:** ``1.2``
13001300

1301+
.. option:: --router_profiler_astar_fac <float>
1302+
1303+
Controls the directedness of the timing-driven router's exploration when doing router delay profiling of an architecture.
1304+
The router delay profiling step is currently used to calculate the place delay matrix lookup.
1305+
Values between 1 and 2 are resonable; higher values trade some quality for reduced run-time.
1306+
1307+
**Default:** ``1.2``
1308+
13011309
.. option:: --max_criticality <float>
13021310

13031311
Sets the maximum fraction of routing cost that can come from delay (vs. coming from routability) for any net.

doc/src/vtr/benchmarks.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ These designs use many precisions including binary, different fixed point types
102102
proxy Proxy/synthetic benchmarks
103103
================= ======================================
104104

105-
The VTR benchmarks are provided as Verilog (enabling full flexibility to modify and change how the designs are implemented) under: ::
105+
The Koios benchmarks are provided as Verilog (enabling full flexibility to modify and change how the designs are implemented) under: ::
106106

107107
$VTR_ROOT/vtr_flow/benchmarks/verilog/koios
108108

@@ -207,4 +207,4 @@ real application domains. On the other hand, MLP benchmarks include modules that
207207
and move data. Pre-synthesized netlists for the synthetic benchmarks are added to VTR project, but MLP netlists should
208208
be downloaded separately.
209209

210-
.. note:: The NoC MLP benchmarks are not included with the VTR release (due to their size). However they can be downloaded and extracted by running ``make get_noc_mlp_benchmarks`` from the root of the VTR tree. They can also be `downloaded manually <https://www.eecg.utoronto.ca/~vaughn/titan/>`_.
210+
.. note:: The NoC MLP benchmarks are not included with the VTR release (due to their size). However they can be downloaded and extracted by running ``make get_noc_mlp_benchmarks`` from the root of the VTR tree. They can also be `downloaded manually <https://www.eecg.utoronto.ca/~vaughn/titan/>`_.

libs/EXTERNAL/libargparse/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ libargparse
22
===========
33
This is (yet another) simple command-line parser for C++ applications, inspired by Python's agparse module.
44

5-
It requires only a C++11 compiler, and has no external dependancies.
5+
It requires only a C++11 compiler, and has no external dependencies.
66

77
One of the advantages of libargparse is that all conversions from command-line strings to program types (bool, int etc.) are performed when the command line is parsed (and not when the options are accessed).
88
This avoids command-line related errors from showing up deep in the program execution, which can be problematic for long-running programs.

libs/EXTERNAL/libargparse/src/argparse.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#include <algorithm>
2-
#include <array>
32
#include <list>
43
#include <cassert>
54
#include <string>
65
#include <set>
76
#include <limits>
7+
#include <utility>
88

99
#include "argparse.hpp"
1010
#include "argparse_util.hpp"
@@ -16,16 +16,16 @@ namespace argparse {
1616
* ArgumentParser
1717
*/
1818

19-
ArgumentParser::ArgumentParser(std::string prog_name, std::string description_str, std::ostream& os)
20-
: description_(description_str)
19+
ArgumentParser::ArgumentParser(const std::string& prog_name, std::string description_str, std::ostream& os)
20+
: description_(std::move(description_str))
2121
, formatter_(new DefaultFormatter())
2222
, os_(os)
2323
{
2424
prog(prog_name);
2525
argument_groups_.push_back(ArgumentGroup("arguments"));
2626
}
2727

28-
ArgumentParser& ArgumentParser::prog(std::string prog_name, bool basename_only) {
28+
ArgumentParser& ArgumentParser::prog(const std::string& prog_name, bool basename_only) {
2929
if (basename_only) {
3030
prog_ = basename(prog_name);
3131
} else {
@@ -35,17 +35,17 @@ namespace argparse {
3535
}
3636

3737
ArgumentParser& ArgumentParser::version(std::string version_str) {
38-
version_ = version_str;
38+
version_ = std::move(version_str);
3939
return *this;
4040
}
4141

4242
ArgumentParser& ArgumentParser::epilog(std::string epilog_str) {
43-
epilog_ = epilog_str;
43+
epilog_ = std::move(epilog_str);
4444
return *this;
4545
}
4646

4747
ArgumentGroup& ArgumentParser::add_argument_group(std::string description_str) {
48-
argument_groups_.push_back(ArgumentGroup(description_str));
48+
argument_groups_.push_back(ArgumentGroup(std::move(description_str)));
4949
return argument_groups_[argument_groups_.size() - 1];
5050
}
5151

@@ -72,7 +72,7 @@ namespace argparse {
7272
void ArgumentParser::parse_args_throw(int argc, const char* const* argv) {
7373
std::vector<std::string> arg_strs;
7474
for (int i = 1; i < argc; ++i) {
75-
arg_strs.push_back(argv[i]);
75+
arg_strs.emplace_back(argv[i]);
7676
}
7777

7878
parse_args_throw(arg_strs);
@@ -241,7 +241,7 @@ namespace argparse {
241241
} else if (arg->nargs() == '+' || arg->nargs() == '*') {
242242
if (arg->nargs() == '+') {
243243
assert(nargs_read >= 1);
244-
assert(values.size() >= 1);
244+
assert(!values.empty());
245245
}
246246

247247
for (const auto& value : values) {
@@ -410,11 +410,11 @@ namespace argparse {
410410
* ArgumentGroup
411411
*/
412412
ArgumentGroup::ArgumentGroup(std::string name_str)
413-
: name_(name_str)
413+
: name_(std::move(name_str))
414414
{}
415415

416416
ArgumentGroup& ArgumentGroup::epilog(std::string str) {
417-
epilog_ = str;
417+
epilog_ = std::move(str);
418418
return *this;
419419
}
420420
std::string ArgumentGroup::name() const { return name_; }
@@ -425,10 +425,10 @@ namespace argparse {
425425
* Argument
426426
*/
427427
Argument::Argument(std::string long_opt, std::string short_opt)
428-
: long_opt_(long_opt)
429-
, short_opt_(short_opt) {
428+
: long_opt_(std::move(long_opt))
429+
, short_opt_(std::move(short_opt)) {
430430

431-
if (long_opt_.size() < 1) {
431+
if (long_opt_.empty()) {
432432
throw ArgParseError("Argument must be at least one character long");
433433
}
434434

@@ -445,7 +445,7 @@ namespace argparse {
445445
}
446446

447447
Argument& Argument::help(std::string help_str) {
448-
help_ = help_str;
448+
help_ = std::move(help_str);
449449
return *this;
450450
}
451451

@@ -476,12 +476,12 @@ namespace argparse {
476476
}
477477

478478
Argument& Argument::metavar(std::string metavar_str) {
479-
metavar_ = metavar_str;
479+
metavar_ = std::move(metavar_str);
480480
return *this;
481481
}
482482

483483
Argument& Argument::choices(std::vector<std::string> choice_values) {
484-
choices_ = choice_values;
484+
choices_ = std::move(choice_values);
485485
return *this;
486486
}
487487

@@ -536,7 +536,7 @@ namespace argparse {
536536
}
537537

538538
Argument& Argument::group_name(std::string grp) {
539-
group_name_ = grp;
539+
group_name_ = std::move(grp);
540540
return *this;
541541
}
542542

libs/EXTERNAL/libargparse/src/argparse.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ namespace argparse {
3434
class ArgumentParser {
3535
public:
3636
//Initializes an argument parser
37-
ArgumentParser(std::string prog_name, std::string description_str=std::string(), std::ostream& os=std::cout);
37+
ArgumentParser(const std::string& prog_name, std::string description_str=std::string(), std::ostream& os=std::cout);
3838

3939
//Overrides the program name
40-
ArgumentParser& prog(std::string prog, bool basename_only=true);
40+
ArgumentParser& prog(const std::string& prog, bool basename_only=true);
4141

4242
//Sets the program version
4343
ArgumentParser& version(std::string version);

libs/EXTERNAL/libcatch2

Submodule libcatch2 updated 110 files

libs/libarchfpga/CMakeLists.txt

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,38 @@ target_include_directories(libarchfpga PUBLIC ${LIB_INCLUDE_DIRS})
1717

1818
set_target_properties(libarchfpga PROPERTIES PREFIX "") #Avoid extra 'lib' prefix
1919

20-
#Specify link-time dependancies
20+
#Specify link-time dependencies
2121
target_link_libraries(libarchfpga
2222
libvtrutil
2323
libpugixml
2424
libpugiutil
25-
libvtrcapnproto
2625
)
2726

27+
if(${VTR_ENABLE_CAPNPROTO})
28+
target_link_libraries(libarchfpga libvtrcapnproto)
29+
target_compile_definitions(libarchfpga PRIVATE VTR_ENABLE_CAPNPROTO)
30+
endif()
31+
32+
# Using filesystem library requires additional compiler/linker options for GNU implementation prior to 9.1
33+
# and LLVM implementation prior to LLVM 9.0;
34+
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
35+
# Get the compiler version string
36+
execute_process(COMMAND ${CMAKE_C_COMPILER} --version OUTPUT_VARIABLE _gcc_output)
37+
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" _gcc_version ${_gcc_output})
38+
39+
if(_gcc_version VERSION_LESS "9.1")
40+
target_link_libraries(libarchfpga stdc++fs)
41+
endif()
42+
elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang")
43+
# Get the compiler version string
44+
execute_process(COMMAND ${CMAKE_C_COMPILER} --version OUTPUT_VARIABLE _clang_output)
45+
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" _clang_version ${_clang_output})
46+
47+
if(_clang_version VERSION_LESS "9.0")
48+
target_link_libraries(libarchfpga c++fs)
49+
endif()
50+
endif()
51+
2852
target_compile_definitions(libarchfpga PUBLIC ${INTERCHANGE_SCHEMA_HEADERS})
2953

3054
#Create the test executable

libs/libarchfpga/src/device_grid.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
#include "device_grid.h"
22

3+
#include <utility>
4+
35
DeviceGrid::DeviceGrid(std::string grid_name, vtr::NdMatrix<t_grid_tile, 3> grid)
4-
: name_(grid_name)
5-
, grid_(grid) {
6+
: name_(std::move(grid_name))
7+
, grid_(std::move(grid)) {
68
count_instances();
79
}
810

911
DeviceGrid::DeviceGrid(std::string grid_name, vtr::NdMatrix<t_grid_tile, 3> grid, std::vector<t_logical_block_type_ptr> limiting_res)
10-
: DeviceGrid(grid_name, grid) {
11-
limiting_resources_ = limiting_res;
12+
: DeviceGrid(std::move(grid_name), std::move(grid)) {
13+
limiting_resources_ = std::move(limiting_res);
1214
}
1315

1416
size_t DeviceGrid::num_instances(t_physical_tile_type_ptr type, int layer_num) const {

0 commit comments

Comments
 (0)