| 694 | |
| 695 | } |
| 696 | void update_crop_module_opcode_table(Opcode_info & obj_module_opcode,map<opcode_num_e, Opcode_info> & opcode_info_map,int batch_size){ |
| 697 | |
| 698 | Module_info module_default; |
| 699 | module_default.module_target_info = CPU; |
| 700 | module_default.module_type = SW_CROP; |
| 701 | module_default.module_name = "Crop"; /// TODO abid needs to update the layer information based on the enum instead of layer name |
| 702 | module_default.num_total_ports=11; // TODO need to check with buffer management & init module |
| 703 | obj_module_opcode.mega_module = module_default; |
| 704 | |
| 705 | /*** crop mega module ports & these port order should be same as deploy file*********/ |
| 706 | |
| 707 | Port_info port_defualt; |
| 708 | port_defualt.data_type = XI_INT32; |
| 709 | port_defualt.size_datatype = XI_INT32_S; |
| 710 | port_defualt.memory_align_required=32; // TODO need to check with buffer management & init module |
| 711 | port_defualt.memory_map_info = __SDS_CACHEABLE; |
| 712 | port_defualt.port_enum=XI_INPUT; |
| 713 | port_defualt.qant_scheme_type = g_quant_value; |
| 714 | |
| 715 | packinfo input_p_info; |
| 716 | |
| 717 | input_p_info.dim = XI_CHANNEL; |
| 718 | input_p_info.mem_contiguous = true; |
| 719 | input_p_info.mod_div_factor = 0; |
| 720 | input_p_info.sep=XI_NONE; |
| 721 | |
| 722 | port_defualt.pack_info_vec.push_back(input_p_info); |
| 723 | |
| 724 | input_p_info.dim = XI_HEIGHT; |
| 725 | input_p_info.mem_contiguous = true; |
| 726 | input_p_info.mod_div_factor = 0; |
| 727 | input_p_info.sep=XI_NONE; |
| 728 | |
| 729 | port_defualt.pack_info_vec.push_back(input_p_info); |
| 730 | |
| 731 | input_p_info.dim = XI_WIDTH; |
| 732 | input_p_info.mem_contiguous = true; |
| 733 | input_p_info.mod_div_factor = 0; |
| 734 | input_p_info.sep=XI_NONE; |
| 735 | |
| 736 | port_defualt.pack_info_vec.push_back(input_p_info); |
| 737 | |
| 738 | input_p_info.dim = XI_INTERLEAVED; |
| 739 | input_p_info.mem_contiguous = true; |
| 740 | input_p_info.mod_div_factor = 0; |
| 741 | input_p_info.sep=XI_NONE; |
| 742 | |
| 743 | port_defualt.pack_info_vec.push_back(input_p_info); |
| 744 | |
| 745 | input_p_info.dim = XI_BATCH; |
| 746 | input_p_info.mem_contiguous = true; |
| 747 | input_p_info.mod_div_factor = 0; |
| 748 | input_p_info.sep=XI_NONE; |
| 749 | |
| 750 | port_defualt.pack_info_vec.push_back(input_p_info); |
| 751 | |
| 752 | obj_module_opcode.port_vec.push_back(port_defualt); |
| 753 | |