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

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

1) add constant method
2) test with systemc 2.2.0

  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id: RegisterFile_deallocation.cpp 131 2009-07-08 18:40:08Z 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#ifdef SYSTEMCASS_SPECIFIC
22    delete in_CLOCK;
23    delete in_NRESET;
24    // ----- Interface Read
25    for (uint32_t i=0; i<_param->_nb_port_read; i++)
26      {
27    delete     in_READ_VAL    [i];
28    delete    out_READ_ACK    [i];
29    if (_param->_have_port_address == true)
30    delete     in_READ_ADDRESS[i];
31    delete    out_READ_DATA   [i];
32      }
33
34    delete []  in_READ_VAL    ;
35    delete [] out_READ_ACK    ;
36    if (_param->_have_port_address == true)
37    delete []  in_READ_ADDRESS;
38    delete [] out_READ_DATA   ;
39
40    // ----- Interface Write
41    for (uint32_t i=0; i<_param->_nb_port_write; i++)
42      {
43    delete     in_WRITE_VAL    [i];
44    delete    out_WRITE_ACK    [i];
45    if (_param->_have_port_address == true)
46    delete     in_WRITE_ADDRESS[i];
47    delete     in_WRITE_DATA   [i];
48      }
49
50    delete []  in_WRITE_VAL    ;
51    delete [] out_WRITE_ACK    ;
52    if (_param->_have_port_address == true)
53    delete []  in_WRITE_ADDRESS;
54    delete []  in_WRITE_DATA   ;
55#endif
56
57    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
58
59//   delete _component;
60
61    if (_param->_instance == instance_RegisterFile_Monolithic)
62      delete component_RegisterFile_Monolithic  ;
63    else
64      delete component_RegisterFile_Multi_Banked;
65
66    log_printf(FUNC,RegisterFile,"deallocation","End");
67  };
68
69}; // end namespace registerfile
70}; // end namespace generic
71
72}; // end namespace behavioural
73}; // end namespace morpheo             
74#endif
Note: See TracBrowser for help on using the repository browser.