#ifdef SYSTEMC
/*
 * $Id: Core_Glue_transition.cpp 88 2008-12-10 18:31:39Z 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 [i]->reset();
      }
    else
      {
	// next priority
        for (uint32_t i=0; i<_param->_nb_execute_loop; ++i)
          _priority [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
