Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/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/Update_Prediction_Table/src/Parameters.cpp
r82 r88 21 21 #define FUNCTION "Update_Prediction_Table::Parameters" 22 22 Parameters::Parameters (uint32_t nb_context , 23 uint32_t * size_queue , 23 uint32_t * size_upt_queue , 24 uint32_t * size_ufpt_queue , 24 25 uint32_t size_address , 25 26 uint32_t nb_inst_predict , … … 28 29 uint32_t nb_inst_update , 29 30 uint32_t size_history , 30 uint32_t * size_ras_index ) 31 uint32_t * size_ras_index , 32 bool is_toplevel): 33 _not_accurate_block_predict (false) 31 34 { 32 35 log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin"); 33 36 34 37 _nb_context = nb_context ; 35 _size_queue = size_queue ; 36 _size_address = size_address ; 38 _size_upt_queue = size_upt_queue ; 39 _size_ufpt_queue = size_ufpt_queue ; 40 // _size_address = size_address ; 37 41 _nb_inst_predict = nb_inst_predict ; 38 42 _nb_inst_decod = nb_inst_decod ; … … 42 46 _size_ras_index = size_ras_index ; 43 47 44 _size_context_id = log2(nb_context);45 _size_depth = new uint32_t[_nb_context];46 _have_port_depth = new bool [_nb_context];47 for (uint32_t i=0; i<_nb_context; i++)48 {49 _size_depth [i] = log2(_size_queue[i]);50 _have_port_depth [i] = (_size_depth [i] > 0);51 }52 _max_size_depth = max<uint32_t>(_size_depth,_nb_context);53 48 _max_size_ras_index = max<uint32_t>(_size_ras_index,nb_context); 54 49 55 _have_port_context_id = _size_context_id> 0;56 _have_port_max_depth = _max_size_depth > 0;57 50 _have_port_history = _size_history > 0; 51 52 test(); 53 54 if (is_toplevel) 55 { 56 _size_instruction_address = size_address; 57 _size_context_id = log2(nb_context); 58 _size_depth = log2(max<uint32_t>(_size_upt_queue,_nb_context)); 59 60 _have_port_context_id = _size_context_id> 0; 61 _have_port_depth = _size_depth > 0; 62 63 copy (); 64 } 58 65 59 test();60 66 log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End"); 61 67 }; … … 75 81 { 76 82 log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin"); 77 delete [] _size_depth ; 78 delete [] _have_port_depth; 83 // delete [] _size_depth ; 84 // delete [] _have_port_depth; 85 log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End"); 86 }; 87 88 #undef FUNCTION 89 #define FUNCTION "Update_Prediction_Table::copy" 90 void Parameters::copy (void) 91 { 92 log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin"); 79 93 log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End"); 80 94 };
Note: See TracChangeset
for help on using the changeset viewer.