Skip to content

Commit 3542097

Browse files
committed
[vpr][route][crr] add name_sw_template_side and template_side_name
1 parent 2a7d23d commit 3542097

File tree

1 file changed

+12
-1
lines changed
  • vpr/src/route/rr_graph_generation/tileable_rr_graph/crr_generator

1 file changed

+12
-1
lines changed

vpr/src/route/rr_graph_generation/tileable_rr_graph/crr_generator/crr_common.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#pragma once
22

3+
#include <unordered_map>
34
#include <vector>
45
#include <array>
6+
#include <string>
57

68
#include "rr_graph_fwd.h"
79
#include "rr_node_types.h"
@@ -40,7 +42,16 @@ enum class e_sw_template_side {LEFT = 0,
4042
OPIN,
4143
NUM_SIDES};
4244

43-
constexpr std::array<e_sw_template_side, (size_t)e_sw_template_side::NUM_SIDES> SIDE
45+
const std::unordered_map<std::string, e_sw_template_side> name_sw_template_side = {{"LEFT", e_sw_template_side::LEFT},
46+
{"RIGHT", e_sw_template_side::RIGHT},
47+
{"TOP", e_sw_template_side::TOP},
48+
{"BOTTOM", e_sw_template_side::BOTTOM},
49+
{"IPIN", e_sw_template_side::IPIN},
50+
{"OPIN", e_sw_template_side::OPIN}};
51+
52+
constexpr vtr::array<e_sw_template_side, const char*, (size_t)e_sw_template_side::NUM_SIDES> template_side_name = {"LEFT", "RIGHT",
53+
"TOP", "BOTTOM",
54+
"IPIN", "OPIN"};
4455

4556
// Location structure
4657
struct Location {

0 commit comments

Comments
 (0)