Skip to content

Commit 91b74c5

Browse files
Merge branch 'master' into specify_moves_explicitly
2 parents 8e28113 + c9fcf98 commit 91b74c5

File tree

20 files changed

+115
-104
lines changed

20 files changed

+115
-104
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 \

CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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/vpr/command_line_usage.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,6 +1298,13 @@ 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+
Controls the directedness of the timing-driven router's exploration when doing router delay profiling of an architecture.
1303+
The router delay profiling step is currently used to calculate the place delay matrix lookup.
1304+
Values between 1 and 2 are resonable; higher values trade some quality for reduced run-time.
1305+
1306+
**Default:** ``1.2``
1307+
13011308
.. option:: --max_criticality <float>
13021309

13031310
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/libcatch2

Submodule libcatch2 updated 110 files

libs/librrgraph/src/base/rr_graph_storage.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,13 @@ class edge_sort_iterator {
155155
using pointer = edge_swapper*;
156156
using difference_type = ssize_t;
157157

158+
// In order for this class to be used as an iterator within the std library,
159+
// it needs to "act" like a pointer. One thing that it should do is that a
160+
// const variable of this type should be de-referenceable. Therefore, this
161+
// method should be const method; however, this requires modifying the class
162+
// and may yield worst performance. For now the std::stable_sort allows this
163+
// but in the future it may not. If this breaks, this is why.
164+
// See issue #2517 and PR #2522
158165
edge_swapper& operator*() {
159166
return this->swapper_;
160167
}
@@ -419,7 +426,7 @@ size_t t_rr_graph_storage::count_rr_switches(
419426
// values.
420427
//
421428
// This sort is safe to do because partition_edges() has not been invoked yet.
422-
std::sort(
429+
std::stable_sort(
423430
edge_sort_iterator(this, 0),
424431
edge_sort_iterator(this, edge_dest_node_.size()),
425432
edge_compare_dest_node());
@@ -527,7 +534,7 @@ void t_rr_graph_storage::partition_edges(const vtr::vector<RRSwitchId, t_rr_swit
527534
// by assign_first_edges()
528535
// - Edges within a source node have the configurable edges before the
529536
// non-configurable edges.
530-
std::sort(
537+
std::stable_sort(
531538
edge_sort_iterator(this, 0),
532539
edge_sort_iterator(this, edge_src_node_.size()),
533540
edge_compare_src_node_and_configurable_first(rr_switches));

libs/libvtrutil/src/vtr_util.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static int cont; /* line continued? (used by strtok)*/
2626
*
2727
* The split strings (excluding the delimiters) are returned
2828
*/
29-
std::vector<std::string> split(const char* text, const std::string& delims) {
29+
std::vector<std::string> split(const char* text, std::string_view delims) {
3030
if (text) {
3131
std::string text_str(text);
3232
return split(text_str, delims);
@@ -39,13 +39,13 @@ std::vector<std::string> split(const char* text, const std::string& delims) {
3939
*
4040
* The split strings (excluding the delimiters) are returned
4141
*/
42-
std::vector<std::string> split(const std::string& text, const std::string& delims) {
42+
std::vector<std::string> split(std::string_view text, std::string_view delims) {
4343
std::vector<std::string> tokens;
4444

4545
std::string curr_tok;
4646
for (char c : text) {
4747
if (delims.find(c) != std::string::npos) {
48-
//Delimeter character
48+
//Delimiter character
4949
if (!curr_tok.empty()) {
5050
//At the end of the token
5151

@@ -58,7 +58,7 @@ std::vector<std::string> split(const std::string& text, const std::string& delim
5858
//Pass
5959
}
6060
} else {
61-
//Non-delimeter append to token
61+
//Non-delimiter append to token
6262
curr_tok += c;
6363
}
6464
}
@@ -72,18 +72,18 @@ std::vector<std::string> split(const std::string& text, const std::string& delim
7272
}
7373

7474
///@brief Returns 'input' with the first instance of 'search' replaced with 'replace'
75-
std::string replace_first(const std::string& input, const std::string& search, const std::string& replace) {
75+
std::string replace_first(std::string_view input, std::string_view search, std::string_view replace) {
7676
auto pos = input.find(search);
7777

7878
std::string output(input, 0, pos);
7979
output += replace;
80-
output += std::string(input, pos + search.size());
80+
output += input.substr(pos + search.size());
8181

8282
return output;
8383
}
8484

8585
///@brief Returns 'input' with all instances of 'search' replaced with 'replace'
86-
std::string replace_all(const std::string& input, const std::string& search, const std::string& replace) {
86+
std::string replace_all(std::string_view input, std::string_view search, std::string_view replace) {
8787
std::string output;
8888

8989
size_t last = 0;
@@ -101,8 +101,8 @@ std::string replace_all(const std::string& input, const std::string& search, con
101101
return output;
102102
}
103103

104-
///@brief Retruns true if str starts with prefix
105-
bool starts_with(const std::string& str, const std::string& prefix) {
104+
///@brief Returns true if str starts with prefix
105+
bool starts_with(const std::string& str, std::string_view prefix) {
106106
return str.find(prefix) == 0;
107107
}
108108

@@ -195,7 +195,7 @@ char* strdup(const char* str) {
195195
* and/or correct 'unexpected' behaviour of the standard c-functions
196196
*/
197197
template<class T>
198-
T atoT(const std::string& value, const std::string& type_name) {
198+
T atoT(const std::string& value, std::string_view type_name) {
199199
//The c version of atof doesn't catch errors.
200200
//
201201
//This version uses stringstream to detect conversion errors
@@ -461,8 +461,8 @@ bool file_exists(const char* filename) {
461461
*
462462
* Returns true if the extension is correct, and false otherwise.
463463
*/
464-
bool check_file_name_extension(const std::string& file_name,
465-
const std::string& file_extension) {
464+
bool check_file_name_extension(std::string_view file_name,
465+
std::string_view file_extension) {
466466
auto ext = std::filesystem::path(file_name).extension();
467467
return ext == file_extension;
468468
}

libs/libvtrutil/src/vtr_util.h

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <algorithm>
55
#include <vector>
66
#include <string>
7+
#include <string_view>
78
#include <cstdarg>
89
#include <array>
910

@@ -14,17 +15,17 @@ namespace vtr {
1415
*
1516
* The split strings (excluding the delimiters) are returned
1617
*/
17-
std::vector<std::string> split(const char* text, const std::string& delims = " \t\n");
18-
std::vector<std::string> split(const std::string& text, const std::string& delims = " \t\n");
18+
std::vector<std::string> split(const char* text, std::string_view string_view = " \t\n");
19+
std::vector<std::string> split(std::string_view text, std::string_view delims = " \t\n");
1920

2021
///@brief Returns 'input' with the first instance of 'search' replaced with 'replace'
21-
std::string replace_first(const std::string& input, const std::string& search, const std::string& replace);
22+
std::string replace_first(std::string_view input, std::string_view search, std::string_view replace);
2223

2324
///@brief Returns 'input' with all instances of 'search' replaced with 'replace'
24-
std::string replace_all(const std::string& input, const std::string& search, const std::string& replace);
25+
std::string replace_all(std::string_view input, std::string_view search, std::string_view replace);
2526

2627
///@brief Retruns true if str starts with prefix
27-
bool starts_with(const std::string& str, const std::string& prefix);
28+
bool starts_with(const std::string& str, std::string_view prefix);
2829

2930
///@brief Returns a std::string formatted using a printf-style format string
3031
std::string string_fmt(const char* fmt, ...);
@@ -39,13 +40,13 @@ std::string vstring_fmt(const char* fmt, va_list args);
3940
* would return "home/user/my_files/test.blif"
4041
*/
4142
template<typename Iter>
42-
std::string join(Iter begin, Iter end, std::string delim);
43+
std::string join(Iter begin, Iter end, std::string_view delim);
4344

4445
template<typename Container>
45-
std::string join(Container container, std::string delim);
46+
std::string join(Container container, std::string_view delim);
4647

4748
template<typename T>
48-
std::string join(std::initializer_list<T> list, std::string delim);
49+
std::string join(std::initializer_list<T> list, std::string_view delim);
4950

5051
template<typename Container>
5152
void uniquify(Container container);
@@ -69,7 +70,7 @@ double atod(const std::string& value);
6970
*/
7071
int get_file_line_number_of_last_opened_file();
7172
bool file_exists(const char* filename);
72-
bool check_file_name_extension(const std::string& file_name, const std::string& file_extension);
73+
bool check_file_name_extension(std::string_view file_name, std::string_view file_extension);
7374

7475
extern std::string out_file_prefix;
7576

@@ -82,7 +83,7 @@ std::vector<std::string> ReadLineTokens(FILE* InFile, int* LineNum);
8283
* @brief Template join function implementation
8384
*/
8485
template<typename Iter>
85-
std::string join(Iter begin, Iter end, std::string delim) {
86+
std::string join(Iter begin, Iter end, std::string_view delim) {
8687
std::string joined_str;
8788
for (auto iter = begin; iter != end; ++iter) {
8889
joined_str += *iter;
@@ -94,12 +95,12 @@ std::string join(Iter begin, Iter end, std::string delim) {
9495
}
9596

9697
template<typename Container>
97-
std::string join(Container container, std::string delim) {
98+
std::string join(Container container, std::string_view delim) {
9899
return join(std::begin(container), std::end(container), delim);
99100
}
100101

101102
template<typename T>
102-
std::string join(std::initializer_list<T> list, std::string delim) {
103+
std::string join(std::initializer_list<T> list, std::string_view delim) {
103104
return join(list.begin(), list.end(), delim);
104105
}
105106

0 commit comments

Comments
 (0)