Skip to content

Commit 246158b

Browse files
committed
Updated uses of xlow
Signed-off-by: Ethan Rogers <[email protected]>
1 parent 499042b commit 246158b

File tree

1 file changed

+11
-35
lines changed

1 file changed

+11
-35
lines changed

doc/rr_graph_view/uses_of_xlow.md

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Uses of xlow, xhigh, ylow, yhigh
1+
# Uses of xlow, xhigh, ylow, yhigh
22

33
| Function | Use Scenario | One Usage (Location) | Count |
44
| -- | -- | -- | -- |
@@ -14,20 +14,21 @@
1414
| xlow | Count cblocks | rr_graph_area.cpp:229 | 3 |
1515
| xlow | Return the segment number (distance along the channel) of the connection box from from_rr_type (CHANX or CHANY) to to_node (IPIN) | rr_graph_util.cpp:21 | 1 |
1616
| xlow | Check direction going from one node to another| rr_graph_util.cpp:45 | 1 |
17-
| xlow | Write Coordinates | VprTimingGraphResolver.cpp:345 | 1 |
17+
| xlow | Write Coordinates | VprTimingGraphResolver.cpp:345 | 1 |
18+
1819
<br><br><br>
1920

20-
## Retrieve Physical Tile from device_ctx.grid
21-
```cpp
22-
static std::string get_pin_feature (size_t inode) {
23-
auto& device_ctx = g_vpr_ctx.device();
21+
# Some snippets of code
2422

23+
## Retrieve Physical Tile from device_ctx.grid (`test_fasm.cpp:193`)
24+
```cpp
2525
// Get tile physical tile and the pin number
26-
int ilow = device_ctx.rr_nodes[inode].xlow(); // <----------------------------- Use of xlow()
26+
int ilow = device_ctx.rr_nodes[inode].xlow(); // Use of xlow()
2727
int jlow = device_ctx.rr_nodes[inode].ylow();
28-
auto physical_tile = device_ctx.grid[ilow][jlow].type;
28+
auto physical_tile = device_ctx.grid[ilow][jlow].type; // Accessing Physical Tile
2929
int pin_num = device_ctx.rr_nodes[inode].ptc_num();
3030

31+
3132
// Get the sub tile (type, not instance) and index of its pin that matches
3233
// the node index.
3334
const t_sub_tile* sub_tile_type = nullptr;
@@ -51,35 +52,10 @@ static std::string get_pin_feature (size_t inode) {
5152
5253
<br><br><br>
5354
54-
## Obtain length of wire
55+
## Obtain length of wire (`stats.cpp:313`)
5556
```cpp
56-
while (tptr != nullptr) {
57-
inode = tptr->index;
58-
curr_type = device_ctx.rr_nodes[inode].type();
59-
60-
if (curr_type == SINK) { /* Starting a new segment */
61-
tptr = tptr->next; /* Link to existing path - don't add to len. */
62-
if (tptr == nullptr)
63-
break;
64-
65-
curr_type = device_ctx.rr_nodes[tptr->index].type();
66-
}
67-
6857
else if (curr_type == CHANX || curr_type == CHANY) {
6958
segments++;
70-
length += 1 + device_ctx.rr_nodes[inode].xhigh() - device_ctx.rr_nodes[inode].xlow() // <-- Use of xlow()
59+
length += 1 + device_ctx.rr_nodes[inode].xhigh() - device_ctx.rr_nodes[inode].xlow()
7160
+ device_ctx.rr_nodes[inode].yhigh() - device_ctx.rr_nodes[inode].ylow();
72-
73-
if (curr_type != prev_type && (prev_type == CHANX || prev_type == CHANY))
74-
bends++;
75-
}
76-
77-
prev_type = curr_type;
78-
tptr = tptr->next;
79-
}
80-
81-
*bends_ptr = bends;
82-
*len_ptr = length;
83-
*segments_ptr = segments;
84-
}
8561
```

0 commit comments

Comments
 (0)