Skip to content

Commit a39be3e

Browse files
CHANZ is treated similar to CHANX/CHANY in area estimation
1 parent 9b35d59 commit a39be3e

File tree

2 files changed

+8
-29
lines changed

2 files changed

+8
-29
lines changed

vpr/src/route/check_route.cpp

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -425,23 +425,17 @@ static bool check_adjacent(RRNodeId from_node, RRNodeId to_node, bool is_flat) {
425425
from_xhigh = rr_graph.node_xhigh(from_node);
426426
to_xhigh = rr_graph.node_xhigh(to_node);
427427
if (from_ylow == to_ylow) {
428-
/* UDSD Modification by WMF Begin */
429428
/*For Fs > 3, can connect to overlapping wire segment */
430429
if (to_xhigh == from_xlow - 1 || from_xhigh == to_xlow - 1) {
431430
num_adj++;
432-
}
433-
/* Overlapping */
434-
else {
435-
int i;
436-
437-
for (i = from_xlow; i <= from_xhigh; i++) {
431+
} else { // Overlapping
432+
for (int i = from_xlow; i <= from_xhigh; i++) {
438433
if (i >= to_xlow && i <= to_xhigh) {
439434
num_adj++;
440435
break;
441436
}
442437
}
443438
}
444-
/* UDSD Modification by WMF End */
445439
}
446440
} else if (to_type == e_rr_type::CHANY) {
447441
num_adj += rr_graph.nodes_are_adjacent(from_node, to_node);
@@ -460,22 +454,16 @@ static bool check_adjacent(RRNodeId from_node, RRNodeId to_node, bool is_flat) {
460454
from_yhigh = rr_graph.node_yhigh(from_node);
461455
to_yhigh = rr_graph.node_yhigh(to_node);
462456
if (from_xlow == to_xlow) {
463-
/* UDSD Modification by WMF Begin */
464457
if (to_yhigh == from_ylow - 1 || from_yhigh == to_ylow - 1) {
465458
num_adj++;
466-
}
467-
/* Overlapping */
468-
else {
469-
int j;
470-
471-
for (j = from_ylow; j <= from_yhigh; j++) {
459+
} else { // Overlapping
460+
for (int j = from_ylow; j <= from_yhigh; j++) {
472461
if (j >= to_ylow && j <= to_yhigh) {
473462
num_adj++;
474463
break;
475464
}
476465
}
477466
}
478-
/* UDSD Modification by WMF End */
479467
}
480468
} else if (to_type == e_rr_type::CHANX) {
481469
num_adj += rr_graph.nodes_are_adjacent(to_node, from_node);
@@ -495,9 +483,6 @@ static bool check_adjacent(RRNodeId from_node, RRNodeId to_node, bool is_flat) {
495483
num_adj++;
496484
}
497485
} else {
498-
std::cout << describe_rr_node(device_ctx.rr_graph, device_ctx.grid, device_ctx.rr_indexed_data, from_node, is_flat) << std::endl;
499-
std::cout << describe_rr_node(device_ctx.rr_graph, device_ctx.grid, device_ctx.rr_indexed_data, to_node, is_flat) << std::endl;
500-
501486
VPR_FATAL_ERROR(VPR_ERROR_ROUTE,
502487
"in check_adjacent: %d and %d are not adjacent", from_node, to_node);
503488
}

vpr/src/route/rr_graph_generation/rr_graph_area.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -364,21 +364,23 @@ void count_unidir_routing_transistors(std::vector<t_segment_inf>& /*segment_inf*
364364
switch (from_rr_type) {
365365
case e_rr_type::CHANX:
366366
case e_rr_type::CHANY:
367+
case e_rr_type::CHANZ:
367368
num_edges = rr_graph.num_edges(RRNodeId(from_node));
368369

369-
/* Increment number of inputs per cblock if IPIN */
370+
// Increment number of inputs per cblock if IPIN
370371
for (iedge = 0; iedge < num_edges; iedge++) {
371372
RRNodeId to_node = rr_graph.edge_sink_node(RRNodeId(from_node), iedge);
372373
to_rr_type = rr_graph.node_type(to_node);
373374

374-
/* Ignore any uninitialized rr_graph nodes */
375+
// Ignore any uninitialized rr_graph nodes
375376
if (!rr_graph.node_is_initialized(to_node)) {
376377
continue;
377378
}
378379

379380
switch (to_rr_type) {
380381
case e_rr_type::CHANX:
381382
case e_rr_type::CHANY:
383+
case e_rr_type::CHANZ:
382384
if (!chan_node_switch_done[size_t(to_node)]) {
383385
int switch_index = rr_graph.edge_switch(RRNodeId(from_node), iedge);
384386
SwitchType switch_type = rr_graph.rr_switch_inf(RRSwitchId(switch_index)).type();
@@ -433,10 +435,6 @@ void count_unidir_routing_transistors(std::vector<t_segment_inf>& /*segment_inf*
433435
case e_rr_type::SINK:
434436
break; //ignore virtual sinks
435437

436-
case e_rr_type::CHANZ:
437-
// TODO: handle chanz
438-
break;
439-
440438
default:
441439
VPR_ERROR(VPR_ERROR_ROUTE,
442440
"in count_routing_transistors:\n"
@@ -463,10 +461,6 @@ void count_unidir_routing_transistors(std::vector<t_segment_inf>& /*segment_inf*
463461
case e_rr_type::OPIN:
464462
break;
465463

466-
case e_rr_type::CHANZ:
467-
// TODO: handle chanz
468-
break;
469-
470464
default:
471465
break;
472466

0 commit comments

Comments
 (0)