#ifdef VHDL_TESTBENCH
/*
 * $Id: Interfaces_get_cycle.cpp 81 2008-04-15 18:40:01Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/include/Interfaces.h"


namespace morpheo              {
namespace behavioural          {

#undef  FUNCTION
#define FUNCTION "Interfaces::get_cycle"
  uint32_t Interfaces::get_cycle (void)
  {
    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    uint32_t cycle = 0;
    
    if (not _list_interface->empty())
      {
	std::list<Interface_fifo*>::iterator i = _list_interface->begin();
	
	while (i != _list_interface->end())
	  {
	    uint32_t x = (*i)->get_cycle ();
	    
	    if (x > cycle)
	      cycle = x;

	    ++i;
	  }
      }
    log_printf(FUNC,Behavioural,FUNCTION,"End");

    return cycle;
  };

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