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

Last change on this file since 131 was 131, checked in by rosiere, 15 years ago

1) add constant method
2) test with systemc 2.2.0

  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: Direction_Glue_constant.cpp 131 2009-07-08 18:40:08Z rosiere $
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::constant"
23  void Direction_Glue::constant (void)
24  {
25    log_printf(FUNC,Direction_Glue,FUNCTION,"Begin");
26   
27    if (not _param->_have_component_meta_predictor)
28      {
29        // no need update
30        for (uint32_t i=0; i<_param->_nb_inst_update; i++)
31          PORT_WRITE(out_UPDATE_ACK [i], 1);
32       
33        // always ack
34        for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
35          {
36            PORT_WRITE(out_PREDICT_ACK [i], 1);
37           
38            // constant direction : never / always
39            switch (_param->_predictor_scheme)
40              {
41              case PREDICTOR_NEVER_TAKE  :
42                {
43                  PORT_WRITE(out_PREDICT_DIRECTION [i], 0);
44                  break;
45                }
46              case PREDICTOR_ALWAYS_TAKE :
47                {
48                  PORT_WRITE(out_PREDICT_DIRECTION [i], 1);
49                  break;
50                }
51              default : break;
52              }
53          }
54      }
55
56    log_printf(FUNC,Direction_Glue,FUNCTION,"End");
57  };
58
59}; // end namespace direction_glue
60}; // end namespace direction
61}; // end namespace prediction_unit
62}; // end namespace front_end
63}; // end namespace multi_front_end
64}; // end namespace core
65}; // end namespace behavioural
66}; // end namespace morpheo             
67#endif
Note: See TracBrowser for help on using the repository browser.