#ifdef SYSTEMC
/*
 * $Id: Core_Glue_transition.cpp 120 2009-05-26 19:01:47Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Core/Core_Glue/include/Core_Glue.h"

namespace morpheo                    {
namespace behavioural {
namespace core {
namespace core_glue {


#undef  FUNCTION
#define FUNCTION "Core_Glue::transition"
  void Core_Glue::transition (void)
  {
    log_begin(Core_Glue,FUNCTION);

    if (PORT_READ(in_NRESET) == 0)
      {
        for (uint32_t i=0; i<_param->_nb_execute_loop; ++i)
          _priority_read_unit  [i]->reset();
        _priority_ooo_engine->reset();
      }
    else
      {
	// next priority
        for (uint32_t i=0; i<_param->_nb_execute_loop; ++i)
          _priority_read_unit  [i]->transition();
        _priority_ooo_engine->transition();
      }

#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    end_cycle ();
#endif

    log_end(Core_Glue,FUNCTION);
  };

}; // end namespace core_glue
}; // end namespace core

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