source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_deallocation.cpp @ 2

Last change on this file since 2 was 2, checked in by kane, 17 years ago

Import Morpheo

File size: 3.0 KB
Line 
1#ifdef SYSTEMC
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace stage_1_ifetch {
14namespace predictor {
15namespace meta_predictor {
16namespace two_level_branch_predictor {
17namespace two_level_branch_predictor_glue {
18
19
20  void Two_Level_Branch_Predictor_Glue::deallocation (void)
21  {
22    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"deallocation","Begin");
23
24    delete in_CLOCK;
25
26    for (uint32_t i=0; i<_param._nb_prediction; i++)
27      {
28        if (_param._have_bht)
29          {
30        delete  in_PREDICT_BHT_ACK             [i];
31        delete out_PREDICT_BHT_ADDRESS         [i];
32          }
33        if (_param._have_pht)
34          {
35        delete  in_PREDICT_PHT_ACK             [i];
36        delete out_PREDICT_PHT_ADDRESS         [i];
37          }
38        if (_param._have_bht and _param._have_pht)
39        delete  in_PREDICT_BHT_HISTORY         [i];
40        delete out_PREDICT_ACK                 [i];
41        delete  in_PREDICT_ADDRESS             [i];
42      }
43    if (_param._have_bht)
44      {
45    delete  in_PREDICT_BHT_ACK    ;
46    delete out_PREDICT_BHT_ADDRESS;
47      }
48    if (_param._have_pht)
49      {
50    delete  in_PREDICT_PHT_ACK    ;
51    delete out_PREDICT_PHT_ADDRESS;
52      }
53    if (_param._have_bht and _param._have_pht)
54    delete  in_PREDICT_BHT_HISTORY;
55   
56    delete out_PREDICT_ACK        ;
57    delete  in_PREDICT_ADDRESS    ;
58
59    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
60      {
61        if (_param._have_bht)
62          {
63        delete  in_BRANCH_COMPLETE_BHT_ACK             [i];
64        delete out_BRANCH_COMPLETE_BHT_ADDRESS         [i];
65          }
66        if (_param._have_pht)
67          {
68        delete  in_BRANCH_COMPLETE_PHT_ACK             [i];
69        delete out_BRANCH_COMPLETE_PHT_ADDRESS         [i];
70          }
71        if (_param._have_bht and _param._have_pht)
72        delete  in_BRANCH_COMPLETE_BHT_HISTORY         [i];
73        delete out_BRANCH_COMPLETE_ACK                 [i];
74        delete  in_BRANCH_COMPLETE_ADDRESS             [i];
75      }
76    if (_param._have_bht)
77      {
78    delete  in_BRANCH_COMPLETE_BHT_ACK    ;
79    delete out_BRANCH_COMPLETE_BHT_ADDRESS;
80      }
81    if (_param._have_pht)
82      {
83    delete  in_BRANCH_COMPLETE_PHT_ACK    ;
84    delete out_BRANCH_COMPLETE_PHT_ADDRESS;
85      }
86    if (_param._have_bht and _param._have_pht)
87    delete  in_BRANCH_COMPLETE_BHT_HISTORY;
88    delete out_BRANCH_COMPLETE_ACK        ;
89    delete  in_BRANCH_COMPLETE_ADDRESS    ;
90
91    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
92
93    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"deallocation","End");
94  };
95
96}; // end namespace two_level_branch_predictor_glue
97}; // end namespace two_level_branch_predictor
98}; // end namespace meta_predictor
99}; // end namespace predictor
100}; // end namespace stage_1_ifetch
101
102}; // end namespace behavioural
103}; // end namespace morpheo             
104#endif
Note: See TracBrowser for help on using the repository browser.