source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.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: 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#ifdef POSITION
15                         ,direction_t           direction   
16                         ,localisation_t        localisation
17#endif
18                         ):
19    _name         (name        )
20#ifdef POSITION
21    ,_direction    (direction   )
22    ,_localisation (localisation)
23#endif
24  {
25    log_printf(FUNC,Behavioural,"Interface","Begin");
26
27    _list_signal   = new (list<Signal*>);
28
29#ifdef POSITION
30    _comment       = "";
31    _is_map        = false;
32    _entity_map    = NULL;
33    _interface_map = NULL;
34#endif
35
36#ifdef VHDL_TESTBENCH
37    _nb_cycle      = 0;
38#endif
39
40    log_printf(FUNC,Behavioural,"Interface","End");
41  };
42
43  Interface::Interface  (const Interface & interface):
44    _name         (interface._name        )
45#ifdef POSITION
46    ,_direction    (interface._direction   )
47    ,_localisation (interface._localisation)
48#endif
49  {
50    log_printf(FUNC,Behavioural,"Interface (copy)","Begin");
51    _list_signal   = interface._list_signal;
52#ifdef POSITION
53    _comment       = interface._comment    ;
54    _is_map        = interface._is_map     ;
55    _entity_map    = interface._entity_map   ;
56    _interface_map = interface._interface_map;
57#endif
58#ifdef VHDL_TESTBENCH
59    _nb_cycle      = interface._nb_cycle;
60#endif
61
62    log_printf(FUNC,Behavioural,"Interface (copy)","End");
63  };
64 
65  Interface::~Interface ()
66  {
67    log_printf(FUNC,Behavioural,"~Interface","Begin");
68
69    if (_list_signal->empty()== false)
70      {
71        list<Signal*>::iterator i = _list_signal->begin();
72
73        while (i != _list_signal->end())
74          {
75            delete (*i);
76            ++i;
77          }
78      }
79
80    delete _list_signal;
81
82    log_printf(FUNC,Behavioural,"~Interface","End");
83  };
84 
85
86}; // end namespace behavioural         
87}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.