#ifdef SYSTEMC
/*
 * $Id: RegisterFile_deallocation.cpp 81 2008-04-15 18:40:01Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Generic/RegisterFile/include/RegisterFile.h"

namespace morpheo                    {
namespace behavioural {
namespace generic {
namespace registerfile {


  void RegisterFile::deallocation (void)
  {
    log_printf(FUNC,RegisterFile,"deallocation","Begin");

    delete in_CLOCK;
    delete in_NRESET;
    // ----- Interface Read
    delete []  in_READ_VAL    ;
    delete [] out_READ_ACK    ;
    if (_param->_have_port_address == true)
    delete []  in_READ_ADDRESS;
    delete [] out_READ_DATA   ;

    // ----- Interface Write
    delete []  in_WRITE_VAL    ;
    delete [] out_WRITE_ACK    ;
    if (_param->_have_port_address == true)
    delete []  in_WRITE_ADDRESS;
    delete []  in_WRITE_DATA   ;

    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    

//   delete _component;

    if (_param->_instance == instance_RegisterFile_Monolithic)
      delete component_RegisterFile_Monolithic  ;
    else
      delete component_RegisterFile_Multi_Banked;

    log_printf(FUNC,RegisterFile,"deallocation","End");
  };

}; // end namespace registerfile
}; // end namespace generic

}; // end namespace behavioural
}; // end namespace morpheo              
#endif
