source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_signal.cpp @ 43

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

Modif mineur : ajout d'info de débug

Release non stable

File size: 1.8 KB
RevLine 
[29]1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/include/Interface.h"
9
10
11namespace morpheo              {
12namespace behavioural          {
13
14  string Interface::get_signal (void)
15  {
[38]16    log_printf(FUNC,Behavioural,"get_signal","Begin");
[40]17
[29]18    uint32_t               depth          = 0;
19    string                 separator      = ",\n";
20    bool                   last_separator = false;
21
22
[38]23    list<Signal*>::iterator i    = _list_signal->begin();
[31]24    bool                   empty = _list_signal->empty();
[29]25
26    string                 tab   = string(depth,'\t');
27    ostringstream          text;
28
29    if (not empty)
30      {
31        // First
[31]32        if (i != _list_signal->end())
[29]33          {
[38]34            text << tab << **i;
[29]35            ++i;
36          }
37       
[31]38        while (i != _list_signal->end())
[29]39          {
40            text << separator;
[38]41            text << tab << **i;
[29]42            ++i;
43          }
44        if (last_separator)
45          text << separator;
46      }
47
[38]48    log_printf(FUNC,Behavioural,"get_signal","End");
49
[29]50    return text.str();
51  };
52
[41]53#ifdef VHDL
54#  ifdef VHDL_TESTBENCH
[43]55
56#undef  FUNCTION
57#define FUNCTION "Interface::get_signal"
[41]58  void Interface::get_signal (list<string> * & list_signal)
59  {
[43]60    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
61
[41]62    if (not _list_signal->empty())
63      {
64        list<Signal*>::iterator i = _list_signal->begin();
65       
66        while (i != _list_signal->end())
67          {
68            (*i)->get_name_vhdl (list_signal);
69            ++i;
70          }
71      }
[43]72
73    log_printf(FUNC,Behavioural,FUNCTION,"End");
[41]74  };
75#  endif
76#endif
77
[43]78#undef  FUNCTION
79#define FUNCTION "Interface::get_signal_list"
[42]80  list<Signal *> * Interface::get_signal_list (void)
81    {
[43]82      log_printf(FUNC,Behavioural,FUNCTION,"Begin");
83      list<Signal *> * _return = _list_signal;
84      log_printf(FUNC,Behavioural,FUNCTION,"End");
85
86      return _return;
[42]87    }
88
[29]89}; // end namespace behavioural         
90}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.