/*
 * $Id: RegisterFile_Multi_Banked_deallocation.cpp 88 2008-12-10 18:31:39Z rosiere $
 *
 * [ Description ]
 * 
 */

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

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


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

    if (usage_is_set(_usage,USE_SYSTEMC))
      {
        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   ;
        
        // ----- Register
        delete [] reg_DATA;
        
        // ----- Internal
        delete [] internal_WRITE_VAL;
        delete [] internal_WRITE_BANK;
        delete [] internal_WRITE_NUM_REG;
      }       

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

    delete _component;

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

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

}; // end namespace behavioural
}; // end namespace morpheo              
