#ifdef SYSTEMC
/*
 * $Id: Front_end_Glue_genMealy_nb_inst.cpp 123 2009-06-08 20:43:30Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/include/Front_end_Glue.h"

namespace morpheo                    {
namespace behavioural {
namespace core {
namespace multi_front_end {
namespace front_end {
namespace front_end_glue {

#undef  FUNCTION
#define FUNCTION "Front_end_Glue::genMealy_nb_inst"
  void Front_end_Glue::genMealy_nb_inst (void)
  {
    log_begin(Front_end_Glue,FUNCTION);

    if (PORT_READ(in_NRESET))
      {
    for (uint32_t i=0; i<_param->_nb_context; ++i)
      {
        Tcounter_t nb_inst = PORT_READ(in_NB_INST_DECOD_UNIT_DECOD_ALL [i]);

        PORT_WRITE(out_NB_INST_DECOD_ALL               [i], nb_inst);
        PORT_WRITE(out_NB_INST_CONTEXT_STATE_DECOD_ALL [i], nb_inst);
      }
      }

    log_end(Front_end_Glue,FUNCTION);
  };

}; // end namespace front_end_glue
}; // end namespace front_end
}; // end namespace multi_front_end
}; // end namespace core

}; // end namespace behavioural
}; // end namespace morpheo              
#endif
