@@ -168,7 +168,7 @@ static void ProcessEquivalentSiteCustomConnection(pugi::xml_node Parent,
168168 t_sub_tile* SubTile,
169169 t_physical_tile_type* PhysicalTileType,
170170 t_logical_block_type* LogicalBlockType,
171- std::string site_name,
171+ const std::string& site_name,
172172 const pugiutil::loc_data& loc_data);
173173static void ProcessPinLocations (pugi::xml_node Locations,
174174 t_physical_tile_type* PhysicalTileType,
@@ -391,7 +391,7 @@ static bool attribute_to_bool(const pugi::xml_node node,
391391
392392static int find_switch_by_name (const t_arch& arch, const std::string& switch_name);
393393
394- e_side string_to_side (const std::string& side_str);
394+ static e_side string_to_side (const std::string& side_str);
395395
396396template <typename T>
397397static T* get_type_by_name (const char * type_name, std::vector<T>& types);
@@ -1713,10 +1713,10 @@ static void ProcessPb_TypePort_Power(pugi::xml_node Parent, t_port* port, e_powe
17131713static void ProcessPb_TypePort (pugi::xml_node Parent, t_port* port, e_power_estimation_method power_method, const bool is_root_pb_type, const pugiutil::loc_data& loc_data) {
17141714 std::vector<std::string> expected_attributes = {" name" , " num_pins" , " port_class" };
17151715 if (is_root_pb_type) {
1716- expected_attributes.push_back (" equivalent" );
1716+ expected_attributes.emplace_back (" equivalent" );
17171717
17181718 if (Parent.name () == " input" s || Parent.name () == " clock" s) {
1719- expected_attributes.push_back (" is_non_clock_global" );
1719+ expected_attributes.emplace_back (" is_non_clock_global" );
17201720 }
17211721 }
17221722
@@ -2580,6 +2580,7 @@ static void ProcessLayout(pugi::xml_node layout_tag, t_arch* arch, const pugiuti
25802580 // expect_only_attributes(layout_tag, {}, loc_data);
25812581
25822582 arch->tileable = get_attribute (layout_tag, " tileable" , loc_data, ReqOpt::OPTIONAL).as_bool (false );
2583+ arch->perimeter_cb = get_attribute (layout_tag, " perimeter_cb" , loc_data, ReqOpt::OPTIONAL).as_bool (false );
25832584 arch->shrink_boundary = get_attribute (layout_tag, " shrink_boundary" , loc_data, ReqOpt::OPTIONAL).as_bool (false );
25842585 arch->through_channel = get_attribute (layout_tag, " through_channel" , loc_data, ReqOpt::OPTIONAL).as_bool (false );
25852586 arch->opin2all_sides = get_attribute (layout_tag, " opin2all_sides" , loc_data, ReqOpt::OPTIONAL).as_bool (false );
@@ -2984,7 +2985,7 @@ static void ProcessDevice(pugi::xml_node Node, t_arch* arch, t_default_fc_spec&
29842985 // <connection_block> tag
29852986 Cur = get_single_child (Node, " connection_block" , loc_data);
29862987 expect_only_attributes (Cur, {" input_switch_name" , " input_inter_die_switch_name" }, loc_data);
2987- arch->ipin_cblock_switch_name .push_back (get_attribute (Cur, " input_switch_name" , loc_data).as_string ());
2988+ arch->ipin_cblock_switch_name .emplace_back (get_attribute (Cur, " input_switch_name" , loc_data).as_string ());
29882989 std::string inter_die_conn = get_attribute (Cur, " input_inter_die_switch_name" , loc_data, ReqOpt::OPTIONAL).as_string (" " );
29892990 if (inter_die_conn != " " ) {
29902991 arch->ipin_cblock_switch_name .push_back (inter_die_conn);
@@ -3404,7 +3405,7 @@ static void ProcessEquivalentSiteCustomConnection(pugi::xml_node Parent,
34043405 t_sub_tile* SubTile,
34053406 t_physical_tile_type* PhysicalTileType,
34063407 t_logical_block_type* LogicalBlockType,
3407- std::string site_name,
3408+ const std::string& site_name,
34083409 const pugiutil::loc_data& loc_data) {
34093410 pugi::xml_node CurDirect;
34103411
@@ -3587,7 +3588,7 @@ static void ProcessPinLocations(pugi::xml_node Locations,
35873588 for (int h = 0 ; h < PhysicalTileType->height ; ++h) {
35883589 for (e_side side : {TOP, RIGHT, BOTTOM, LEFT}) {
35893590 for (const auto & token : pin_locs->assignments [sub_tile_index][w][h][l][side]) {
3590- InstPort inst_port (token. c_str () );
3591+ InstPort inst_port (token);
35913592
35923593 // A pin specification should contain only the block name, and not any instance count information
35933594 // A pin specification may contain instance count, but should be in the range of capacity
@@ -3954,8 +3955,8 @@ static void ProcessSegments(pugi::xml_node Parent,
39543955
39553956 if (!Segs[i].longline ) {
39563957 // Long line doesn't accpet <sb> or <cb> since it assumes full population
3957- expected_subtags.push_back (" sb" );
3958- expected_subtags.push_back (" cb" );
3958+ expected_subtags.emplace_back (" sb" );
3959+ expected_subtags.emplace_back (" cb" );
39593960 }
39603961
39613962 /* Get the type */
@@ -3964,17 +3965,18 @@ static void ProcessSegments(pugi::xml_node Parent,
39643965 Segs[i].directionality = BI_DIRECTIONAL;
39653966
39663967 // Bidir requires the following tags
3967- expected_subtags.push_back (" wire_switch" );
3968- expected_subtags.push_back (" opin_switch" );
3968+ expected_subtags.emplace_back (" wire_switch" );
3969+ expected_subtags.emplace_back (" opin_switch" );
39693970 }
39703971
39713972 else if (0 == strcmp (tmp, " unidir" )) {
39723973 Segs[i].directionality = UNI_DIRECTIONAL;
39733974
39743975 // Unidir requires the following tags
3975- expected_subtags.push_back (" mux" );
3976- expected_subtags.push_back (" bend" );
3977- expected_subtags.push_back (" mux_inter_die" );
3976+ expected_subtags.emplace_back (" mux" );
3977+ expected_subtags.emplace_back (" bend" );
3978+ expected_subtags.emplace_back (" mux_inter_die" );
3979+
39783980 }
39793981
39803982 else {
@@ -4243,8 +4245,6 @@ static void ProcessSwitchblocks(pugi::xml_node Parent, t_arch* arch, const pugiu
42434245
42444246 Node = Node.next_sibling (Node.name ());
42454247 }
4246-
4247- return ;
42484248}
42494249
42504250static void ProcessCB_SB (pugi::xml_node Node, std::vector<bool >& list, const pugiutil::loc_data& loc_data) {
@@ -5005,7 +5005,7 @@ static int find_switch_by_name(const t_arch& arch, const std::string& switch_nam
50055005 return OPEN;
50065006}
50075007
5008- e_side string_to_side (const std::string& side_str) {
5008+ static e_side string_to_side (const std::string& side_str) {
50095009 e_side side = NUM_SIDES;
50105010 if (side_str.empty ()) {
50115011 side = NUM_SIDES;
@@ -6017,3 +6017,4 @@ static void ProcessVibBlockTypeLocs(t_vib_grid_def& grid_def,
60176017 }
60186018 }
60196019}
6020+
0 commit comments