source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_clock.cpp @ 75

Last change on this file since 75 was 75, checked in by rosiere, 16 years ago

Update all component (except front_end) to :

  • new statistics model
  • no namespace std
File size: 1002 bytes
RevLine 
[41]1#ifdef VHDL_TESTBENCH
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/include/Interfaces.h"
10
11
12namespace morpheo              {
13namespace behavioural          {
14 
[43]15#undef  FUNCTION
16#define FUNCTION "Interfaces::get_clock"
[42]17  Signal * Interfaces::get_clock (void)
[41]18  {
[43]19    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
20
[42]21    Signal * clock = NULL;
[41]22   
23    if (not _list_interface->empty())
24      {
[75]25        std::list<Interface_fifo*>::iterator i = _list_interface->begin();
[41]26       
27        while (i != _list_interface->end())
28          {
[42]29            Signal * sig = (*i)->get_clock ();
[41]30
[42]31            if (sig != NULL)
[41]32              {
[42]33                if (clock != NULL)
[41]34                  throw ErrorMorpheo ("<Interfaces.get_clock> : find too many clock.");
[42]35                clock = sig;
[41]36              }
37            ++i;
38          }
39      }
40
[42]41    if (clock == NULL)
[41]42      throw ErrorMorpheo ("<Interfaces.get_clock> : no clock find.");
[43]43 
44    log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 
[41]45    return clock;
46  };
47
48}; // end namespace behavioural         
49}; // end namespace morpheo             
50#endif
Note: See TracBrowser for help on using the repository browser.