1
- ## Uses of xlow, xhigh, ylow, yhigh
1
+ # Uses of xlow, xhigh, ylow, yhigh
2
2
3
3
| Function | Use Scenario | One Usage (Location) | Count |
4
4
| -- | -- | -- | -- |
14
14
| xlow | Count cblocks | rr_graph_area.cpp:229 | 3 |
15
15
| 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 |
16
16
| 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
+
18
19
<br ><br ><br >
19
20
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
24
22
23
+ ## Retrieve Physical Tile from device_ctx.grid (` test_fasm.cpp:193 ` )
24
+ ``` cpp
25
25
// 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()
27
27
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
29
29
int pin_num = device_ctx.rr_nodes[inode].ptc_num();
30
30
31
+
31
32
// Get the sub tile (type, not instance) and index of its pin that matches
32
33
// the node index.
33
34
const t_sub_tile* sub_tile_type = nullptr ;
@@ -51,35 +52,10 @@ static std::string get_pin_feature (size_t inode) {
51
52
52
53
<br><br><br>
53
54
54
- ## Obtain length of wire
55
+ ## Obtain length of wire (`stats.cpp:313`)
55
56
```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
-
68
57
else if (curr_type == CHANX || curr_type == CHANY) {
69
58
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()
71
60
+ 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
- }
85
61
```
0 commit comments