Skip to content

Commit d3c8e88

Browse files
author
Muhammad Haris Zafar
authored
Merge branch 'master' into api_set_node_cost_index
2 parents 5e6ef3e + e656f30 commit d3c8e88

File tree

6 files changed

+17
-13
lines changed

6 files changed

+17
-13
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ CMakeFiles
1414
build
1515

1616
#
17-
#VTR Tasks
17+
#VTR Flow/Tasks
1818
#
1919
vtr_flow/tasks/**/run[0-9]*
2020
vtr_flow/tasks/**/run_latest
2121
vtr_flow/tasks/**/latest
2222
vtr_flow/tasks/**/qor_geomean.txt
2323
vtr_flow/tasks/**/task_summary/
2424
quick_test/*
25+
temp/
2526

2627
#
2728
# Titan benchmarks

vpr/src/device/rr_graph_builder.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,16 @@ class RRGraphBuilder {
6969
node_storage_.set_node_coordinates(id, x1, y1, x2, y2);
7070
}
7171

72-
/** @brief @note Set the node_ptc_num; This API is very powerful and developers should not use it unless it is necessary,
73-
* e.g the node type is unknown. If the node type is known, the more specific routines, `set_node_pin_num()`,
74-
* `set_node_track_num()`and `set_node_class_num()`, for different types of nodes should be used.*/
75-
7672
/** @brief The ptc_num carries different meanings for different node types
7773
* (true in VPR RRG that is currently supported, may not be true in customized RRG)
7874
* CHANX or CHANY: the track id in routing channels
7975
* OPIN or IPIN: the index of pins in the logic block data structure
80-
* SOURCE and SINK: the class id of a pin (indicating logic equivalence of pins) in the logic block data structure */
76+
* SOURCE and SINK: the class id of a pin (indicating logic equivalence of pins) in the logic block data structure
77+
* @note
78+
* This API is very powerful and developers should not use it unless it is necessary,
79+
* e.g the node type is unknown. If the node type is known, the more specific routines, `set_node_pin_num()`,
80+
* `set_node_track_num()`and `set_node_class_num()`, for different types of nodes should be used.*/
81+
8182
inline void set_node_ptc_num(RRNodeId id, short new_ptc_num) {
8283
node_storage_.set_node_ptc_num(id, new_ptc_num);
8384
}
@@ -110,6 +111,12 @@ class RRGraphBuilder {
110111
node_storage_.set_node_cost_index(id, new_cost_index);
111112
}
112113

114+
/** @brief Add the side where the node physically locates on a logic block.
115+
* Mainly applicable to IPIN and OPIN nodes.*/
116+
inline void add_node_side(RRNodeId id, e_side new_side) {
117+
node_storage_.add_node_side(id, new_side);
118+
}
119+
113120
/* -- Internal data storage -- */
114121
private:
115122
/* 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
@@ -54,7 +54,3 @@ bool t_rr_node::validate() const {
5454
void t_rr_node::set_rc_index(short new_rc_index) {
5555
storage_->set_node_rc_index(id_, new_rc_index);
5656
}
57-
58-
void t_rr_node::add_side(e_side new_side) {
59-
storage_->add_node_side(id_, new_side);
60-
}

vpr/src/route/rr_node.h

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

111111
void set_side(e_side);
112-
void add_side(e_side);
113112

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

0 commit comments

Comments
 (0)