source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_deallocation.cpp @ 112

Last change on this file since 112 was 112, checked in by rosiere, 15 years ago

1) Stat_list : fix retire old and new register bug
2) Stat_list : remove read_counter and valid flag, because validation of destination is in retire step (not in commit step)
3) Model : add class Model (cf Morpheo.sim)
4) Allocation : alloc_interface_begin and alloc_interface_end to delete temporary array.
5) Script : add distexe.sh
6) Add Comparator, Multiplier, Divider. But this component are not implemented
7) Software : add Dhrystone

  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
1/*
2 * $Id: Two_Level_Branch_Predictor_deallocation.cpp 112 2009-03-18 22:36:26Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h"
9#include "Behavioural/include/Allocation.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_front_end {
15namespace front_end {
16namespace prediction_unit {
17namespace direction {
18namespace meta_predictor {
19namespace two_level_branch_predictor {
20
21
22#undef  FUNCTION
23#define FUNCTION "Two_Level_Branch_Predictor::deallocation"
24  void Two_Level_Branch_Predictor::deallocation (void)
25  {
26    log_begin(Two_Level_Branch_Predictor,FUNCTION);
27
28    if (usage_is_set(_usage,USE_SYSTEMC))
29      {
30        delete    in_CLOCK ;
31        delete    in_NRESET;
32
33        DELETE1_SIGNAL( in_PREDICT_VAL          ,_param->_nb_inst_predict,1                    );
34        DELETE1_SIGNAL(out_PREDICT_ACK          ,_param->_nb_inst_predict,1                    );
35        DELETE1_SIGNAL( in_PREDICT_ADDRESS      ,_param->_nb_inst_predict,_param->_size_address);
36        DELETE1_SIGNAL(out_PREDICT_DIRECTION    ,_param->_nb_inst_predict,1                    );
37        DELETE1_SIGNAL(out_PREDICT_HISTORY      ,_param->_nb_inst_predict,_param->_size_history);
38        if (_param->_update_on_prediction)                               
39          {                                                             
40        DELETE1_SIGNAL( in_PREDICT_DIRECTION_VAL,_param->_nb_inst_predict,1                    );
41        DELETE1_SIGNAL( in_PREDICT_DIRECTION    ,_param->_nb_inst_predict,1                    );
42          }
43       
44        DELETE1_SIGNAL( in_UPDATE_VAL           ,_param->_nb_inst_update,1                    );
45        DELETE1_SIGNAL(out_UPDATE_ACK           ,_param->_nb_inst_update,1                    );
46        DELETE1_SIGNAL( in_UPDATE_ADDRESS       ,_param->_nb_inst_update,_param->_size_address);
47        DELETE1_SIGNAL( in_UPDATE_HISTORY       ,_param->_nb_inst_update,_param->_size_history);
48        DELETE1_SIGNAL( in_UPDATE_HISTORY_VAL   ,_param->_nb_inst_update,1                    );
49        DELETE1_SIGNAL( in_UPDATE_DIRECTION     ,_param->_nb_inst_update,1                    );
50        if (_param->_update_on_prediction)                             
51        DELETE1_SIGNAL( in_UPDATE_MISS          ,_param->_nb_inst_update,1                    );
52       
53        if (_param->_have_bht)
54        DELETE1(reg_BHT                         ,_param->_bht_nb_shifter);
55        if (_param->_have_pht)
56        DELETE2(reg_PHT                         ,_param->_pht_nb_bank,_param->_pht_size_bank);
57       
58        DELETE1(internal_PREDICT_ACK            ,_param->_nb_inst_predict);
59        if (_param->_update_on_prediction)     
60          {                                     
61        if (_param->_have_bht)
62        DELETE1(internal_PREDICT_BHT_NUM_REG    ,_param->_nb_inst_predict);
63        if (_param->_have_pht)
64          {
65        DELETE1(internal_PREDICT_PHT_NUM_BANK   ,_param->_nb_inst_predict);
66        DELETE1(internal_PREDICT_PHT_NUM_REG    ,_param->_nb_inst_predict);
67          }
68          }                                     
69        DELETE1(internal_UPDATE_ACK             ,_param->_nb_inst_update );
70      }
71    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
72
73    delete _component;
74
75    log_end(Two_Level_Branch_Predictor,FUNCTION);
76  };
77
78}; // end namespace two_level_branch_predictor
79}; // end namespace meta_predictor
80}; // end namespace direction
81}; // end namespace prediction_unit
82}; // end namespace front_end
83}; // end namespace multi_front_end
84}; // end namespace core
85
86}; // end namespace behavioural
87}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.