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

#include "Behavioural/include/Interface.h"


namespace morpheo              {
namespace behavioural          {

  string Interface::get_clock (void)
  {
    string clock = "";
    
    if (not _list_signal->empty())
      {
	list<Signal*>::iterator i     = _list_signal->begin();
	
	while (i != _list_signal->end())
	  {
	    string str = (*i)->get_clock ();

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

    return clock;
  };

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