Skip to content

Commit 82c5913

Browse files
author
Muhammad Haris Zafar
authored
Merge branch 'master' into api_set_node_rc_index
2 parents 94a6827 + 82b7a2d commit 82c5913

File tree

6 files changed

+21
-9
lines changed

6 files changed

+21
-9
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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,21 @@ class RRGraphBuilder {
107107
node_storage_.set_node_rc_index(id, new_rc_index);
108108
}
109109

110+
/** @brief Add the side where the node physically locates on a logic block.
111+
* Mainly applicable to IPIN and OPIN nodes.*/
112+
inline void add_node_side(RRNodeId id, e_side new_side) {
113+
node_storage_.add_node_side(id, new_side);
114+
}
115+
116+
/** @brief Counts the number of rr switches needed based on fan in to support mux
117+
* size dependent switch delays. */
118+
inline size_t count_rr_switches(
119+
size_t num_arch_switches,
120+
t_arch_switch_inf* arch_switch_inf,
121+
t_arch_switch_fanin& arch_switch_fanins) {
122+
return node_storage_.count_rr_switches(num_arch_switches, arch_switch_inf, arch_switch_fanins);
123+
}
124+
110125
/* -- Internal data storage -- */
111126
private:
112127
/* TODO: When the refactoring effort finishes,

vpr/src/route/rr_graph.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ static void alloc_rr_switch_inf(t_arch_switch_fanin& arch_switch_fanins) {
819819
auto& device_ctx = g_vpr_ctx.mutable_device();
820820

821821
/* allocate space for the rr_switch_inf array */
822-
size_t num_rr_switches = device_ctx.rr_nodes.count_rr_switches(
822+
size_t num_rr_switches = device_ctx.rr_graph_builder.count_rr_switches(
823823
device_ctx.num_arch_switches,
824824
device_ctx.arch_switch_inf,
825825
arch_switch_fanins);
@@ -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_cost_index(RRIndexedDataId new_cost_index) {
5555
storage_->set_node_cost_index(id_, new_cost_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_cost_index(RRIndexedDataId);
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)