Skip to content

Commit 83aced0

Browse files
authored
Merge branch 'master' into 2089_tight_floorplan_regression_test
2 parents 9aa88be + f265293 commit 83aced0

File tree

8 files changed

+46
-10
lines changed

8 files changed

+46
-10
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ jobs:
6868
Build:
6969
name: 'B: Building VtR'
7070
runs-on: ubuntu-18.04
71+
strategy:
72+
fail-fast: false
73+
matrix:
74+
include:
75+
- { build_type: 'release', verbose: '0' }
76+
- { build_type: 'debug', verbose: '0' }
77+
- { build_type: 'debug', verbose: '1' }
7178
steps:
7279

7380
- uses: actions/setup-python@v2
@@ -80,10 +87,10 @@ jobs:
8087

8188
- name: Test
8289
env:
83-
BUILD_TYPE: release
90+
BUILD_TYPE: ${{ matrix.build_type }}
8491
run: |
8592
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
86-
./.github/scripts/build.sh
93+
./.github/scripts/build.sh VERBOSE=${{ matrix.verbose }}
8794
8895
8996
Format:

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ option(VTR_ENABLE_SANITIZE "Enable address/leak/undefined-behaviour sanitizers (
3131
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)
34+
option(VTR_ENABLE_VERBOSE "Enable increased debug verbosity" OFF)
3435

3536
#Allow the user to decide whether to compile the graphics library
3637
set(VPR_USE_EZGL "auto" CACHE STRING "Specify whether vpr uses the graphics library")
@@ -285,6 +286,14 @@ if(VTR_ENABLE_DEBUG_LOGGING)
285286
message(STATUS "Logging Flags: ${LOGGING_FLAGS}")
286287
endif()
287288

289+
#
290+
# Increased debugging vebosity
291+
#
292+
if(VTR_ENABLE_VERBOSE)
293+
set(EXTRA_FLAGS "${EXTRA_FLAGS} -DVTR_ENABLE_DEBUG_LOGGING")
294+
message(STATUS "Enabling increased debugging verbosity")
295+
endif()
296+
288297
if (CMAKE_MAKE_PROGRAM EQUAL "ninja" )
289298
#Only for coloured output for ninja, it may be desired
290299
#to not force colours with other make programs (e.g. if

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#
1111
# To perform a debug build use:
1212
# 'make BUILD_TYPE=debug'
13+
#
14+
# To enable debugging verbose messages as well use:
15+
#
16+
# 'make BUILD_TYPE=debug VERBOSE=1'
1317

1418
#Default build type
1519
# Possible values:
@@ -19,6 +23,9 @@
1923
# strict #Build VPR with warnings treated as errors
2024
BUILD_TYPE ?= release
2125

26+
#Debugging verbosity enable
27+
VERBOSE ?= 0
28+
2229
#Convert to lower case for consistency
2330
BUILD_TYPE := $(shell echo $(BUILD_TYPE) | tr '[:upper:]' '[:lower:]')
2431

@@ -36,6 +43,11 @@ ifneq (,$(findstring strict,$(BUILD_TYPE)))
3643
override CMAKE_PARAMS := -DVTR_ENABLE_STRICT_COMPILE=on ${CMAKE_PARAMS}
3744
endif #Strict build type
3845

46+
#Enable verbosity
47+
ifeq ($(VERBOSE),1)
48+
override CMAKE_PARAMS := -DVTR_ENABLE_VERBOSE=on ${CMAKE_PARAMS}
49+
endif
50+
3951
# -s : Suppresss makefile output (e.g. entering/leaving directories)
4052
# --output-sync target : For parallel compilation ensure output for each target is synchronized (make version >= 4.0)
4153
MAKEFLAGS := -s
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
.. _edit_vpr_ui:
22

3-
Editing VPR UI
3+
VPR UI and Graphics
44
--------------
55

66
VPR's UI is created with GTK, and actively maintained/edited through the use of Glade and a main.ui file. We prefer to not use code initializations of Gtk Buttons/UI objects, and instead make them with Glade.
7-
This allows for better organized menus and visual editing of the UI. Please consult the attached guide for Glade: <Link Glade/Gtk quickstart> (WIP as of August 8th, 2022).
7+
This allows for better organized menus and visual editing of the UI. Please consult the attached guide for Glade: <Link Glade/Gtk quickstart> (WIP as of August 24th, 2022).
88

