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

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

Interface et vhdl_testbench : l'appel aux fonction add_input et add_ouput est maintenant réalisé par la classe Interface (et autre).

2 remarques :

  • tester avec des sous composants (en particulier les sorties d'un est directement relié au sortie d'un autre)
  • Signal_testbench.cpp -> l'optimisé (par exemple pointeur de fonction afin d'éviter le test et le switch)
File size: 1.0 KB
Line 
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  {
16    log_printf(FUNC,Behavioural,"get_signal","Begin");
17    uint32_t               depth          = 0;
18    string                 separator      = ",\n";
19    bool                   last_separator = false;
20
21
22    list<Signal*>::iterator i    = _list_signal->begin();
23    bool                   empty = _list_signal->empty();
24
25    string                 tab   = string(depth,'\t');
26    ostringstream          text;
27
28    if (not empty)
29      {
30        // First
31        if (i != _list_signal->end())
32          {
33            text << tab << **i;
34            ++i;
35          }
36       
37        while (i != _list_signal->end())
38          {
39            text << separator;
40            text << tab << **i;
41            ++i;
42          }
43        if (last_separator)
44          text << separator;
45      }
46
47    log_printf(FUNC,Behavioural,"get_signal","End");
48
49    return text.str();
50  };
51
52}; // end namespace behavioural         
53}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.