#ifdef VHDL_TESTBENCH
/*
 * $Id$
 *
 * [ Description ]
 * 
 */

#include "Behavioural/include/Interfaces.h"


namespace morpheo              {
namespace behavioural          {
  
  string Interfaces::get_clock (void)
  {
    string clock = "";
    
    if (not _list_interface->empty())
      {
	list<Interface_fifo*>::iterator i     = _list_interface->begin();
	
	while (i != _list_interface->end())
	  {
	    string str = (*i)->get_clock ();

	    if (str != "")
	      {
		if (clock != "")
		  throw ErrorMorpheo ("<Interfaces.get_clock> : find too many clock.");
		clock = str;
	      }
	    ++i;
	  }
      }

    if (clock == "")
      throw ErrorMorpheo ("<Interfaces.get_clock> : no clock find.");
    
    return clock;
  };

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