Skip to content

Commit 97c9b72

Browse files
author
Muhammad Haris Zafar
committed
Replacing api set_node_direction/set_direction from the related .cpp/.h files
1 parent 4c70a6a commit 97c9b72

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

vpr/src/route/clock_network_builders.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ int ClockRib::create_chanx_wire(int x_start,
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));
328-
node.set_direction(direction);
328+
rr_graph_builder.set_node_direction(chanx_node,direction);
329329

330330
short seg_index = 0;
331331
switch (direction) {
@@ -632,7 +632,7 @@ int ClockSpine::create_chany_wire(int y_start,
632632
node.set_track_num(ptc_num);
633633
node.set_rc_index(find_create_rr_rc_data(
634634
y_chan_wire.layer.r_metal, y_chan_wire.layer.c_metal));
635-
node.set_direction(direction);
635+
rr_graph_builder.set_node_direction(chany_node, direction);
636636

637637
short seg_index = 0;
638638
switch (direction) {

vpr/src/route/rr_graph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1673,7 +1673,7 @@ static void build_rr_chan(RRGraphBuilder& rr_graph_builder,
16731673

16741674
L_rr_node.set_node_ptc_num(node, track);
16751675
L_rr_node.set_node_type(node, chan_type);
1676-
L_rr_node.set_node_direction(node, seg_details[track].direction());
1676+
rr_graph_builder.set_node_direction(node, seg_details[track].direction());
16771677
}
16781678
}
16791679

vpr/src/route/rr_graph_uxsdcxx_serializer.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,14 +817,16 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
817817
inline void set_node_direction(uxsd::enum_node_direction direction, int& inode) final {
818818
const auto& rr_graph = (*rr_graph_);
819819
auto node = (*rr_nodes_)[inode];
820+
RRNodeId node_id = node.id();
821+
820822
if (direction == uxsd::enum_node_direction::UXSD_INVALID) {
821823
if (rr_graph.node_type(node.id()) == CHANX || rr_graph.node_type(node.id()) == CHANY) {
822824
report_error(
823825
"inode %d is type %d, which requires a direction, but no direction was supplied.",
824826
inode, rr_graph.node_type(node.id()));
825827
}
826828
} else {
827-
node.set_direction(from_uxsd_node_direction(direction));
829+
rr_graph_builder_->set_node_direction(node_id, from_uxsd_node_direction(direction));
828830
}
829831
}
830832
inline uxsd::enum_node_direction get_node_direction(const t_rr_node& node) final {

0 commit comments

Comments
 (0)