#ifdef SYSTEMC
/*
 * $Id: Core_Glue_transition.cpp 111 2009-02-27 18:37:40Z 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_ooo_engine [i]->reset();
            _priority_read_unit  [i]->reset();
          }
      }
    else
      {
	// next priority
        for (uint32_t i=0; i<_param->_nb_execute_loop; ++i)
          {
            _priority_ooo_engine [i]->transition();
            _priority_read_unit  [i]->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
