source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_decod.cpp @ 81

Last change on this file since 81 was 81, checked in by rosiere, 16 years ago
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
File size: 1.4 KB
Line 
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
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_front_end {
15namespace front_end {
16namespace prediction_unit {
17namespace 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      {
28        Tcontrol_t miss = PORT_READ(in_DECOD_MISS_PREDICTION [i]);
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
Note: See TracBrowser for help on using the repository browser.