| 1284 | |
| 1285 | } |
| 1286 | void update_sf_xpack_module_opcode_table(Opcode_info & obj_module_opcode,map<opcode_num_e, Opcode_info> & opcode_info_map,int batch_size){ |
| 1287 | |
| 1288 | Module_info module_default; |
| 1289 | module_default.module_target_info = CPU; |
| 1290 | module_default.module_type = SW_XPACK; |
| 1291 | module_default.module_name = "XPack_sf"; /// TODO abid needs to update the layer information based on the enum instead of layer name |
| 1292 | module_default.num_total_ports=11; // TODO need to check with buffer management & init module |
| 1293 | obj_module_opcode.mega_module = module_default; |
| 1294 | |
| 1295 | /*** xpack mega module ports & these port order should be same as deploy file*********/ |
| 1296 | |
| 1297 | Port_info port_defualt; |
| 1298 | port_defualt.data_type = XI_FLOAT; |
| 1299 | port_defualt.size_datatype = XI_FLOAT_S; |
| 1300 | port_defualt.memory_align_required=32; // TODO need to check with buffer management & init module |
| 1301 | port_defualt.memory_map_info = __MALLOC_TYPE; |
| 1302 | port_defualt.port_enum=XI_INPUT; |
| 1303 | port_defualt.qant_scheme_type = g_quant_value; |
| 1304 | |
| 1305 | packinfo input_p_info; |
| 1306 | |
| 1307 | input_p_info.dim = XI_CHANNEL; |
| 1308 | input_p_info.mem_contiguous = true; |
| 1309 | input_p_info.mod_div_factor = 0; |
| 1310 | input_p_info.sep=XI_NONE; |
| 1311 | |
| 1312 | port_defualt.pack_info_vec.push_back(input_p_info); |
| 1313 | |
| 1314 | input_p_info.dim = XI_HEIGHT; |
| 1315 | input_p_info.mem_contiguous = true; |
| 1316 | input_p_info.mod_div_factor = 0; |
| 1317 | input_p_info.sep=XI_NONE; |
| 1318 | |
| 1319 | port_defualt.pack_info_vec.push_back(input_p_info); |
| 1320 | |
| 1321 | input_p_info.dim = XI_WIDTH; |
| 1322 | input_p_info.mem_contiguous = true; |
| 1323 | input_p_info.mod_div_factor = 0; |
| 1324 | input_p_info.sep=XI_NONE; |
| 1325 | |
| 1326 | port_defualt.pack_info_vec.push_back(input_p_info); |
| 1327 | |
| 1328 | input_p_info.dim = XI_INTERLEAVED; |
| 1329 | input_p_info.mem_contiguous = true; |
| 1330 | input_p_info.mod_div_factor = 0; |
| 1331 | input_p_info.sep=XI_NONE; |
| 1332 | |
| 1333 | port_defualt.pack_info_vec.push_back(input_p_info); |
| 1334 | |
| 1335 | input_p_info.dim = XI_BATCH; |
| 1336 | input_p_info.mem_contiguous = true; |
| 1337 | input_p_info.mod_div_factor = 0; |
| 1338 | input_p_info.sep=XI_NONE; |
| 1339 | |
| 1340 | port_defualt.pack_info_vec.push_back(input_p_info); |
| 1341 | |
| 1342 | obj_module_opcode.port_vec.push_back(port_defualt); |
| 1343 | |