source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp @ 40

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

Interface et Signal, c'est deux classes enregistres la valeurs des signaux à chaque cycle ... étape préparatoire avan le changement de la classe Vhdl_Testbench

File size: 1.9 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#ifdef VHDL_TESTBENCH
32    _list_cycle    = new list<string>;
33#endif
34
35    log_printf(FUNC,Behavioural,"Interface","End");
36  };
37
38  Interface::Interface  (const Interface & interface):
39    _name         (interface._name        ),
40    _direction    (interface._direction   ),
41    _localisation (interface._localisation)
42  {
43    log_printf(FUNC,Behavioural,"Interface (copy)","Begin");
44    _comment       = interface._comment    ;
45    _list_signal   = interface._list_signal;
46#ifdef POSITION
47    _is_map        = interface._is_map     ;
48    _entity_map    = interface._entity_map   ;
49    _interface_map = interface._interface_map;
50#endif
51#ifdef VHDL_TESTBENCH
52    _list_cycle    = interface._list_cycle;
53#endif
54
55    log_printf(FUNC,Behavioural,"Interface (copy)","End");
56  };
57 
58  Interface::~Interface ()
59  {
60    log_printf(FUNC,Behavioural,"~Interface","Begin");
61
62    if (_list_signal->empty()== false)
63      {
64        list<Signal*>::iterator i = _list_signal->begin();
65
66        while (i != _list_signal->end())
67          {
68            delete (*i);
69            ++i;
70          }
71      }
72
73    delete _list_signal;
74
75#ifdef VHDL_TESTBENCH
76    delete _list_cycle ;
77#endif
78
79    log_printf(FUNC,Behavioural,"~Interface","End");
80  };
81 
82
83}; // end namespace behavioural         
84}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.