source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_signal.cpp @ 42

Last change on this file since 42 was 42, checked in by rosiere, 17 years ago

Modification des classes d'encapsulation des interfaces :

  • gère les signaux à écrire dans le vhdl
  • les traces pour le testbench
  • la génération des vhdl structurelles

-> test sur la Pattern History Table

File size: 964 bytes
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/include/Interfaces.h"
9
10namespace morpheo              {
11namespace behavioural          {
12
13  Signal * Interfaces::find_signal (string name)
14  {
15    if (_list_interface->empty()== false)
16      {
17        list<Interface_fifo*>::iterator i = _list_interface->begin();
18
19        while (i != _list_interface->end())
20          {
21            Signal * signal = (*i)->find_signal(name);
22
23            // Warning : Name of signal is uniq
24            if (signal != NULL)
25              return signal;
26
27            ++i;
28          }
29      }
30     
31    return NULL;
32  };
33
34  bool Interfaces::find_signal (Signal * signal)
35  {
36    if (_list_interface->empty()== false)
37      {
38        list<Interface_fifo*>::iterator i = _list_interface->begin();
39
40        while (i != _list_interface->end())
41          {
42            if ((*i)->find_signal(signal) == true)
43              return true;
44
45            ++i;
46          }
47      }
48     
49    return false;
50  };
51
52}; // end namespace behavioural         
53}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.