#ifdef SYSTEMC
/*
 * $Id: Direction_Glue_genMealy_update.cpp 112 2009-03-18 22:36:26Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Direction_Glue.h"

namespace morpheo                    {
namespace behavioural {
namespace core {
namespace multi_front_end {
namespace front_end {
namespace prediction_unit {
namespace direction {
namespace direction_glue {


#undef  FUNCTION
#define FUNCTION "Direction_Glue::genMealy_update"
  void Direction_Glue::genMealy_update (void)
  {
    log_begin(Direction_Glue,FUNCTION);
    log_function(Direction_Glue,FUNCTION,_name.c_str());

    for (uint32_t i=0; i<_param->_nb_inst_update; i++)
      {
	PORT_WRITE(out_UPDATE_PREDICTOR_VAL               [i], PORT_READ(in_UPDATE_VAL               [i]));
	PORT_WRITE(out_UPDATE_ACK                         [i], PORT_READ(in_UPDATE_PREDICTOR_ACK     [i]));
	PORT_WRITE(out_UPDATE_PREDICTOR_ADDRESS           [i], PORT_READ(in_UPDATE_ADDRESS           [i]));
	PORT_WRITE(out_UPDATE_PREDICTOR_HISTORY           [i], PORT_READ(in_UPDATE_HISTORY           [i]));
	PORT_WRITE(out_UPDATE_PREDICTOR_DIRECTION         [i], PORT_READ(in_UPDATE_DIRECTION         [i]));
	PORT_WRITE(out_UPDATE_PREDICTOR_PREDICTION_IFETCH [i], PORT_READ(in_UPDATE_PREDICTION_IFETCH [i]));
      }
    
    log_end(Direction_Glue,FUNCTION);
  };

}; // end namespace direction_glue
}; // end namespace direction
}; // end namespace prediction_unit
}; // end namespace front_end
}; // end namespace multi_front_end
}; // end namespace core
}; // end namespace behavioural
}; // end namespace morpheo              
#endif