9-
When connecting a button to its function, place it in an appropriate function depending on the drop down menu it will go in. Button setups are done in ui_setup.cpp/h and callback functions are in draw_toggle_functions.cpp/h.
9+
When connecting a button to its function, place it in an appropriate function depending on the drop down menu it will go in. Button setups are done in ui_setup.cpp/h and callback functions are in draw_toggle_functions.cpp/h.
10+
11+
VPR Graphics are drawn using the EZGL graphics library, which is a wrapper around the GTK graphics library (which is used for the UI). EZGL Documentation is found here: http://ug251.eecg.utoronto.ca/ece297s/ezgl_doc/index.html and GTK documentation is found here: https://docs.gtk.org/gtk3/
12+
13+
Make sure to test the UI when you edit it. Ensure that the graphics window opens (using the --disp on command) and click around the UI to ensure the buttons still work. Test all phases (Placement -> Routing) as the UI changes between them.

vpr/src/base/read_circuit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ AtomNetlist read_and_process_circuit(e_circuit_format circuit_format, t_vpr_setu
3333
bool should_sweep_dangling_nets = vpr_setup.NetlistOpts.sweep_dangling_nets;
3434
bool should_sweep_dangling_blocks = vpr_setup.NetlistOpts.sweep_dangling_blocks;
3535
bool should_sweep_constant_primary_outputs = vpr_setup.NetlistOpts.sweep_constant_primary_outputs;
36-
bool verbosity = vpr_setup.NetlistOpts.netlist_verbosity;
36+
int verbosity = vpr_setup.NetlistOpts.netlist_verbosity;
3737

3838
if (circuit_format == e_circuit_format::AUTO) {
3939
auto name_ext = vtr::split_ext(circuit_file);

vpr/src/place/initial_placement.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
#include <chrono>
1717
#include <time.h>
1818

19+
#ifdef VERBOSE
20+
void print_clb_placement(const char* fname);
21+
#endif
22+
1923
/**
2024
* @brief Used to assign each block a score for how difficult it is to place.
2125
* The higher numbers indicate a block is expected to be more difficult to place.

vpr/src/place/place.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ std::unique_ptr<FILE, decltype(&vtr::fclose)> f_move_stats_file(nullptr,
245245

246246
/********************* Static subroutines local to place.c *******************/
247247
#ifdef VERBOSE
248-
static void print_clb_placement(const char* fname);
248+
void print_clb_placement(const char* fname);
249249
#endif
250250

251251
static void alloc_and_load_placement_structs(float place_cost_exp,
@@ -2849,7 +2849,7 @@ int check_macro_placement_consistency() {
28492849
}
28502850

28512851
#ifdef VERBOSE
2852-
static void print_clb_placement(const char* fname) {
2852+
void print_clb_placement(const char* fname) {
28532853
/* Prints out the clb placements to a file. */
28542854
FILE* fp;
28552855
auto& cluster_ctx = g_vpr_ctx.clustering();
@@ -2860,7 +2860,7 @@ static void print_clb_placement(const char* fname) {
28602860

28612861
fprintf(fp, "Block #\tName\t(X, Y, Z).\n");
28622862
for (auto i : cluster_ctx.clb_nlist.blocks()) {
2863-
fprintf(fp, "#%d\t%s\t(%d, %d, %d).\n", i, cluster_ctx.clb_nlist.block_name(i), place_ctx.block_locs[i].x, place_ctx.block_locs[i].y, place_ctx.block_locs[i].sub_tile);
2863+
fprintf(fp, "#%d\t%s\t(%d, %d, %d).\n", i, cluster_ctx.clb_nlist.block_name(i).c_str(), place_ctx.block_locs[i].loc.x, place_ctx.block_locs[i].loc.y, place_ctx.block_locs[i].loc.sub_tile);
28642864
}
28652865

28662866
fclose(fp);

vpr/src/place/timing_place_lookup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ static void generic_compute_matrix_dijkstra_expansion(
513513

514514
#ifdef VERBOSE
515515
VTR_LOG("Computed delay: %12g delta: %d,%d (src: %d,%d sink: %d,%d)\n",
516-
delay,
516+
delays[size_t(sink_rr_node)],
517517
delta_x, delta_y,
518518
source_x, source_y,
519519
sink_x, sink_y);

0 commit comments

Comments
 (0)