source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_genMealy_predict.cpp @ 78

Last change on this file since 78 was 78, checked in by rosiere, 16 years ago

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
File size: 2.3 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/Direction/Direction_Glue/include/Direction_Glue.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_front_end {
15namespace front_end {
16namespace prediction_unit {
17namespace direction {
18namespace direction_glue {
19
20
21#undef  FUNCTION
22#define FUNCTION "Direction_Glue::genMealy_predict"
23  void Direction_Glue::genMealy_predict (void)
24  {
25    log_printf(FUNC,Direction_Glue,FUNCTION,"Begin");
26
27    // constant direction : never / always
28    switch (_param->_predictor_scheme)
29      {
30      case PREDICTOR_STATIC    :
31        {
32          for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
33            PORT_WRITE(out_PREDICT_DIRECTION   [i], PORT_READ(in_PREDICT_STATIC    [i]));
34         
35          break;
36        }
37      case PREDICTOR_LAST_TAKE :
38        {
39          for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
40            PORT_WRITE(out_PREDICT_DIRECTION   [i], PORT_READ(in_PREDICT_LAST_TAKE [i]));
41
42          break;
43        }
44      case PREDICTOR_COUNTER   :
45      case PREDICTOR_LOCAL     :
46      case PREDICTOR_GLOBAL    :
47      case PREDICTOR_META      :
48      case PREDICTOR_CUSTOM    :
49        {
50          for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
51            {
52              // not use :
53              // in_PREDICT_LAST_TAKE       
54              // in_PREDICT_STATIC
55
56              PORT_WRITE(out_PREDICT_PREDICTOR_VAL         [i], PORT_READ(in_PREDICT_VAL                 [i]));
57              PORT_WRITE(out_PREDICT_ACK                   [i], PORT_READ(in_PREDICT_PREDICTOR_ACK       [i]));
58              PORT_WRITE(out_PREDICT_PREDICTOR_ADDRESS_SRC [i], PORT_READ(in_PREDICT_ADDRESS_SRC         [i]));
59              PORT_WRITE(out_PREDICT_HISTORY               [i], PORT_READ(in_PREDICT_PREDICTOR_HISTORY   [i]));
60              PORT_WRITE(out_PREDICT_DIRECTION             [i], PORT_READ(in_PREDICT_PREDICTOR_DIRECTION [i]));
61            }
62
63          break;
64        }
65      default :
66        {
67          ERRORMORPHEO(FUNCTION,"No valid predictor scheme");
68          break;
69        }
70      }
71
72
73   
74    log_printf(FUNC,Direction_Glue,FUNCTION,"End");
75  };
76
77}; // end namespace direction_glue
78}; // end namespace direction
79}; // end namespace prediction_unit
80}; // end namespace front_end
81}; // end namespace multi_front_end
82}; // end namespace core
83}; // end namespace behavioural
84}; // end namespace morpheo             
85#endif
Note: See TracBrowser for help on using the repository browser.