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

Last change on this file since 57 was 57, checked in by rosiere, 17 years ago
  • VHDL - RegisterFile_Multi_Banked (only partial_crossbar)
  • SystemC - modif Component, interface and co -> ajout du type Tusage_T pour instancier un coposant mais ne demander que le VHDL ou le systemC.
  • Séminaire interne
File size: 2.0 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                         ,Tusage_t             usage
19                         ):
20    _name         (name        )
21#ifdef POSITION
22    ,_direction    (direction   )
23    ,_localisation (localisation)
24#endif
25    ,_usage        (usage)
26  {
27    log_printf(FUNC,Behavioural,"Interface","Begin");
28
29    _list_signal   = new (list<Signal*>);
30
31#ifdef POSITION
32    _comment       = "";
33    _is_map        = false;
34    _entity_map    = NULL;
35    _interface_map = NULL;
36#endif
37
38#ifdef VHDL_TESTBENCH
39    _nb_cycle      = 0;
40#endif
41
42    log_printf(FUNC,Behavioural,"Interface","End");
43  };
44
45  Interface::Interface  (const Interface & interface):
46    _name         (interface._name        )
47#ifdef POSITION
48    ,_direction    (interface._direction   )
49    ,_localisation (interface._localisation)
50#endif
51    ,_usage        (interface._usage)
52  {
53    log_printf(FUNC,Behavioural,"Interface (copy)","Begin");
54    _list_signal   = interface._list_signal;
55#ifdef POSITION
56    _comment       = interface._comment    ;
57    _is_map        = interface._is_map     ;
58    _entity_map    = interface._entity_map   ;
59    _interface_map = interface._interface_map;
60#endif
61#ifdef VHDL_TESTBENCH
62    _nb_cycle      = interface._nb_cycle;
63#endif
64
65    log_printf(FUNC,Behavioural,"Interface (copy)","End");
66  };
67 
68  Interface::~Interface ()
69  {
70    log_printf(FUNC,Behavioural,"~Interface","Begin");
71
72    if (_list_signal->empty()== false)
73      {
74        list<Signal*>::iterator i = _list_signal->begin();
75
76        while (i != _list_signal->end())
77          {
78            delete (*i);
79            ++i;
80          }
81      }
82
83    delete _list_signal;
84
85    log_printf(FUNC,Behavioural,"~Interface","End");
86  };
87 
88
89}; // end namespace behavioural         
90}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.