source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces.cpp @ 115

Last change on this file since 115 was 115, checked in by rosiere, 15 years ago

1) Write queue with mealy
2) Network : fix bug
3) leak memory

  • Property svn:keywords set to Id
File size: 1.4 KB
RevLine 
[29]1/*
2 * $Id: Interfaces.cpp 115 2009-04-20 21:29:17Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/include/Interfaces.h"
9
10namespace morpheo              {
11namespace behavioural          {
12
[113]13  Interfaces::Interfaces  (std::string name,
[57]14                           Tusage_t usage):
15    _name  (name),
16    _usage (usage)
[29]17  {
[38]18    log_printf(FUNC,Behavioural,"Interfaces","Begin");
[75]19    _list_interface = new std::list<Interface_fifo*>;
[38]20    log_printf(FUNC,Behavioural,"Interfaces","End");
[29]21  };
[31]22
[41]23  Interfaces::Interfaces  (const Interfaces & interfaces) :
[57]24    _name  (interfaces._name),
25    _usage (interfaces._usage)
[31]26  {
[38]27    log_printf(FUNC,Behavioural,"Interfaces (copy)","Begin");
[31]28    _list_interface = interfaces._list_interface;
[38]29    log_printf(FUNC,Behavioural,"Interfaces (copy)","End");
[31]30  };
[29]31 
32  Interfaces::~Interfaces ()
33  {
[38]34    log_printf(FUNC,Behavioural,"~Interfaces","Begin");
35
[41]36#ifdef VHDL_TESTBENCH
[58]37    if (_usage & USE_VHDL_TESTBENCH)
38      testbench_generate_file ();
[41]39#endif
40
[115]41//     for (std::list<Interface_fifo*>::iterator it = _list_interface->begin();
42//          it!=_list_interface->end();
43//          ++it)
44//       delete (*it);
[38]45
[115]46    while (not _list_interface->empty())
47      {
48        delete _list_interface->front();
49        _list_interface->pop_front();
50      }
51
[31]52    delete _list_interface;
[38]53    log_printf(FUNC,Behavioural,"~Interfaces","End");
[29]54  };
55 
56}; // end namespace behavioural         
57}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.