[81] | 1 | #ifdef SYSTEMC |
---|
| 2 | /* |
---|
| 3 | * $Id$ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_front_end { |
---|
| 15 | namespace front_end { |
---|
| 16 | namespace prediction_unit { |
---|
| 17 | namespace update_prediction_table { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Update_Prediction_Table::genMealy_decod" |
---|
| 22 | void Update_Prediction_Table::genMealy_decod (void) |
---|
| 23 | { |
---|
| 24 | log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin"); |
---|
| 25 | |
---|
| 26 | for (uint32_t i=0; i<_param->_nb_inst_decod; i++) |
---|
| 27 | { |
---|
[82] | 28 | Tcontrol_t miss = PORT_READ(in_DECOD_MISS_DECOD [i]); |
---|
[81] | 29 | |
---|
| 30 | if (miss) |
---|
| 31 | { |
---|
| 32 | // miss : need a empty slot. |
---|
| 33 | Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_DECOD_CONTEXT_ID [i]):0; |
---|
| 34 | uint32_t top = reg_TOP[context]; |
---|
| 35 | internal_DECOD_ACK [i] = (reg_UPDATE_PREDICTION_TABLE [context][top]._state == UPDATE_PREDICTION_STATE_EMPTY); |
---|
| 36 | } |
---|
| 37 | else |
---|
| 38 | { |
---|
| 39 | internal_DECOD_ACK [i] = true; |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | PORT_WRITE(out_DECOD_ACK [i], internal_DECOD_ACK [i]); |
---|
| 43 | } |
---|
| 44 | |
---|
| 45 | log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End"); |
---|
| 46 | }; |
---|
| 47 | |
---|
| 48 | }; // end namespace update_prediction_table |
---|
| 49 | }; // end namespace prediction_unit |
---|
| 50 | }; // end namespace front_end |
---|
| 51 | }; // end namespace multi_front_end |
---|
| 52 | }; // end namespace core |
---|
| 53 | |
---|
| 54 | }; // end namespace behavioural |
---|
| 55 | }; // end namespace morpheo |
---|
| 56 | #endif |
---|