source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile_deallocation.cpp @ 128

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

1) Correct bug in link two signal
2) Fix error detected with valgrind
3) modif distexe script

  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: RegisterFile_deallocation.cpp 128 2009-06-26 08:43:23Z rosiere $
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Generic/RegisterFile/include/RegisterFile.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace generic {
14namespace registerfile {
15
16
17  void RegisterFile::deallocation (void)
18  {
19    log_printf(FUNC,RegisterFile,"deallocation","Begin");
20
21    delete in_CLOCK;
22    delete in_NRESET;
23    // ----- Interface Read
24    for (uint32_t i=0; i<_param->_nb_port_read; i++)
25      {
26    delete     in_READ_VAL    [i];
27    delete    out_READ_ACK    [i];
28    if (_param->_have_port_address == true)
29    delete     in_READ_ADDRESS[i];
30    delete    out_READ_DATA   [i];
31      }
32
33    delete []  in_READ_VAL    ;
34    delete [] out_READ_ACK    ;
35    if (_param->_have_port_address == true)
36    delete []  in_READ_ADDRESS;
37    delete [] out_READ_DATA   ;
38
39    // ----- Interface Write
40    for (uint32_t i=0; i<_param->_nb_port_write; i++)
41      {
42    delete     in_WRITE_VAL    [i];
43    delete    out_WRITE_ACK    [i];
44    if (_param->_have_port_address == true)
45    delete     in_WRITE_ADDRESS[i];
46    delete     in_WRITE_DATA   [i];
47      }
48
49    delete []  in_WRITE_VAL    ;
50    delete [] out_WRITE_ACK    ;
51    if (_param->_have_port_address == true)
52    delete []  in_WRITE_ADDRESS;
53    delete []  in_WRITE_DATA   ;
54
55    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
56
57//   delete _component;
58
59    if (_param->_instance == instance_RegisterFile_Monolithic)
60      delete component_RegisterFile_Monolithic  ;
61    else
62      delete component_RegisterFile_Multi_Banked;
63
64    log_printf(FUNC,RegisterFile,"deallocation","End");
65  };
66
67}; // end namespace registerfile
68}; // end namespace generic
69
70}; // end namespace behavioural
71}; // end namespace morpheo             
72#endif
Note: See TracBrowser for help on using the repository browser.