@@ -1078,7 +1078,7 @@ struct ArchReader {
1078
1078
omode->num_pb_type_children = 1 ;
1079
1079
omode->pb_type_children = new t_pb_type[1 ];
1080
1080
1081
- auto opad = new t_pb_type ;
1081
+ auto opad = &omode-> pb_type_children [ 0 ] ;
1082
1082
opad->name = vtr::strdup (" opad" );
1083
1083
opad->num_pb = 1 ;
1084
1084
opad->parent_mode = omode;
@@ -1090,7 +1090,6 @@ struct ArchReader {
1090
1090
opad->model = get_model (arch_, std::string (MODEL_OUTPUT));
1091
1091
1092
1092
opad->ports [0 ] = get_generic_port (arch_, opad, IN_PORT, " outpad" , MODEL_OUTPUT);
1093
- omode->pb_type_children [0 ] = *opad;
1094
1093
1095
1094
// IPAD mode
1096
1095
auto imode = &pad->modes [1 ];
@@ -1100,7 +1099,7 @@ struct ArchReader {
1100
1099
imode->num_pb_type_children = 1 ;
1101
1100
imode->pb_type_children = new t_pb_type[1 ];
1102
1101
1103
- auto ipad = new t_pb_type ;
1102
+ auto ipad = &imode-> pb_type_children [ 0 ] ;
1104
1103
ipad->name = vtr::strdup (" ipad" );
1105
1104
ipad->num_pb = 1 ;
1106
1105
ipad->parent_mode = imode;
@@ -1112,7 +1111,6 @@ struct ArchReader {
1112
1111
ipad->model = get_model (arch_, std::string (MODEL_INPUT));
1113
1112
1114
1113
ipad->ports [0 ] = get_generic_port (arch_, ipad, OUT_PORT, " inpad" , MODEL_INPUT);
1115
- imode->pb_type_children [0 ] = *ipad;
1116
1114
1117
1115
// Handle interconnects
1118
1116
int num_pins = 1 ;
@@ -1131,8 +1129,8 @@ struct ArchReader {
1131
1129
std::string ipad_ostr = std::string (pad->name ) + std::string (" ." ) + opin;
1132
1130
std::string i_ic_name = std::string (ipad->name ) + std::string (" _" ) + std::string (pad->name );
1133
1131
1134
- auto o_ic = new t_interconnect[num_pins ];
1135
- auto i_ic = new t_interconnect[num_pins ];
1132
+ auto o_ic = &omode-> interconnect [ 0 ];
1133
+ auto i_ic = &imode-> interconnect [ 0 ];
1136
1134
1137
1135
o_ic->name = vtr::strdup (o_ic_name.c_str ());
1138
1136
o_ic->type = DIRECT_INTERC;
@@ -1148,8 +1146,6 @@ struct ArchReader {
1148
1146
i_ic->input_string = vtr::strdup (ipad_istr.c_str ());
1149
1147
i_ic->output_string = vtr::strdup (ipad_ostr.c_str ());
1150
1148
1151
- omode->interconnect [0 ] = *o_ic;
1152
- imode->interconnect [0 ] = *i_ic;
1153
1149
}
1154
1150
1155
1151
void process_generic_block (t_pb_type* pb_type, Device::BEL::Reader& bel) {
@@ -1362,23 +1358,23 @@ struct ArchReader {
1362
1358
}
1363
1359
1364
1360
t_pin_to_pin_annotation get_pack_pattern (std::string ic_name, std::string input, std::string output) {
1365
- auto pp = new t_pin_to_pin_annotation ;
1361
+ t_pin_to_pin_annotation pp;
1366
1362
1367
1363
std::string pp_name = ic_name + " _" + output;
1368
1364
1369
- pp-> prop = (int *)vtr::calloc (1 , sizeof (int ));
1370
- pp-> value = (char **)vtr::calloc (1 , sizeof (char *));
1365
+ pp. prop = (int *)vtr::calloc (1 , sizeof (int ));
1366
+ pp. value = (char **)vtr::calloc (1 , sizeof (char *));
1371
1367
1372
- pp-> type = E_ANNOT_PIN_TO_PIN_PACK_PATTERN;
1373
- pp-> format = E_ANNOT_PIN_TO_PIN_CONSTANT;
1374
- pp-> prop [0 ] = (int )E_ANNOT_PIN_TO_PIN_PACK_PATTERN_NAME;
1375
- pp-> value [0 ] = vtr::strdup (pp_name.c_str ());
1376
- pp-> input_pins = vtr::strdup (input.c_str ());
1377
- pp-> output_pins = vtr::strdup (output.c_str ());
1378
- pp-> num_value_prop_pairs = 1 ;
1379
- pp-> clock = nullptr ;
1368
+ pp. type = E_ANNOT_PIN_TO_PIN_PACK_PATTERN;
1369
+ pp. format = E_ANNOT_PIN_TO_PIN_CONSTANT;
1370
+ pp. prop [0 ] = (int )E_ANNOT_PIN_TO_PIN_PACK_PATTERN_NAME;
1371
+ pp. value [0 ] = vtr::strdup (pp_name.c_str ());
1372
+ pp. input_pins = vtr::strdup (input.c_str ());
1373
+ pp. output_pins = vtr::strdup (output.c_str ());
1374
+ pp. num_value_prop_pairs = 1 ;
1375
+ pp. clock = nullptr ;
1380
1376
1381
- return * pp;
1377
+ return pp;
1382
1378
}
1383
1379
1384
1380
// Physical Tiles
0 commit comments