source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.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.7 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/include/Interface.h"
9
10namespace morpheo              {
11namespace behavioural          {
12
13  Interface::Interface  (string                name         ,
14                         direction_t           direction    ,
15                         localisation_t        localisation ):
16    _name         (name        ),
17    _direction    (direction   ),
18    _localisation (localisation)
19  {
20    log_printf(FUNC,Behavioural,"Interface","Begin");
21
22    _comment     = "";
23    _list_signal = new (list<Signal*>);
24
25#ifdef POSITION
26     _is_map        = false;
27     _entity_map    = NULL;
28     _interface_map = NULL;
29#endif
30
31    log_printf(FUNC,Behavioural,"Interface","End");
32  };
33
34  Interface::Interface  (const Interface & interface):
35    _name         (interface._name        ),
36    _direction    (interface._direction   ),
37    _localisation (interface._localisation)
38  {
39    log_printf(FUNC,Behavioural,"Interface (copy)","Begin");
40    _comment       = interface._comment    ;
41    _list_signal   = interface._list_signal;
42#ifdef POSITION
43    _is_map        = interface._is_map     ;
44    _entity_map    = interface._entity_map   ;
45    _interface_map = interface._interface_map;
46#endif
47    log_printf(FUNC,Behavioural,"Interface (copy)","End");
48  };
49 
50  Interface::~Interface ()
51  {
52    log_printf(FUNC,Behavioural,"~Interface","Begin");
53
54    if (_list_signal->empty()== false)
55      {
56        list<Signal*>::iterator i     = _list_signal->begin();
57
58        while (i != _list_signal->end())
59          {
60            delete (*i);
61            ++i;
62          }
63      }
64
65    delete _list_signal;
66    log_printf(FUNC,Behavioural,"~Interface","End");
67  };
68 
69
70}; // end namespace behavioural         
71}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.