Skip to content

Commit e689ada

Browse files
committed
Fixed compilation errors when VERBOSE is enabled
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
1 parent a7653b1 commit e689ada

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

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-
int 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,
@@ -2848,7 +2848,7 @@ int check_macro_placement_consistency() {
28482848
}
28492849

28502850
#ifdef VERBOSE
2851-
static void print_clb_placement(const char* fname) {
2851+
void print_clb_placement(const char* fname) {
28522852
/* Prints out the clb placements to a file. */
28532853
FILE* fp;
28542854
auto& cluster_ctx = g_vpr_ctx.clustering();
@@ -2859,7 +2859,7 @@ static void print_clb_placement(const char* fname) {
28592859

28602860
fprintf(fp, "Block #\tName\t(X, Y, Z).\n");
28612861
for (auto i : cluster_ctx.clb_nlist.blocks()) {
2862-
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);
2862+
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);
28632863
}
28642864

28652865
fclose(fp);

vpr/src/place/timing_place_lookup.cpp

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

502502
#ifdef VERBOSE
503503
VTR_LOG("Computed delay: %12g delta: %d,%d (src: %d,%d sink: %d,%d)\n",
504-
delay,
504+
delays[size_t(sink_rr_node)],
505505
delta_x, delta_y,
506506
source_x, source_y,
507507
sink_x, sink_y);

0 commit comments

Comments
 (0)