Skip to content

Commit ebabb0d

Browse files
Merge branch 'master' into fix_fixed_clusters_issue
2 parents 544d175 + 164b453 commit ebabb0d

File tree

18 files changed

+95
-98
lines changed

18 files changed

+95
-98
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/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/libarchfpga/src/arch_util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const char* get_arch_file_name() {
3535
return arch_file_name;
3636
}
3737

38-
InstPort::InstPort(std::string str) {
38+
InstPort::InstPort(const std::string& str) {
3939
std::vector<std::string> inst_port = vtr::split(str, ".");
4040

4141
if (inst_port.size() == 1) {

libs/libarchfpga/src/arch_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class InstPort {
2222
static constexpr int UNSPECIFIED = -1;
2323

2424
InstPort() = default;
25-
InstPort(std::string str);
25+
InstPort(const std::string& str);
2626
std::string instance_name() const { return instance_.name; }
2727
std::string port_name() const { return port_.name; }
2828

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)