Skip to content

Commit 34f583a

Browse files
authored
Merge branch 'master' into floorplan_constraints_tuning
2 parents f6f6d6a + 606b079 commit 34f583a

File tree

25 files changed

+128
-162
lines changed

25 files changed

+128
-162
lines changed

.github/kokoro/presubmit/nightly.cfg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ action {
1616
regex: "**/place.log"
1717
regex: "**/route.log"
1818
regex: "**/*_qor.csv"
19+
regex: "**/*.out.gz"
20+
regex: "**/vpr_stdout.log.gz"
21+
regex: "**/parse_results.txt.gz"
22+
regex: "**/qor_results.txt.gz"
23+
regex: "**/pack.log.gz"
24+
regex: "**/place.log.gz"
25+
regex: "**/route.log.gz"
26+
regex: "**/*_qor.csv.gz"
1927
strip_prefix: "github/vtr-verilog-to-routing/"
2028
}
2129
}

ODIN_II/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ endforeach()
189189
#Supress IPO link warnings if IPO is enabled
190190
get_target_property(ODIN_USES_IPO odin_II INTERPROCEDURAL_OPTIMIZATION)
191191
if (ODIN_USES_IPO)
192-
set_target_properties(odin_II PROPERTIES LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
192+
set_property(TARGET odin_II APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
193193
endif()
194194

195195
#add strict odin compiler flags, if set

blifexplorer/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ else()
5959
#Supress IPO link warnings if IPO is enabled
6060
get_target_property(TEST_BLIFEXPLORER_USES_IPO blifexplorer INTERPROCEDURAL_OPTIMIZATION)
6161
if (TEST_BLIFEXPLORER_USES_IPO)
62-
set_target_properties(blifexplorer PROPERTIES LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
62+
set_property(TARGET blifexplorer APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
6363
endif()
6464

6565

dev/pylint_check.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090

9191

9292
class TermColor:
93-
""" Terminal codes for printing in color """
93+
"""Terminal codes for printing in color"""
9494

9595
# pylint: disable=too-few-public-methods
9696

@@ -105,14 +105,14 @@ class TermColor:
105105

106106

107107
def error(*msg, returncode=-1):
108-
""" Print an error message and exit program """
108+
"""Print an error message and exit program"""
109109

110110
print(TermColor.RED + "ERROR:", " ".join(str(item) for item in msg), TermColor.END)
111111
sys.exit(returncode)
112112

113113

114114
def expand_paths():
115-
""" Build a list of all python files to process by going through 'paths_to_lint' """
115+
"""Build a list of all python files to process by going through 'paths_to_lint'"""
116116

117117
paths = []
118118
for (path, is_recursive) in paths_to_lint:

libs/EXTERNAL/libblifparse/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ if (USES_IPO)
5757
CHECK_CXX_COMPILER_FLAG(${flag} CXX_COMPILER_SUPPORTS_${flag})
5858
if(CXX_COMPILER_SUPPORTS_${flag})
5959
#Flag supported, so enable it
60-
set_target_properties(blifparse_test PROPERTIES LINK_FLAGS ${flag})
60+
set_property(TARGET blifparse_test APPEND PROPERTY LINK_FLAGS ${flag})
6161
endif()
6262
endforeach()
6363
endif()
@@ -69,4 +69,4 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
6969
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/test/test_parser.sh ${CMAKE_CURRENT_SOURCE_DIR}/test/*/*.blif ${CMAKE_CURRENT_SOURCE_DIR}/test/*/*.eblif)
7070
endif()
7171

72-
install(TARGETS libblifparse blifparse_test DESTINATION bin)
72+
install(TARGETS libblifparse DESTINATION bin)

libs/EXTERNAL/libsdcparse/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ if (USES_IPO)
6161
CHECK_CXX_COMPILER_FLAG(${flag} CXX_COMPILER_SUPPORTS_${flag})
6262
if(CXX_COMPILER_SUPPORTS_${flag})
6363
#Flag supported, so enable it
64-
set_target_properties(sdcparse_test PROPERTIES LINK_FLAGS ${flag})
64+
set_property(TARGET sdcparse_test APPEND PROPERTY LINK_FLAGS ${flag})
6565
endif()
6666
endforeach()
6767
endif()
6868

69-
install(TARGETS libsdcparse sdcparse_test DESTINATION bin)
69+
install(TARGETS libsdcparse DESTINATION bin)

libs/libarchfpga/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ target_link_libraries(read_arch libarchfpga)
3030
#Supress IPO link warnings if IPO is enabled
3131
get_target_property(READ_ARCH_USES_IPO read_arch INTERPROCEDURAL_OPTIMIZATION)
3232
if (READ_ARCH_USES_IPO)
33-
set_target_properties(read_arch PROPERTIES LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
33+
set_property(TARGET read_arch APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
3434
endif()
3535

3636
install(TARGETS libarchfpga read_arch DESTINATION bin)

libs/liblog/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ set_target_properties(liblog PROPERTIES PREFIX "") #Avoid extra 'lib' prefix
2121
add_executable(test_log ${EXEC_SOURCES})
2222
target_link_libraries(test_log liblog)
2323

24-
install(TARGETS test_log liblog DESTINATION bin)
24+
install(TARGETS liblog DESTINATION bin)

libs/librtlnumber/src/include/internal_bits.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ class VNumber {
728728
VNumber(VNumber other, size_t length) {
729729
this->sign = other.sign;
730730
this->bitstring = other.bitstring.resize(other.get_padding_bit(), length);
731-
// TODO this->defined_size = true?????;
731+
this->defined_size = other.defined_size;
732732
}
733733

734734
VNumber(const std::string& verilog_string) {

libs/libvtrutil/src/vtr_vector_map.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ namespace vtr {
2929
* If you need a fully featured std::map like container without the above differences see
3030
* vtr::linear_map.
3131
*
32-
* If you do not need std::map-like features see vtr::vector.
32+
* If you do not need std::map-like features see vtr::vector. Note that vtr::vector_map is very similar
33+
* to vtr::vector. Unless there is a specific reason that vtr::vector_map is needed, it is better to use vtr::vector.
3334
*
3435
* Note that it is possible to use vector_map with sparse/non-contiguous keys, but this is typically
3536
* memory inefficient as the underlying vector will allocate space for [0..size_t(max_key)-1],
@@ -39,6 +40,7 @@ namespace vtr {
3940
* when a given index/key before it is accessed. The exception to this are the find(), insert() and
4041
* update() methods which handle non-existing keys gracefully.
4142
*/
43+
4244
template<typename K, typename V, typename Sentinel = DefaultSentinel<V>>
4345
class vector_map {
4446
public: //Public types

run_reg_test.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323

2424
def vtr_command_argparser(prog=None):
25-
""" Parses the arguments of run_reg_test """
25+
"""Parses the arguments of run_reg_test"""
2626

2727
description = textwrap.dedent(
2828
"""
@@ -205,7 +205,7 @@ def vtr_command_main(arg_list, prog=None):
205205

206206

207207
def display_qor(reg_test):
208-
""" Display the qor tests script files to be run outside of this script """
208+
"""Display the qor tests script files to be run outside of this script"""
209209
test_dir = paths.regression_tests_path / reg_test
210210
if not (test_dir / "qor_geomean.txt").is_file():
211211
print("QoR results do not exist ({}/qor_geomean.txt)".format(str(test_dir)))
@@ -250,7 +250,7 @@ def display_qor(reg_test):
250250

251251

252252
def run_odin_test(args, test_name):
253-
""" Run ODIN II test with given test name """
253+
"""Run ODIN II test with given test name"""
254254
odin_reg_script = [
255255
str(paths.odin_verify_path),
256256
"--clean",
@@ -294,7 +294,7 @@ def run_odin_test(args, test_name):
294294

295295

296296
def collect_task_list(reg_test):
297-
""" create a list of task files """
297+
"""create a list of task files"""
298298
task_list_filepath = paths.tasks_path / "regression_tests" / reg_test / "task_list.txt"
299299
if not task_list_filepath.is_file():
300300
raise IOError("Test does not exist: {}".format(reg_test))
@@ -316,7 +316,7 @@ def run_tasks(args, task_lists):
316316

317317

318318
def parse_single_test(task_lists, check=True, calculate=True, create=False):
319-
""" parse the test results """
319+
"""parse the test results"""
320320
vtr_task_cmd = ["-l"] + [task_lists]
321321
if check:
322322
vtr_task_cmd += ["-check_golden"]
@@ -330,7 +330,7 @@ def parse_single_test(task_lists, check=True, calculate=True, create=False):
330330

331331

332332
def print_header(heading, divider="=", print_first_line=True):
333-
""" Print heading formated in the center of two lines """
333+
"""Print heading formated in the center of two lines"""
334334
if print_first_line:
335335
print(divider * len(heading) * 2)
336336
print(" " * int((len(heading) / 2)), end="")

utils/fasm/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ target_link_libraries(genfasm fasm)
3030
#Supress IPO link warnings if IPO is enabled
3131
get_target_property(GENFASM_USES_IPO genfasm INTERPROCEDURAL_OPTIMIZATION)
3232
if (GENFASM_USES_IPO)
33-
set_target_properties(genfasm PROPERTIES LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
33+
set_property(TARGET genfasm APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
3434
endif()
3535

3636
#Specify link-time dependancies
@@ -52,7 +52,7 @@ target_link_libraries(test_fasm fasm libcatch)
5252
#Supress IPO link warnings if IPO is enabled
5353
get_target_property(TEST_FASM_USES_IPO test_fasm INTERPROCEDURAL_OPTIMIZATION)
5454
if (TEST_FASM_USES_IPO)
55-
set_target_properties(test_fasm PROPERTIES LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
55+
set_property(TARGET test_fasm APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
5656
endif()
5757

5858
add_test(

utils/route_diag/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ target_link_libraries(route_diag
1111
#Supress IPO link warnings if IPO is enabled
1212
get_target_property(TEST_ROUTE_DIAG_USES_IPO route_diag INTERPROCEDURAL_OPTIMIZATION)
1313
if (TEST_ROUTE_DIAG_USES_IPO)
14-
set_target_properties(route_diag PROPERTIES LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
14+
set_property(TARGET route_diag APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
1515
endif()
1616

vpr/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ target_link_libraries(vpr libvpr)
135135
#Supress IPO link warnings if IPO is enabled
136136
get_target_property(VPR_USES_IPO vpr INTERPROCEDURAL_OPTIMIZATION)
137137
if (VPR_USES_IPO)
138-
set_target_properties(vpr PROPERTIES LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
138+
set_property(TARGET vpr APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
139139
endif()
140140

141141

@@ -263,7 +263,7 @@ target_link_libraries(test_vpr
263263
#Supress IPO link warnings if IPO is enabled
264264
get_target_property(TEST_VPR_USES_IPO vpr INTERPROCEDURAL_OPTIMIZATION)
265265
if (TEST_VPR_USES_IPO)
266-
set_target_properties(test_vpr PROPERTIES LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
266+
set_property(TARGET test_vpr APPEND PROPERTY LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS})
267267
endif()
268268

269269
add_test(NAME test_vpr

vpr/src/base/SetupVPR.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "read_options.h"
2525
#include "echo_files.h"
2626
#include "clock_modeling.h"
27+
#include "ShowSetup.h"
2728

2829
static void SetupNetlistOpts(const t_options& Options, t_netlist_opts& NetlistOpts);
2930
static void SetupPackerOpts(const t_options& Options,
@@ -70,7 +71,8 @@ void SetupVPR(const t_options* Options,
7071
int* GraphPause,
7172
bool* SaveGraphics,
7273
std::string* GraphicsCommands,
73-
t_power_opts* PowerOpts) {
74+
t_power_opts* PowerOpts,
75+
t_vpr_setup* vpr_setup) {
7476
using argparse::Provenance;
7577

7678
auto& device_ctx = g_vpr_ctx.mutable_device();
@@ -113,6 +115,7 @@ void SetupVPR(const t_options* Options,
113115
device_ctx.physical_tile_types,
114116
device_ctx.logical_block_types);
115117
}
118+
VTR_LOG("\n");
116119

117120
*user_models = Arch->models;
118121
*library_models = Arch->model_library;
@@ -211,6 +214,8 @@ void SetupVPR(const t_options* Options,
211214
}
212215
}
213216

217+
ShowSetup(*vpr_setup);
218+
214219
/* init global variables */
215220
vtr::out_file_prefix = Options->out_file_prefix;
216221

vpr/src/base/SetupVPR.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ void SetupVPR(const t_options* Options,
2727
int* GraphPause,
2828
bool* SaveGraphics,
2929
std::string* GraphicsCommands,
30-
t_power_opts* PowerOpts);
30+
t_power_opts* PowerOpts,
31+
t_vpr_setup* vpr_setup);
3132
#endif

vpr/src/base/ShowSetup.cpp

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ static void ShowRouterOpts(const t_router_opts& RouterOpts);
2020
static void ShowAnalysisOpts(const t_analysis_opts& AnalysisOpts);
2121

2222
static void ShowAnnealSched(const t_annealing_sched& AnnealSched);
23-
static void ShowRoutingArch(const t_det_routing_arch& RoutingArch);
2423

2524
/******** Function Implementations ********/
2625

@@ -40,6 +39,8 @@ void ShowSetup(const t_vpr_setup& vpr_setup) {
4039
VTR_LOG("Analysis: %s\n", (vpr_setup.AnalysisOpts.doAnalysis ? "ENABLED" : "DISABLED"));
4140
VTR_LOG("\n");
4241

42+
VTR_LOG("VPR was run with the following options:\n\n");
43+
4344
ShowNetlistOpts(vpr_setup.NetlistOpts);
4445

4546
if (vpr_setup.PackerOpts.doPacking) {
@@ -54,9 +55,6 @@ void ShowSetup(const t_vpr_setup& vpr_setup) {
5455
if (vpr_setup.AnalysisOpts.doAnalysis) {
5556
ShowAnalysisOpts(vpr_setup.AnalysisOpts);
5657
}
57-
58-
if (DETAILED == vpr_setup.RouterOpts.route_type)
59-
ShowRoutingArch(vpr_setup.RoutingArch);
6058
}
6159

6260
void printClusteredNetlistStats() {
@@ -107,46 +105,6 @@ void printClusteredNetlistStats() {
107105
num_blocks_type.clear();
108106
}
109107

110-
static void ShowRoutingArch(const t_det_routing_arch& RoutingArch) {
111-
VTR_LOG("RoutingArch.directionality: ");
112-
switch (RoutingArch.directionality) {
113-
case BI_DIRECTIONAL:
114-
VTR_LOG("BI_DIRECTIONAL\n");
115-
break;
116-
case UNI_DIRECTIONAL:
117-
VTR_LOG("UNI_DIRECTIONAL\n");
118-
break;
119-
default:
120-
VPR_FATAL_ERROR(VPR_ERROR_UNKNOWN, "<Unknown>\n");
121-
break;
122-
}
123-
124-
VTR_LOG("RoutingArch.switch_block_type: ");
125-
switch (RoutingArch.switch_block_type) {
126-
case SUBSET:
127-
VTR_LOG("SUBSET\n");
128-
break;
129-
case WILTON:
130-
VTR_LOG("WILTON\n");
131-
break;
132-
case UNIVERSAL:
133-
VTR_LOG("UNIVERSAL\n");
134-
break;
135-
case FULL:
136-
VTR_LOG("FULL\n");
137-
break;
138-
case CUSTOM:
139-
VTR_LOG("CUSTOM\n");
140-
break;
141-
default:
142-
VTR_LOG_ERROR("switch block type\n");
143-
}
144-
145-
VTR_LOG("RoutingArch.Fs: %d\n", RoutingArch.Fs);
146-
147-
VTR_LOG("\n");
148-
}
149-
150108
static void ShowAnnealSched(const t_annealing_sched& AnnealSched) {
151109
VTR_LOG("AnnealSched.type: ");
152110
switch (AnnealSched.type) {

vpr/src/base/vpr_api.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ void vpr_init_with_options(const t_options* options, t_vpr_setup* vpr_setup, t_a
295295
&vpr_setup->GraphPause,
296296
&vpr_setup->SaveGraphics,
297297
&vpr_setup->GraphicsCommands,
298-
&vpr_setup->PowerOpts);
298+
&vpr_setup->PowerOpts,
299+
vpr_setup);
299300

300301
/* Check inputs are reasonable */
301302
CheckArch(*arch);
@@ -357,8 +358,6 @@ void vpr_init_with_options(const t_options* options, t_vpr_setup* vpr_setup, t_a
357358
}
358359

359360
fflush(stdout);
360-
361-
ShowSetup(*vpr_setup);
362361
}
363362

364363
bool vpr_flow(t_vpr_setup& vpr_setup, t_arch& arch) {
@@ -1140,7 +1139,8 @@ void vpr_setup_vpr(t_options* Options,
11401139
int* GraphPause,
11411140
bool* SaveGraphics,
11421141
std::string* GraphicsCommands,
1143-
t_power_opts* PowerOpts) {
1142+
t_power_opts* PowerOpts,
1143+
t_vpr_setup* vpr_setup) {
11441144
SetupVPR(Options,
11451145
TimingEnabled,
11461146
readArchFile,
@@ -1162,7 +1162,8 @@ void vpr_setup_vpr(t_options* Options,
11621162
GraphPause,
11631163
SaveGraphics,
11641164
GraphicsCommands,
1165-
PowerOpts);
1165+
PowerOpts,
1166+
vpr_setup);
11661167
}
11671168

11681169
void vpr_check_arch(const t_arch& Arch) {

vpr/src/base/vpr_api.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ void vpr_setup_vpr(t_options* Options,
163163
int* GraphPause,
164164
bool* SaveGraphics,
165165
std::string* GraphicsCommands,
166-
t_power_opts* PowerOpts);
166+
t_power_opts* PowerOpts,
167+
t_vpr_setup* vpr_setup);
167168

168169
///@brief Check inputs are reasonable
169170
void vpr_check_arch(const t_arch& Arch);

0 commit comments

Comments
 (0)