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
RevLine 
[53]1#ifdef SYSTEMC
2/*
3 * $Id: RegisterFile_deallocation.cpp 131 2009-07-08 18:40:08Z rosiere $
4 *
[131]5 * [ Description ]
[53]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
[131]21#ifdef SYSTEMCASS_SPECIFIC
[53]22    delete in_CLOCK;
23    delete in_NRESET;
24    // ----- Interface Read
[128]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
[53]34    delete []  in_READ_VAL    ;
35    delete [] out_READ_ACK    ;
[62]36    if (_param->_have_port_address == true)
[53]37    delete []  in_READ_ADDRESS;
38    delete [] out_READ_DATA   ;
39
40    // ----- Interface Write
[128]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
[53]50    delete []  in_WRITE_VAL    ;
51    delete [] out_WRITE_ACK    ;
[62]52    if (_param->_have_port_address == true)
[53]53    delete []  in_WRITE_ADDRESS;
54    delete []  in_WRITE_DATA   ;
[131]55#endif
[53]56
[131]57    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
[53]58
59//   delete _component;
60
[62]61    if (_param->_instance == instance_RegisterFile_Monolithic)
[53]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.