#ifdef VHDL_TESTBENCH
/*
 * $Id$
 *
 * [ 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())
      {
	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
