Skip to content

Commit 43d4422

Browse files
committed
Merge branch 'openfpga' of github.com:verilog-to-routing/vtr-verilog-to-routing into openfpga
2 parents 1959805 + 679a3b4 commit 43d4422

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

vpr/src/draw/draw_basic.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,12 +384,14 @@ void draw_routing_costs(ezgl::renderer* g) {
384384
auto& device_ctx = g_vpr_ctx.device();
385385
auto& route_ctx = g_vpr_ctx.routing();
386386
g->set_line_width(0);
387-
387+
388388
VTR_ASSERT(!route_ctx.rr_node_route_inf.empty());
389389

390390
float min_cost = std::numeric_limits<float>::infinity();
391391
float max_cost = -min_cost;
392-
vtr::vector<RRNodeId, float> rr_node_costs(0.);
392+
393+
size_t node_count = device_ctx.rr_graph.nodes().size();
394+
vtr::vector<RRNodeId, float> rr_node_costs(node_count, 0.);
393395

394396
for (const RRNodeId inode : device_ctx.rr_graph.nodes()) {
395397
float cost = 0.;

0 commit comments

Comments
 (0)