source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim_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.8 KB
Line 
1/*
2 * $Id: Victim_deallocation.cpp 128 2009-06-26 08:43:23Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Generic/Victim/include/Victim.h"
9#include "Behavioural/include/Allocation.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace generic {
14namespace victim {
15
16
17#undef  FUNCTION
18#define FUNCTION "Victim::deallocation"
19  void Victim::deallocation (void)
20  {
21    log_printf(FUNC,Victim,FUNCTION,"Begin");
22
23    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
24    switch (_param->_victim_scheme)
25      {
26//    case VICTIM_RANDOM      : delete _component_victim_random     ; break;
27//    case VICTIM_ROUND_ROBIN : delete _component_victim_round_robin; break;
28//    case VICTIM_NLU         : delete _component_victim_nlu        ; break;
29      case VICTIM_PSEUDO_LRU  : delete _component_victim_pseudo_lru ; break;
30//    case VICTIM_LRU         : delete _component_victim_lru        ; break;
31//    case VICTIM_FIFO        : delete _component_victim_fifo       ; break;
32      default : break;
33      }
34   
35    if (usage_is_set(_usage,USE_SYSTEMC))
36      {
37        delete    in_CLOCK ;
38        delete    in_NRESET;
39
40        for (uint32_t i=0; i<_param->_nb_access; ++i)
41          {
42        delete     in_ACCESS_VAL    [i];
43        delete    out_ACCESS_ACK    [i];
44        if (_param->_have_port_address)
45        delete     in_ACCESS_ADDRESS[i];
46        delete     in_ACCESS_HIT    [i];
47        delete     in_ACCESS_ENTITY [i];
48        delete    out_ACCESS_VICTIM [i];
49          }
50
51        delete []  in_ACCESS_VAL    ;
52        delete [] out_ACCESS_ACK    ;
53        if (_param->_have_port_address)
54        delete []  in_ACCESS_ADDRESS;
55        delete []  in_ACCESS_HIT    ;
56        delete []  in_ACCESS_ENTITY ;
57        delete [] out_ACCESS_VICTIM ;
58      }
59
60    log_printf(FUNC,Victim,FUNCTION,"End");
61  };
62
63}; // end namespace victim
64}; // end namespace generic
65
66}; // end namespace behavioural
67}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.