@@ -39,40 +39,6 @@ void CRRConnectionBuilder::initialize(
3939 fpga_grid_y_ = fpga_grid_y;
4040 is_annotated_excel_ = is_annotated_excel;
4141
42- // for (const auto& original_switch : rr_graph_.rr_switches()) {
43- // std::string switch_name = original_switch.name;
44- // std::transform(switch_name.begin(), switch_name.end(), switch_name.begin(),
45- // ::tolower);
46-
47- // if (switch_name.find("delayless") != std::string::npos) {
48- // VTR_LOG("Adding delayless switch: %s\n", switch_name.c_str());
49- // default_switch_id_["delayless"] = original_switch.get_id();
50- // } else if (switch_name.find("ipin") != std::string::npos) {
51- // VTR_LOG("Adding ipin switch: %s\n", switch_name.c_str());
52- // default_switch_id_["ipin"] = original_switch.get_id();
53- // } else if (std::regex_match(switch_name, std::regex(R"(l1(_.*)?)"))) {
54- // VTR_LOG("Adding l1 switch: %s\n", switch_name.c_str());
55- // default_switch_id_["l1"] = original_switch.get_id();
56- // } else if (std::regex_match(switch_name, std::regex(R"(l2(_.*)?)"))) {
57- // VTR_LOG("Adding l2 switch: %s\n", switch_name.c_str());
58- // default_switch_id_["l2"] = original_switch.get_id();
59- // } else if (std::regex_match(switch_name, std::regex(R"(l4(_.*)?)"))) {
60- // VTR_LOG("Adding l4 switch: %s\n", switch_name.c_str());
61- // default_switch_id_["l4"] = original_switch.get_id();
62- // } else if (std::regex_match(switch_name, std::regex(R"(l8(_.*)?)"))) {
63- // VTR_LOG("Adding l8 switch: %s\n", switch_name.c_str());
64- // default_switch_id_["l8"] = original_switch.get_id();
65- // } else if (std::regex_match(switch_name, std::regex(R"(l12(_.*)?)"))) {
66- // VTR_LOG("Adding l12 switch: %s\n", switch_name.c_str());
67- // default_switch_id_["l12"] = original_switch.get_id();
68- // } else {
69- // VTR_LOG_ERROR("Unknown switch type: %s\n", switch_name.c_str());
70- // }
71- // }
72-
73- // assert(default_switch_id_.size() == crr_graph_.get_switches().size());
74- // sw_zero_id_ = static_cast<SwitchId>(crr_graph_.get_switches().size());
75-
7642 // Total locations is the number of locations on the FPGA grid minus the 4
7743 // corner locations.
7844 total_locations_ = static_cast <size_t >(fpga_grid_x_ * fpga_grid_y_) - 4 ;
@@ -532,27 +498,7 @@ int CRRConnectionBuilder::get_connection_delay_ps(const std::string& cell_value,
532498 int switch_delay_ps = std::stoi (cell_value);
533499 return switch_delay_ps;
534500 } else {
535- VTR_LOG_ERROR (" Not implemented - get_connection_delay_ps\n " );
536- return static_cast <SwitchId>(-1 );
537- // std::string switch_id_key = "";
538- // if (segment_length > 0) {
539- // switch_id_key = "l" + std::to_string(segment_length);
540- // } else {
541- // switch_id_key = lower_case_sink_node_type;
542- // }
543-
544- // std::string capitalized_switch_id_key = switch_id_key;
545- // std::transform(capitalized_switch_id_key.begin(),
546- // capitalized_switch_id_key.end(),
547- // capitalized_switch_id_key.begin(), ::toupper);
548-
549- // if (default_switch_id_.find(switch_id_key) != default_switch_id_.end()) {
550- // return default_switch_id_.at(switch_id_key);
551- // } else if (default_switch_id_.find(capitalized_switch_id_key) != default_switch_id_.end()) {
552- // return default_switch_id_.at(capitalized_switch_id_key);
553- // } else {
554- // throw std::runtime_error("Default switch id not found for Node Type: " + lower_case_sink_node_type + " and Switch ID Key: " + capitalized_switch_id_key);
555- // }
501+ return -1 ;
556502 }
557503}
558504
0 commit comments