Skip to content

Commit 3dbf54f

Browse files
authored
Merge pull request #1915 from byuccl/describe_rr_node
Small improvements to string description of rr nodes
2 parents a517b70 + 8b7752f commit 3dbf54f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

vpr/src/device/rr_graph_view.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,11 @@ class RRGraphView {
202202
// and the end to the lower coordinate
203203
start_x = " (" + std::to_string(node_xhigh(node)) + ","; //start and end coordinates are the same for OPINs and IPINs
204204
start_y = std::to_string(node_yhigh(node)) + ")";
205-
end_x = "";
206-
end_y = "";
207-
arrow = "";
208-
}
209-
if (node_type(node) == CHANX || node_type(node) == CHANY) { //for channels, we would like to describe the component with segment specific information
205+
} else if (node_type(node) == SOURCE || node_type(node) == SINK) {
206+
// For SOURCE and SINK the starting and ending coordinate are identical, so just use start
207+
start_x = "(" + std::to_string(node_xhigh(node)) + ",";
208+
start_y = std::to_string(node_yhigh(node)) + ")";
209+
} else if (node_type(node) == CHANX || node_type(node) == CHANY) { //for channels, we would like to describe the component with segment specific information
210210
RRIndexedDataId cost_index = node_cost_index(node);
211211
int seg_index = rr_indexed_data_[cost_index].seg_index;
212212
coordinate_string += rr_segments_[seg_index].name; //Write the segment name

vpr/src/route/rr_graph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2464,7 +2464,7 @@ std::string describe_rr_node(int inode) {
24642464
msg += vtr::string_fmt(" fan-in: %d", rr_graph.node_fan_in(RRNodeId(inode)));
24652465
msg += vtr::string_fmt(" fan-out: %d", rr_node.num_edges());
24662466

2467-
msg += rr_graph.node_coordinate_to_string(RRNodeId(inode));
2467+
msg += " " + rr_graph.node_coordinate_to_string(RRNodeId(inode));
24682468

24692469
return msg;
24702470
}

0 commit comments

Comments
 (0)