Skip to content

Commit e656f30

Browse files
authored
Merge pull request #1889 from RapidSilicon/api_add_node_side
Add a new API add_node_side() to RRGraphBuilder
2 parents b3e8685 + 99457ae commit e656f30

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

vpr/src/device/rr_graph_builder.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ class RRGraphBuilder {
102102
node_storage_.set_node_direction(id, new_direction);
103103
}
104104

105+
/** @brief Add the side where the node physically locates on a logic block.
106+
* Mainly applicable to IPIN and OPIN nodes.*/
107+
inline void add_node_side(RRNodeId id, e_side new_side) {
108+
node_storage_.add_node_side(id, new_side);
109+
}
110+
105111
/* -- Internal data storage -- */
106112
private:
107113
/* TODO: When the refactoring effort finishes,

vpr/src/route/rr_graph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ static void build_rr_sinks_sources(RRGraphBuilder& rr_graph_builder,
14941494
//for the pin on all sides at which it exists
14951495
//As such, multipler driver problem can be avoided.
14961496
rr_graph_builder.set_node_coordinates(inode, i + width_offset, j + height_offset, i + width_offset, j + height_offset);
1497-
L_rr_node.add_node_side(inode, side);
1497+
rr_graph_builder.add_node_side(inode, side);
14981498

14991499
// Sanity check
15001500
VTR_ASSERT(rr_graph.is_node_on_specific_side(RRNodeId(inode), side));

vpr/src/route/rr_graph_uxsdcxx_serializer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
630630

631631
inline void set_node_loc_side(uxsd::enum_loc_side side, int& inode) final {
632632
auto node = (*rr_nodes_)[inode];
633+
RRNodeId node_id = node.id();
633634
const auto& rr_graph = (*rr_graph_);
634635

635636
if (uxsd::enum_loc_side::UXSD_INVALID == side) {
@@ -643,7 +644,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
643644
std::bitset<NUM_SIDES> sides_to_add = from_uxsd_loc_side(side);
644645
for (const e_side& side_to_add : SIDES) {
645646
if (sides_to_add[side_to_add]) {
646-
node.add_side(side_to_add);
647+
rr_graph_builder_->add_node_side(node_id, side_to_add);
647648
}
648649
}
649650
}

vpr/src/route/rr_node.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,3 @@ void t_rr_node::set_cost_index(RRIndexedDataId new_cost_index) {
5858
void t_rr_node::set_rc_index(short new_rc_index) {
5959
storage_->set_node_rc_index(id_, new_rc_index);
6060
}
61-
62-
void t_rr_node::add_side(e_side new_side) {
63-
storage_->add_node_side(id_, new_side);
64-
}

vpr/src/route/rr_node.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ class t_rr_node {
110110
void set_rc_index(short);
111111

112112
void set_side(e_side);
113-
void add_side(e_side);
114113

115114
void next_node() {
116115
id_ = RRNodeId((size_t)(id_) + 1);

0 commit comments

Comments
 (0)