Skip to content

Commit 7cb89f7

Browse files
committed
[vpr][route][crr] add get_switch_block_name
1 parent 9135061 commit 7cb89f7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

vpr/src/route/rr_graph_generation/tileable_rr_graph/crr_generator/crr_connection_builder.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313

1414
namespace crrgenerator {
1515

16+
static std::string get_switch_block_name(size_t x, size_t y) {
17+
return "SB_" + std::to_string(x) + "__" + std::to_string(y) + "_";
18+
}
19+
1620
static bool is_integer(const std::string& s) {
1721
int value;
1822
auto [ptr, ec] = std::from_chars(s.data(), s.data() + s.size(), value);
@@ -86,7 +90,7 @@ void CRRConnectionBuilder::build_connections_for_location(size_t x,
8690
std::vector<Connection>& tile_connections) const {
8791

8892
// Find matching switch block pattern
89-
std::string sw_name = "SB_" + std::to_string(x) + "__" + std::to_string(y) + "_";
93+
std::string sw_name = get_switch_block_name(x, y);
9094
std::string pattern = sb_manager_.find_matching_pattern(sw_name);
9195
tile_connections.clear();
9296

0 commit comments

Comments
 (0)