Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters.cpp
- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters.cpp
r82 r88 30 30 uint32_t nb_inst_branch_predict, 31 31 uint32_t nb_inst_branch_decod , 32 uint32_t nb_inst_branch_update ) 32 uint32_t nb_inst_branch_update , 33 bool is_toplevel 34 ) 33 35 { 34 36 log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin"); 35 37 36 38 _nb_context = nb_context ; 37 _size_address = size_address ;38 39 _nb_instruction = nb_instruction ; 39 _size_depth = size_depth ; 40 // _size_depth = size_depth ; 41 _array_size_depth = size_depth ; 40 42 _nb_decod_unit = nb_decod_unit ; 41 43 _nb_inst_decod = nb_inst_decod ; 42 // 43 // 44 // _nb_ooo_engine = nb_ooo_engine ; 45 // _nb_inst_update = nb_inst_update ; 44 46 _nb_inst_branch_predict = nb_inst_branch_predict; 45 47 _nb_inst_branch_decod = nb_inst_branch_decod ; 46 48 _nb_inst_branch_update = nb_inst_branch_update ; 47 49 48 _size_context_id = log2(_nb_context); 49 _size_inst_ifetch_ptr = new uint32_t [_nb_context]; 50 _max_size_depth = max<uint32_t>(_size_depth,_nb_context); 50 test(); 51 51 52 _have_port_context_id = (_size_context_id>0); 53 _have_port_max_depth = (_max_size_depth>0); 54 _have_port_depth = new bool [_nb_context]; 55 _have_port_inst_ifetch_ptr = new bool [_nb_context]; 52 if (is_toplevel) 53 { 54 _size_instruction_address = size_address; 55 _size_context_id = log2(_nb_context); 56 _size_depth = max<uint32_t>(size_depth,_nb_context); 57 _size_inst_ifetch_ptr = log2(max<uint32_t>(_nb_instruction,_nb_context)); 56 58 57 for (uint32_t i=0; i<_nb_context; i++)58 {59 _ size_inst_ifetch_ptr [i] = log2(_nb_instruction [i]);60 _have_port_depth [i] = (_size_depth [i] > 0); 61 _have_port_inst_ifetch_ptr [i] = (_size_inst_ifetch_ptr [i] > 0);59 _have_port_context_id = (_size_context_id > 0); 60 _have_port_depth = (_size_depth > 0); 61 _have_port_inst_ifetch_ptr = (_size_inst_ifetch_ptr > 0); 62 63 copy (); 62 64 } 63 65 64 test();65 66 log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End"); 66 67 }; … … 80 81 { 81 82 log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin"); 82 delete [] _size_inst_ifetch_ptr ; 83 delete [] _have_port_depth ; 84 delete [] _have_port_inst_ifetch_ptr; 83 log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End"); 84 }; 85 86 #undef FUNCTION 87 #define FUNCTION "Prediction_unit_Glue::copy" 88 void Parameters::copy (void) 89 { 90 log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin"); 85 91 log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End"); 86 92 };
Note: See TracChangeset
for help on using the changeset viewer.