Skip to content

Commit fd06439

Browse files
authored
Merge branch 'master' into rr_graph_builder_api
2 parents 20b5fc0 + a86083f commit fd06439

File tree

9 files changed

+18
-23
lines changed

9 files changed

+18
-23
lines changed

doc/src/vpr/graphics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ A graphical window will now pop up when you run VPR.
4242
Navigation
4343
----------
4444
Click on **Zoom-Fit** buttons to zoom the view.
45-
Click and drag the mouse wheel to pan the view, or scroll the mouse wheel to zoom in and out.
45+
Click and drag with the left mouse button to pan the view, or scroll the mouse wheel to zoom in and out.
4646
Click on the **Window**, then on the diagonally opposite corners of a box, to zoom in on a particular area.
4747

4848
Click on **Save** to save the image on screen to PDF, PNG, or SVG file.

vpr/src/device/rr_graph_builder.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,3 @@ void RRGraphBuilder::add_node_to_all_locs(RRNodeId node) {
5050
void RRGraphBuilder::clear() {
5151
node_lookup_.clear();
5252
}
53-
54-
void RRGraphBuilder::set_node_coordinates(RRNodeId id, short x1, short y1, short x2, short y2) {
55-
node_storage_.set_node_coordinates(id, x1, y1, x2, y2);
56-
}

vpr/src/device/rr_graph_builder.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,15 @@ class RRGraphBuilder {
5959
/** @brief Clear all the underlying data storage */
6060
void clear();
6161

62+
/** @brief Set capacity of this node (number of routes that can use it). */
63+
inline void set_node_capacity(RRNodeId id, short new_capacity) {
64+
node_storage_.set_node_capacity(id, new_capacity);
65+
}
66+
6267
/** @brief Set the node coordinate */
63-
void set_node_coordinates(RRNodeId id, short x1, short y1, short x2, short y2);
68+
inline void set_node_coordinates(RRNodeId id, short x1, short y1, short x2, short y2) {
69+
node_storage_.set_node_coordinates(id, x1, y1, x2, y2);
70+
}
6471

6572
/* -- Internal data storage -- */
6673
private:

vpr/src/route/clock_connection_builders.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ RRNodeId RoutingToClockConnection::create_virtual_clock_network_sink_node(int x,
108108

109109
rr_graph.set_node_ptc_num(node_index, ptc);
110110
rr_graph_builder.set_node_coordinates(node_index, x, y, x, y);
111-
rr_graph.set_node_capacity(node_index, 1);
111+
rr_graph_builder.set_node_capacity(node_index, 1);
112112
rr_graph.set_node_cost_index(node_index, SINK_COST_INDEX);
113113
rr_graph_builder.set_node_type(node_index, SINK);
114114
float R = 0.;

vpr/src/route/clock_network_builders.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ int ClockRib::create_chanx_wire(int x_start,
321321

322322
rr_graph_builder.set_node_type(chanx_node, CHANX);
323323
rr_graph_builder.set_node_coordinates(chanx_node, x_start, y, x_end, y);
324-
node.set_capacity(1);
324+
rr_graph_builder.set_node_capacity(chanx_node, 1);
325325
node.set_track_num(ptc_num);
326326
node.set_rc_index(find_create_rr_rc_data(
327327
x_chan_wire.layer.r_metal, x_chan_wire.layer.c_metal));
@@ -346,7 +346,6 @@ int ClockRib::create_chanx_wire(int x_start,
346346

347347
/* Add the node to spatial lookup */
348348
auto& rr_graph = (*rr_nodes);
349-
350349
/* TODO: Will replace these codes with an API add_node_to_all_locs() of RRGraphBuilder */
351350
for (int ix = rr_graph.node_xlow(chanx_node); ix <= rr_graph.node_xhigh(chanx_node); ++ix) {
352351
for (int iy = rr_graph.node_ylow(chanx_node); iy <= rr_graph.node_yhigh(chanx_node); ++iy) {
@@ -628,7 +627,7 @@ int ClockSpine::create_chany_wire(int y_start,
628627

629628
rr_graph_builder.set_node_type(chany_node, CHANY);
630629
rr_graph_builder.set_node_coordinates(chany_node, x, y_start, x, y_end);
631-
node.set_capacity(1);
630+
rr_graph_builder.set_node_capacity(chany_node, 1);
632631
node.set_track_num(ptc_num);
633632
node.set_rc_index(find_create_rr_rc_data(
634633
y_chan_wire.layer.r_metal, y_chan_wire.layer.c_metal));
@@ -653,7 +652,6 @@ int ClockSpine::create_chany_wire(int y_start,
653652

654653
/* Add the node to spatial lookup */
655654
auto& rr_graph = (*rr_nodes);
656-
657655
/* TODO: Will replace these codes with an API add_node_to_all_locs() of RRGraphBuilder */
658656
for (int ix = rr_graph.node_xlow(chany_node); ix <= rr_graph.node_xhigh(chany_node); ++ix) {
659657
for (int iy = rr_graph.node_ylow(chany_node); iy <= rr_graph.node_yhigh(chany_node); ++iy) {

vpr/src/route/rr_graph.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -708,11 +708,11 @@ static void build_rr_graph(const t_graph_type graph_type,
708708
for (int i = 0; i < num_rr_nodes; i++) {
709709
if (rr_graph.node_type(RRNodeId(i)) == CHANX) {
710710
int ylow = rr_graph.node_ylow(RRNodeId(i));
711-
device_ctx.rr_nodes[i].set_capacity(nodes_per_chan.x_list[ylow]);
711+
device_ctx.rr_graph_builder.set_node_capacity(RRNodeId(i), nodes_per_chan.x_list[ylow]);
712712
}
713713
if (rr_graph.node_type(RRNodeId(i)) == CHANY) {
714714
int xlow = rr_graph.node_xlow(RRNodeId(i));
715-
device_ctx.rr_nodes[i].set_capacity(nodes_per_chan.y_list[xlow]);
715+
device_ctx.rr_graph_builder.set_node_capacity(RRNodeId(i), nodes_per_chan.y_list[xlow]);
716716
}
717717
}
718718
}
@@ -1428,7 +1428,7 @@ static void build_rr_sinks_sources(RRGraphBuilder& rr_graph_builder,
14281428
}
14291429

14301430
/* Things common to both SOURCEs and SINKs. */
1431-
L_rr_node.set_node_capacity(inode, class_inf[iclass].num_pins);
1431+
rr_graph_builder.set_node_capacity(inode, class_inf[iclass].num_pins);
14321432
rr_graph_builder.set_node_coordinates(inode, i, j, i + type->width - 1, j + type->height - 1);
14331433
float R = 0.;
14341434
float C = 0.;
@@ -1477,7 +1477,7 @@ static void build_rr_sinks_sources(RRGraphBuilder& rr_graph_builder,
14771477

14781478
/* Common to both DRIVERs and RECEIVERs */
14791479
if (inode) {
1480-
L_rr_node.set_node_capacity(inode, 1);
1480+
rr_graph_builder.set_node_capacity(inode, 1);
14811481
float R = 0.;
14821482
float C = 0.;
14831483
L_rr_node.set_node_rc_index(inode, find_create_rr_rc_data(R, C));
@@ -1657,7 +1657,7 @@ static void build_rr_chan(RRGraphBuilder& rr_graph_builder,
16571657

16581658
/* Edge arrays have now been built up. Do everything else. */
16591659
L_rr_node.set_node_cost_index(node, cost_index_offset + seg_details[track].index());
1660-
L_rr_node.set_node_capacity(node, 1); /* GLOBAL routing handled elsewhere */
1660+
rr_graph_builder.set_node_capacity(node, 1); /* GLOBAL routing handled elsewhere */
16611661

16621662
if (chan_type == CHANX) {
16631663
rr_graph_builder.set_node_coordinates(node, start, y_coord, end, y_coord);

vpr/src/route/rr_graph_uxsdcxx_serializer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,8 +763,8 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
763763
auto node = (*rr_nodes_)[id];
764764
RRNodeId node_id = node.id();
765765

766-
node.set_capacity(capacity);
767766
rr_graph_builder_->set_node_type(node_id, from_uxsd_node_type(type));
767+
rr_graph_builder_->set_node_capacity(node_id, capacity);
768768

769769
switch (rr_graph.node_type(node.id())) {
770770
case CHANX:

vpr/src/route/rr_node.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ void t_rr_node::set_rc_index(short new_rc_index) {
7575
storage_->set_node_rc_index(id_, new_rc_index);
7676
}
7777

78-
void t_rr_node::set_capacity(short new_capacity) {
79-
storage_->set_node_capacity(id_, new_capacity);
80-
}
81-
8278
void t_rr_node::set_direction(Direction new_direction) {
8379
storage_->set_node_direction(id_, new_direction);
8480
}

vpr/src/route/rr_node.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ class t_rr_node {
108108
bool validate() const;
109109

110110
public: //Mutators
111-
void set_capacity(short);
112-
113111
void set_ptc_num(short);
114112
void set_pin_num(short); //Same as set_ptc_num() by checks type() is consistent
115113
void set_track_num(short); //Same as set_ptc_num() by checks type() is consistent

0 commit comments

Comments
 (0)