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
RevLine 
[29]1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/include/Interface.h"
9
10namespace morpheo              {
11namespace behavioural          {
12
[42]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
[29]24  {
[38]25    log_printf(FUNC,Behavioural,"Interface","Begin");
26
[40]27    _list_signal   = new (list<Signal*>);
[38]28
[31]29#ifdef POSITION
[42]30    _comment       = "";
[40]31    _is_map        = false;
32    _entity_map    = NULL;
33    _interface_map = NULL;
[31]34#endif
[38]35
[40]36#ifdef VHDL_TESTBENCH
[41]37    _nb_cycle      = 0;
[40]38#endif
39
[38]40    log_printf(FUNC,Behavioural,"Interface","End");
[29]41  };
[31]42
43  Interface::Interface  (const Interface & interface):
[42]44    _name         (interface._name        )
45#ifdef POSITION
46    ,_direction    (interface._direction   )
47    ,_localisation (interface._localisation)
48#endif
[31]49  {
[38]50    log_printf(FUNC,Behavioural,"Interface (copy)","Begin");
51    _list_signal   = interface._list_signal;
[31]52#ifdef POSITION
[42]53    _comment       = interface._comment    ;
[38]54    _is_map        = interface._is_map     ;
55    _entity_map    = interface._entity_map   ;
56    _interface_map = interface._interface_map;
[31]57#endif
[40]58#ifdef VHDL_TESTBENCH
[41]59    _nb_cycle      = interface._nb_cycle;
[40]60#endif
61
[38]62    log_printf(FUNC,Behavioural,"Interface (copy)","End");
[31]63  };
[29]64 
65  Interface::~Interface ()
66  {
[38]67    log_printf(FUNC,Behavioural,"~Interface","Begin");
68
69    if (_list_signal->empty()== false)
70      {
[40]71        list<Signal*>::iterator i = _list_signal->begin();
[38]72
73        while (i != _list_signal->end())
74          {
75            delete (*i);
76            ++i;
77          }
78      }
79
[31]80    delete _list_signal;
[40]81
[38]82    log_printf(FUNC,Behavioural,"~Interface","End");
[29]83  };
84 
85
86}; // end namespace behavioural         
87}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.