#ifdef SYSTEMC
/*
 * $Id$
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"

namespace morpheo                    {
namespace behavioural {
namespace stage_1_ifetch {
namespace predictor {
namespace meta_predictor {
namespace meta_predictor_glue {


  void Meta_Predictor_Glue::genMealy_predict_ack (void)
  {
    log_printf(FUNC,Meta_Predictor_Glue,"genMealy_predict_ack","Begin");
    
    for (uint32_t i=0; i<_param._nb_prediction; i++)
      {
	Tcontrol_t predictor_0_ack =  not _param._have_meta_predictor or PORT_READ(in_PREDICT_PREDICTOR_0_ACK [i]);
	Tcontrol_t predictor_1_ack =  not _param._have_meta_predictor or PORT_READ(in_PREDICT_PREDICTOR_1_ACK [i]);
	Tcontrol_t predictor_2_ack =                                     PORT_READ(in_PREDICT_PREDICTOR_2_ACK [i]);

	PORT_WRITE(out_PREDICT_ACK [i], predictor_0_ack and predictor_1_ack and predictor_2_ack);
      }

    log_printf(FUNC,Meta_Predictor_Glue,"genMealy_predict_ack","End");
  };

}; // end namespace meta_predictor_glue
}; // end namespace meta_predictor
}; // end namespace predictor
}; // end namespace stage_1_ifetch
}; // end namespace behavioural
}; // end namespace morpheo              
#endif
