source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_predict_valack.cpp @ 123

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

1) Fix performance
2) add auto generation to SPECINT2000
3) add reset in genMoore and genMealy

  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: Meta_Predictor_Glue_genMealy_predict_valack.cpp 123 2009-06-08 20:43:30Z rosiere $
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_front_end {
15namespace front_end {
16namespace prediction_unit {
17namespace direction {
18namespace meta_predictor {
19namespace meta_predictor_glue {
20
21
22#undef  FUNCTION
23#define FUNCTION "Meta_Predictor_Glue::genMealy_predict_valack"
24  void Meta_Predictor_Glue::genMealy_predict_valack (void)
25  {
26    log_begin(Meta_Predictor_Glue,FUNCTION);
27    log_function(Meta_Predictor_Glue,FUNCTION,_name.c_str());
28
29    if (PORT_READ(in_NRESET))
30      {
31    for (uint32_t i=0; i<_param->_nb_inst_predict; ++i)
32      {
33        Tcontrol_t val = PORT_READ(in_PREDICT_VAL [i]);
34        Tcontrol_t ack = true;
35
36        for (uint32_t j=0; j<_param->_nb_predictor; ++j)
37          {
38            PORT_WRITE(out_PREDICT_PREDICTOR_VAL [j][i],val);
39
40            ack &= PORT_READ(in_PREDICT_PREDICTOR_ACK [j][i]);
41          }
42
43        PORT_WRITE(out_PREDICT_ACK [i],ack);
44      }
45      }
46    else
47      {
48        // Reset
49        for (uint32_t i=0; i<_param->_nb_inst_predict; ++i)
50          {
51            for (uint32_t j=0; j<_param->_nb_predictor; ++j)
52              PORT_WRITE(out_PREDICT_PREDICTOR_VAL [j][i],0);
53            PORT_WRITE(out_PREDICT_ACK [i],0);
54          }
55      }
56
57    log_end(Meta_Predictor_Glue,FUNCTION);
58  };
59
60}; // end namespace meta_predictor_glue
61}; // end namespace meta_predictor
62}; // end namespace direction
63}; // end namespace prediction_unit
64}; // end namespace front_end
65}; // end namespace multi_front_end
66}; // end namespace core
67
68}; // end namespace behavioural
69}; // end namespace morpheo             
70#endif
Note: See TracBrowser for help on using the repository browser.