Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src
- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters.cpp
r82 r88 41 41 uint32_t dir_pht_size_address_share [3], 42 42 uint32_t * ras_size_queue ,//[nb_context] 43 uint32_t * upt_size_queue //[nb_context] 43 uint32_t * upt_size_queue ,//[nb_context] 44 bool is_toplevel 44 45 ) 45 46 { … … 72 73 _ras_size_queue = ras_size_queue ; 73 74 _upt_size_queue = upt_size_queue ; 74 75 _size_context_id = log2(_nb_context); 76 // public : uint32_t * _size_inst_ifetch_ptr ;//[nb_context] 77 78 _size_depth = new uint32_t [_nb_context]; 75 76 _array_size_depth = new uint32_t [_nb_context]; 79 77 _size_ras_index = new uint32_t [_nb_context]; 78 80 79 for (uint32_t i=0; i<_nb_context; i++) 81 80 { 82 _ size_depth[i] = log2(_upt_size_queue [i]);83 _size_ras_index [i] = log2(_ras_size_queue [i]);81 _array_size_depth [i] = log2(_upt_size_queue [i]); 82 _size_ras_index [i] = log2(_ras_size_queue [i]); 84 83 } 85 86 _max_size_depth = max<uint32_t>(_size_depth,_nb_context);87 _have_port_context_id = (_size_context_id > 0);88 _have_port_max_depth = (_max_size_depth > 0);89 // public : bool * _have_port_inst_ifetch_ptr ;//[nb_context]90 84 91 85 _param_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue ::Parameters … … 94 88 _size_address , 95 89 _nb_instruction , 96 _ size_depth,90 _array_size_depth , 97 91 _nb_inst_decod , 98 92 _nb_inst_branch_predict, … … 100 94 _nb_inst_branch_update ); 101 95 102 _size_inst_ifetch_ptr = _param_glue->_size_inst_ifetch_ptr ;103 _have_port_depth = _param_glue->_have_port_depth;104 _have_port_inst_ifetch_ptr = _param_glue->_have_port_inst_ifetch_ptr;105 _have_port_history = (_size_history > 0);106 107 96 _param_btb = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer ::Parameters 108 97 (_nb_context , … … 116 105 _nb_inst_branch_update , 117 106 _btb_victim_scheme ); 118 107 119 108 _param_dir = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction ::Parameters 120 109 (_dir_predictor_scheme , … … 130 119 _dir_pht_size_address_share); 131 120 132 _size_history = _param_dir->_size_history; 121 _size_history = _param_dir->_size_history; 122 _have_port_history = (_size_history > 0); 133 123 134 124 _param_ras = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::return_address_stack ::Parameters … … 150 140 _size_history , 151 141 _size_ras_index ); 142 143 144 if (is_toplevel) 145 { 146 _size_context_id = log2(_nb_context); 147 _size_depth = max<uint32_t>(_array_size_depth,_nb_context); 148 _size_inst_ifetch_ptr = log2(max<uint32_t>(_nb_instruction,_nb_context)); 149 _size_instruction_address = size_address; 150 // _size_nb_inst_decod = ; 151 // _size_nb_inst_commit = ; 152 // _size_ifetch_queue_ptr = ; 153 154 _have_port_context_id = (_size_context_id > 0); 155 _have_port_depth = (_size_depth > 0); 156 _have_port_inst_ifetch_ptr = _size_inst_ifetch_ptr > 0; 157 // _have_port_ifetch_queue_ptr= _size_ifetch_queue_ptr > 0; 158 159 copy (); 160 } 152 161 153 162 test(); … … 176 185 delete _param_glue; 177 186 178 delete [] _ size_depth;187 delete [] _array_size_depth; 179 188 delete [] _size_ras_index; 189 190 log_printf(FUNC,Prediction_unit,FUNCTION,"End"); 191 }; 192 193 #undef FUNCTION 194 #define FUNCTION "Prediction_unit::copy" 195 void Parameters::copy (void) 196 { 197 log_printf(FUNC,Prediction_unit,FUNCTION,"Begin"); 198 199 COPY(_param_btb ); 200 COPY(_param_dir ); 201 COPY(_param_ras ); 202 COPY(_param_upt ); 203 COPY(_param_glue); 180 204 181 205 log_printf(FUNC,Prediction_unit,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit.cpp
r81 r88 37 37 log_printf(FUNC,Prediction_unit,FUNCTION,"Begin"); 38 38 39 #if DEBUG_Prediction_unit == true 40 log_printf(INFO,Prediction_unit,FUNCTION,_("<%s> Parameters"),_name.c_str()); 41 42 std::cout << *param << std::endl; 43 #endif 44 39 45 log_printf(INFO,Prediction_unit,FUNCTION,"Allocation"); 40 46 … … 46 52 47 53 #ifdef STATISTICS 48 if ( _usage & USE_STATISTICS)54 if (usage_is_set(_usage,USE_STATISTICS)) 49 55 { 50 56 log_printf(INFO,Prediction_unit,FUNCTION,"Allocation of statistics"); … … 55 61 56 62 #ifdef VHDL 57 if ( _usage & USE_VHDL)63 if (usage_is_set(_usage,USE_VHDL)) 58 64 { 59 65 // generate the vhdl … … 65 71 66 72 #ifdef SYSTEMC 67 if ( _usage & USE_SYSTEMC)73 if (usage_is_set(_usage,USE_SYSTEMC)) 68 74 { 69 75 log_printf(INFO,Prediction_unit,FUNCTION,"Method - transition"); … … 89 95 90 96 #ifdef STATISTICS 91 if ( _usage & USE_STATISTICS)97 if (usage_is_set(_usage,USE_STATISTICS)) 92 98 { 93 99 statistics_deallocation(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_allocation.cpp
r82 r88 65 65 ALLOC1_SIGNAL_OUT(out_PREDICT_PC_NEXT ,"pc_next" ,Taddress_t ,_param->_size_address); 66 66 ALLOC1_SIGNAL_OUT(out_PREDICT_PC_NEXT_IS_DS_TAKE ,"pc_next_is_ds_take" ,Tcontrol_t ,1); 67 ALLOC1_SIGNAL_OUT(out_PREDICT_INST_IFETCH_PTR ,"inst_ifetch_ptr" ,Tinst_ifetch_ptr_t ,_param->_size_inst_ifetch_ptr [alloc_signal_it1]);67 ALLOC1_SIGNAL_OUT(out_PREDICT_INST_IFETCH_PTR ,"inst_ifetch_ptr" ,Tinst_ifetch_ptr_t ,_param->_size_inst_ifetch_ptr); 68 68 ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_STATE ,"branch_state" ,Tbranch_state_t ,_param->_size_branch_state); 69 ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_depth [alloc_signal_it1]);69 ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_depth); 70 70 } 71 71 { 72 ALLOC2_INTERFACE("predict",IN,SOUTH,"Interface with ifetch unit",_param->_nb_context,_param->_nb_instruction[ alloc_interface_it1]);73 _ALLOC2_SIGNAL_OUT(out_PREDICT_INSTRUCTION_ENABLE ,"instruction_enable" ,Tcontrol_t ,1,_param->_nb_context,_param->_nb_instruction[ alloc_signal_it1]);72 ALLOC2_INTERFACE("predict",IN,SOUTH,"Interface with ifetch unit",_param->_nb_context,_param->_nb_instruction[it1]); 73 _ALLOC2_SIGNAL_OUT(out_PREDICT_INSTRUCTION_ENABLE ,"instruction_enable" ,Tcontrol_t ,1,_param->_nb_context,_param->_nb_instruction[it1]); 74 74 } 75 75 } … … 78 78 { 79 79 { 80 ALLOC2_INTERFACE("decod",IN,SOUTH,"Interface with decod unit",_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_interface_it1]);80 ALLOC2_INTERFACE("decod",IN,SOUTH,"Interface with decod unit",_param->_nb_decod_unit,_param->_nb_inst_decod[it1]); 81 81 82 _ALLOC2_VALACK_IN ( in_DECOD_VAL ,VAL,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1]);83 _ALLOC2_VALACK_OUT(out_DECOD_ACK ,ACK,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1]);84 _ALLOC2_SIGNAL_IN ( in_DECOD_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id ,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1]);85 _ALLOC2_SIGNAL_IN ( in_DECOD_MATCH_INST_IFETCH_PTR ,"match_inst_ifetch_ptr" ,Tcontrol_t ,1 ,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1]);86 _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_STATE ,"branch_state" ,Tbranch_state_t ,_param->_size_branch_state ,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1]);87 _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_ max_size_depth ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);88 _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_CONDITION ,"branch_condition" ,Tbranch_condition_t,_param->_size_branch_condition,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1]);89 _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_DIRECTION ,"branch_direction" ,Tcontrol_t ,1 ,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1]);90 _ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_SRC ,"address_src" ,Taddress_t ,_param->_size_address ,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1]);91 _ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_DEST ,"address_dest" ,Taddress_t ,_param->_size_address ,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1]);82 _ALLOC2_VALACK_IN ( in_DECOD_VAL ,VAL,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]); 83 _ALLOC2_VALACK_OUT(out_DECOD_ACK ,ACK,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]); 84 _ALLOC2_SIGNAL_IN ( in_DECOD_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]); 85 _ALLOC2_SIGNAL_IN ( in_DECOD_MATCH_INST_IFETCH_PTR ,"match_inst_ifetch_ptr" ,Tcontrol_t ,1 ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]); 86 _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_STATE ,"branch_state" ,Tbranch_state_t ,_param->_size_branch_state ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]); 87 _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_depth ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]); 88 _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_CONDITION ,"branch_condition" ,Tbranch_condition_t,_param->_size_branch_condition,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]); 89 _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_DIRECTION ,"branch_direction" ,Tcontrol_t ,1 ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]); 90 _ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_SRC ,"address_src" ,Taddress_t ,_param->_size_address ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]); 91 _ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_DEST ,"address_dest" ,Taddress_t ,_param->_size_address ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]); 92 92 } 93 93 } … … 100 100 ALLOC1_VALACK_OUT(out_BRANCH_COMPLETE_ACK ,ACK); 101 101 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_CONTEXT_ID ,"context_id" ,Tcontext_t,_param->_size_context_id); 102 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH ,"depth" ,Tdepth_t ,_param->_ max_size_depth);102 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth); 103 103 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS ,"address" ,Taddress_t,_param->_size_address); 104 104 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_FLAG ,"flag" ,Tcontrol_t,1); … … 116 116 ALLOC1_VALACK_IN ( in_BRANCH_EVENT_ACK ,ACK); 117 117 // ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_CONTEXT_ID ,"context_id" ,Tcontext_t,_param->_size_context_id); 118 // ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_DEPTH ,"depth" ,Tdepth_t ,_param->_ max_size_depth);118 // ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth); 119 119 // ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1); 120 120 ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_SRC ,"address_src" ,Taddress_t,_param->_size_address); … … 126 126 ALLOC1_INTERFACE("depth",OUT,SOUTH,"Interface with depth",_param->_nb_context); 127 127 128 ALLOC1_SIGNAL_OUT(out_DEPTH_NB_BRANCH ,"nb_branch" ,Tdepth_t,_param->_size_depth[alloc_signal_it1]+1); 129 ALLOC1_SIGNAL_OUT(out_DEPTH_TAIL ,"tail" ,Tdepth_t,_param->_size_depth[alloc_signal_it1]); 128 ALLOC1_SIGNAL_OUT(out_DEPTH_CURRENT ,"current" ,Tdepth_t,_param->_size_depth); 129 ALLOC1_SIGNAL_OUT(out_DEPTH_MIN ,"min" ,Tdepth_t,_param->_size_depth); 130 ALLOC1_SIGNAL_OUT(out_DEPTH_MAX ,"max" ,Tdepth_t,_param->_size_depth+1); 130 131 } 131 132 … … 551 552 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_CONTEXT_ID" , 552 553 dest,"out_PREDICT_UPT_"+toString(i)+"_CONTEXT_ID" ); 554 if (_param->_have_port_depth) 555 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(i)+ "_UPDATE_PREDICTION_ID", 556 dest, "in_PREDICT_UPT_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID"); 553 557 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_BTB_ADDRESS_SRC" , 554 558 dest,"out_PREDICT_UPT_"+toString(i)+"_BTB_ADDRESS_SRC" ); … … 593 597 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_MISS_DECOD" , 594 598 dest,"out_DECOD_UPT_"+toString(i)+"_MISS_DECOD" ); 595 if (_param->_have_port_ max_depth)599 if (_param->_have_port_depth) 596 600 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_UPDATE_PREDICTION_ID", 597 601 dest,"out_DECOD_UPT_"+toString(i)+"_UPDATE_PREDICTION_ID"); 602 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_IS_ACCURATE" , 603 dest,"out_DECOD_UPT_"+toString(i)+"_IS_ACCURATE" ); 598 604 599 605 //out_DECOD_UPT_RAS_INDEX - component_map return_address_stack … … 650 656 PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID" , 651 657 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID" ); 652 if (_param->_have_port_ max_depth)658 if (_param->_have_port_depth) 653 659 PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH" , 654 660 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH" ); … … 684 690 for (uint32_t i=0; i<_param->_nb_context; i++) 685 691 { 686 dest = _name+"_prediction_unit_glue"; 687 692 dest = _name; 688 693 #ifdef POSITION 689 694 _component->interface_map (src ,"depth_"+toString(i), … … 691 696 #endif 692 697 693 COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_NB_BRANCH", 694 dest, "in_DEPTH_"+toString(i)+"_UPT_NB_BRANCH"); 695 696 if (_param->_have_port_depth[i]) 697 COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_TAIL" , 698 dest, "in_DEPTH_"+toString(i)+"_UPT_TAIL" ); 699 } 700 698 if (_param->_have_port_depth) 699 { 700 PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_CURRENT", 701 dest,"out_DEPTH_"+toString(i)+"_CURRENT"); 702 PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MIN", 703 dest,"out_DEPTH_"+toString(i)+"_MIN"); 704 } 705 PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MAX", 706 dest,"out_DEPTH_"+toString(i)+"_MAX"); 707 } 708 709 // for (uint32_t i=0; i<_param->_nb_context; i++) 710 // { 711 // dest = _name+"_prediction_unit_glue"; 712 713 // #ifdef POSITION 714 // _component->interface_map (src ,"depth_"+toString(i), 715 // dest,"depth_"+toString(i)); 716 // #endif 717 718 // COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_NB_BRANCH", 719 // dest, "in_DEPTH_"+toString(i)+"_UPT_NB_BRANCH"); 720 721 // if (_param->_have_port_depth) 722 // COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_TAIL" , 723 // dest, "in_DEPTH_"+toString(i)+"_UPT_TAIL" ); 724 // } 701 725 } 702 726 … … 741 765 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_PC_NEXT_IS_DS_TAKE" , 742 766 dest,"out_PREDICT_"+toString(i)+"_PC_NEXT_IS_DS_TAKE" ); 743 if (_param->_have_port_inst_ifetch_ptr [i])767 if (_param->_have_port_inst_ifetch_ptr) 744 768 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_INST_IFETCH_PTR" , 745 769 dest,"out_PREDICT_"+toString(i)+"_INST_IFETCH_PTR" ); 746 770 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_BRANCH_STATE" , 747 771 dest,"out_PREDICT_"+toString(i)+"_BRANCH_STATE" ); 748 if (_param->_have_port_depth [i])772 if (_param->_have_port_depth) 749 773 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID", 750 774 dest,"out_PREDICT_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID"); … … 783 807 PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_STATE" , 784 808 dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_STATE" ); 785 if (_param->_have_port_ max_depth)809 if (_param->_have_port_depth) 786 810 PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_UPDATE_PREDICTION_ID", 787 811 dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_UPDATE_PREDICTION_ID"); … … 796 820 } 797 821 798 for (uint32_t i=0; i<_param->_nb_context; i++)799 {800 dest = _name;801 #ifdef POSITION802 _component->interface_map (src ,"depth_"+toString(i),803 dest,"depth_"+toString(i));804 #endif805 806 PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_NB_BRANCH",dest,"out_DEPTH_"+toString(i)+"_NB_BRANCH");807 if (_param->_have_port_depth[i])808 PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_TAIL" ,dest,"out_DEPTH_"+toString(i)+"_TAIL" );809 }822 // for (uint32_t i=0; i<_param->_nb_context; i++) 823 // { 824 // dest = _name; 825 // #ifdef POSITION 826 // _component->interface_map (src ,"depth_"+toString(i), 827 // dest,"depth_"+toString(i)); 828 // #endif 829 830 // PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_NB_BRANCH",dest,"out_DEPTH_"+toString(i)+"_NB_BRANCH"); 831 // if (_param->_have_port_depth) 832 // PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_TAIL" ,dest,"out_DEPTH_"+toString(i)+"_TAIL" ); 833 // } 810 834 } 811 835 812 836 // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 813 _component->test_map(false); 814 815 #ifdef POSITION 816 _component->generate_file(); 837 #if DEBUG_Prediction_unit == true 838 _component->test_map(); 839 #endif 840 841 #ifdef POSITION 842 if (usage_is_set(_usage,USE_POSITION)) 843 _component->generate_file(); 817 844 #endif 818 845 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_deallocation.cpp
r82 r88 23 23 log_printf(FUNC,Prediction_unit,FUNCTION,"Begin"); 24 24 25 if ( _usage & USE_SYSTEMC)25 if (usage_is_set(_usage,USE_SYSTEMC)) 26 26 { 27 27 delete in_CLOCK ; … … 30 30 DELETE1_SIGNAL( in_PREDICT_VAL ,_param->_nb_context,1); 31 31 DELETE1_SIGNAL(out_PREDICT_ACK ,_param->_nb_context,1); 32 DELETE1_SIGNAL( in_PREDICT_PC_PREVIOUS ,_param->_nb_context,_param->_size_ address);33 DELETE1_SIGNAL( in_PREDICT_PC_CURRENT ,_param->_nb_context,_param->_size_ address);32 DELETE1_SIGNAL( in_PREDICT_PC_PREVIOUS ,_param->_nb_context,_param->_size_instruction_address); 33 DELETE1_SIGNAL( in_PREDICT_PC_CURRENT ,_param->_nb_context,_param->_size_instruction_address); 34 34 DELETE1_SIGNAL( in_PREDICT_PC_CURRENT_IS_DS_TAKE ,_param->_nb_context,1); 35 DELETE1_SIGNAL(out_PREDICT_PC_NEXT ,_param->_nb_context,_param->_size_ address);35 DELETE1_SIGNAL(out_PREDICT_PC_NEXT ,_param->_nb_context,_param->_size_instruction_address); 36 36 DELETE1_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE ,_param->_nb_context,1); 37 DELETE1_SIGNAL(out_PREDICT_INST_IFETCH_PTR ,_param->_nb_context,_param->_size_inst_ifetch_ptr [alloc_signal_it1]);37 DELETE1_SIGNAL(out_PREDICT_INST_IFETCH_PTR ,_param->_nb_context,_param->_size_inst_ifetch_ptr); 38 38 DELETE1_SIGNAL(out_PREDICT_BRANCH_STATE ,_param->_nb_context,_param->_size_branch_state); 39 DELETE1_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context,_param->_size_depth [alloc_signal_it1]);39 DELETE1_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context,_param->_size_depth ); 40 40 41 DELETE2_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE ,_param->_nb_context,_param->_nb_instruction[ alloc_signal_it1],1);42 DELETE2_SIGNAL( in_DECOD_VAL ,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1],1);43 DELETE2_SIGNAL(out_DECOD_ACK ,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1],1);44 DELETE2_SIGNAL( in_DECOD_CONTEXT_ID ,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1],_param->_size_context_id );45 DELETE2_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR ,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1],1 );46 DELETE2_SIGNAL( in_DECOD_BRANCH_STATE ,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1],_param->_size_branch_state );47 DELETE2_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1],_param->_max_size_depth);48 DELETE2_SIGNAL( in_DECOD_BRANCH_CONDITION ,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1],_param->_size_branch_condition);49 DELETE2_SIGNAL( in_DECOD_BRANCH_DIRECTION ,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1],1 );50 DELETE2_SIGNAL( in_DECOD_ADDRESS_SRC ,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1],_param->_size_address );51 DELETE2_SIGNAL( in_DECOD_ADDRESS_DEST ,_param->_nb_decod_unit,_param->_nb_inst_decod[ alloc_signal_it1],_param->_size_address );41 DELETE2_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE ,_param->_nb_context,_param->_nb_instruction[it1],1); 42 DELETE2_SIGNAL( in_DECOD_VAL ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1); 43 DELETE2_SIGNAL(out_DECOD_ACK ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1); 44 DELETE2_SIGNAL( in_DECOD_CONTEXT_ID ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_context_id ); 45 DELETE2_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1 ); 46 DELETE2_SIGNAL( in_DECOD_BRANCH_STATE ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_branch_state ); 47 DELETE2_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_depth ); 48 DELETE2_SIGNAL( in_DECOD_BRANCH_CONDITION ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_branch_condition); 49 DELETE2_SIGNAL( in_DECOD_BRANCH_DIRECTION ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1 ); 50 DELETE2_SIGNAL( in_DECOD_ADDRESS_SRC ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_instruction_address ); 51 DELETE2_SIGNAL( in_DECOD_ADDRESS_DEST ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_instruction_address ); 52 52 53 53 DELETE1_SIGNAL( in_BRANCH_COMPLETE_VAL ,_param->_nb_inst_branch_complete,1); 54 54 DELETE1_SIGNAL(out_BRANCH_COMPLETE_ACK ,_param->_nb_inst_branch_complete,1); 55 55 DELETE1_SIGNAL( in_BRANCH_COMPLETE_CONTEXT_ID ,_param->_nb_inst_branch_complete,_param->_size_context_id); 56 DELETE1_SIGNAL( in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete,_param->_ max_size_depth);57 DELETE1_SIGNAL( in_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete,_param->_size_ address);56 DELETE1_SIGNAL( in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete,_param->_size_depth); 57 DELETE1_SIGNAL( in_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete,_param->_size_instruction_address); 58 58 DELETE1_SIGNAL( in_BRANCH_COMPLETE_FLAG ,_param->_nb_inst_branch_complete,1); 59 59 DELETE1_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete,1); 60 60 DELETE1_SIGNAL(out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete,1); 61 DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete,_param->_size_ address);62 DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete,_param->_size_ address);61 DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete,_param->_size_instruction_address); 62 DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete,_param->_size_instruction_address); 63 63 64 64 DELETE1_SIGNAL(out_BRANCH_EVENT_VAL ,_param->_nb_context,1); 65 65 DELETE1_SIGNAL( in_BRANCH_EVENT_ACK ,_param->_nb_context,1); 66 66 // DELETE1_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID ,_param->_nb_context,_param->_size_context_id); 67 // DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH ,_param->_nb_context,_param->_ max_size_depth);67 // DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH ,_param->_nb_context,_param->_size_depth); 68 68 // DELETE1_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION,_param->_nb_context,1); 69 DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC ,_param->_nb_context,_param->_size_ address);70 DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST ,_param->_nb_context,_param->_size_ address);69 DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC ,_param->_nb_context,_param->_size_instruction_address); 70 DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST ,_param->_nb_context,_param->_size_instruction_address); 71 71 72 DELETE1_SIGNAL(out_DEPTH_NB_BRANCH ,_param->_nb_context,_param->_size_depth[alloc_signal_it1]+1); 73 DELETE1_SIGNAL(out_DEPTH_TAIL ,_param->_nb_context,_param->_size_depth[alloc_signal_it1]); 72 DELETE1_SIGNAL(out_DEPTH_CURRENT ,_param->_nb_context,_param->_size_depth); 73 DELETE1_SIGNAL(out_DEPTH_MIN ,_param->_nb_context,_param->_size_depth); 74 DELETE1_SIGNAL(out_DEPTH_MAX ,_param->_nb_context,_param->_size_depth+1); 74 75 } 75 76 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_end_cycle.cpp
r81 r88 24 24 25 25 #ifdef STATISTICS 26 _stat->end_cycle(); 26 if (usage_is_set(_usage,USE_STATISTICS)) 27 _stat->end_cycle(); 27 28 #endif 28 29 … … 30 31 // Evaluation before read the ouput signal 31 32 // sc_start(0); 32 _interfaces->testbench(); 33 if (usage_is_set(_usage,USE_VHDL_TESTBENCH)) 34 _interfaces->testbench(); 33 35 #endif 34 36 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_statistics_allocation.cpp
r81 r88 26 26 "Prediction_unit", 27 27 param_statistics); 28 28 29 _stat->add_stat(_component_btb ->_stat); 30 _stat->add_stat(_component_dir ->_stat); 31 _stat->add_stat(_component_ras ->_stat); 32 _stat->add_stat(_component_upt ->_stat); 33 _stat->add_stat(_component_glue->_stat); 34 29 35 log_printf(FUNC,Prediction_unit,FUNCTION,"End"); 30 36 };
Note: See TracChangeset
for help on using the changeset viewer.