Skip to content

Commit 07da73e

Browse files
committed
[vpr][route][crr] use rr_node_type_map
1 parent 3542097 commit 07da73e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@ CRRConnectionBuilder::SegmentInfo CRRConnectionBuilder::parse_segment_info(const
233233
const Cell& tap_cell = df.at(row_or_col, 3);
234234

235235
if (!side_cell.is_empty()) {
236-
info.side = string_to_side(side_cell.as_string());
236+
std::string side_str_cap = side_cell.as_string();
237+
std::transform(side_str_cap.begin(), side_str_cap.end(), side_str_cap.begin(), ::toupper);
238+
info.side = name_sw_template_side.at(side_str_cap);
237239
}
238240
if (!type_cell.is_empty()) {
239241
info.seg_type = type_cell.as_string();
@@ -253,7 +255,9 @@ CRRConnectionBuilder::SegmentInfo CRRConnectionBuilder::parse_segment_info(const
253255
const Cell& tap_cell = df.at(4, row_or_col); // Note: row 4 for horizontal
254256

255257
if (!side_cell.is_empty()) {
256-
info.side = string_to_side(side_cell.as_string());
258+
std::string side_str_cap = side_cell.as_string();
259+
std::transform(side_str_cap.begin(), side_str_cap.end(), side_str_cap.begin(), ::toupper);
260+
info.side = name_sw_template_side.at(side_str_cap);
257261
}
258262
if (!type_cell.is_empty()) {
259263
info.seg_type = type_cell.as_string();
@@ -337,7 +341,7 @@ RRNodeId CRRConnectionBuilder::process_channel_node(const SegmentInfo& info,
337341
seg_index, seg_length, physical_length, direction, truncated);
338342

339343
// Create node hash and lookup
340-
NodeHash hash = std::make_tuple(string_to_node_type(seg_type_label),
344+
NodeHash hash = std::make_tuple(rr_node_type_map.at(seg_type_label),
341345
seg_sequence,
342346
x_low, x_high, y_low, y_high);
343347
auto it = node_lookup.find(hash);

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include <algorithm>
66
#include <fstream>
7+
#include <filesystem>
78

89
namespace crrgenerator {
910

0 commit comments

Comments
 (0)