source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_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.7 KB
Line 
1/*
2 * $Id: Branch_Target_Buffer_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/Branch_Target_Buffer/include/Branch_Target_Buffer.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 branch_target_buffer {
18
19
20#undef  FUNCTION
21#define FUNCTION "Branch_Target_Buffer::deallocation"
22  void Branch_Target_Buffer::deallocation (void)
23  {
24    log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"Begin");
25
26    if (usage_is_set(_usage,USE_SYSTEMC))
27      {
28        delete    in_CLOCK ;
29        delete    in_NRESET;
30
31        DELETE1_SIGNAL( in_PREDICT_VAL           ,_param->_nb_inst_predict,1);
32        DELETE1_SIGNAL(out_PREDICT_ACK           ,_param->_nb_inst_predict,1);
33        DELETE1_SIGNAL( in_PREDICT_CONTEXT_ID    ,_param->_nb_inst_predict,_param->_size_context_id);
34        DELETE1_SIGNAL( in_PREDICT_ADDRESS       ,_param->_nb_inst_predict,_param->_size_instruction_address);
35        DELETE1_SIGNAL(out_PREDICT_HIT           ,_param->_nb_inst_predict,1);
36        DELETE1_SIGNAL(out_PREDICT_ADDRESS_SRC   ,_param->_nb_inst_predict,_param->_size_instruction_address);
37        DELETE1_SIGNAL(out_PREDICT_ADDRESS_DEST  ,_param->_nb_inst_predict,_param->_size_instruction_address);
38        DELETE1_SIGNAL(out_PREDICT_CONDITION     ,_param->_nb_inst_predict,_param->_size_branch_condition);
39        DELETE1_SIGNAL(out_PREDICT_LAST_TAKE     ,_param->_nb_inst_predict,1);
40        DELETE1_SIGNAL(out_PREDICT_IS_ACCURATE   ,_param->_nb_inst_predict,1);
41
42        DELETE1_SIGNAL( in_DECOD_VAL             ,_param->_nb_inst_decod,1);
43        DELETE1_SIGNAL(out_DECOD_ACK             ,_param->_nb_inst_decod,1);
44        DELETE1_SIGNAL( in_DECOD_CONTEXT_ID      ,_param->_nb_inst_decod,_param->_size_context_id);
45        DELETE1_SIGNAL( in_DECOD_ADDRESS_SRC     ,_param->_nb_inst_decod,_param->_size_instruction_address);
46        DELETE1_SIGNAL( in_DECOD_ADDRESS_DEST    ,_param->_nb_inst_decod,_param->_size_instruction_address);
47        DELETE1_SIGNAL( in_DECOD_CONDITION       ,_param->_nb_inst_decod,_param->_size_branch_condition);
48        DELETE1_SIGNAL( in_DECOD_LAST_TAKE       ,_param->_nb_inst_decod,1);
49        DELETE1_SIGNAL( in_DECOD_MISS_PREDICTION ,_param->_nb_inst_decod,1);
50        DELETE1_SIGNAL( in_DECOD_IS_ACCURATE     ,_param->_nb_inst_decod,1);
51
52        DELETE1_SIGNAL( in_UPDATE_VAL            ,_param->_nb_inst_update,1);
53        DELETE1_SIGNAL(out_UPDATE_ACK            ,_param->_nb_inst_update,1);
54        DELETE1_SIGNAL( in_UPDATE_CONTEXT_ID     ,_param->_nb_inst_update,_param->_size_context_id);
55        DELETE1_SIGNAL( in_UPDATE_ADDRESS_SRC    ,_param->_nb_inst_update,_param->_size_instruction_address);
56        DELETE1_SIGNAL( in_UPDATE_ADDRESS_DEST   ,_param->_nb_inst_update,_param->_size_instruction_address);
57        DELETE1_SIGNAL( in_UPDATE_CONDITION      ,_param->_nb_inst_update,_param->_size_branch_condition);
58        DELETE1_SIGNAL( in_UPDATE_LAST_TAKE      ,_param->_nb_inst_update,1);
59        DELETE1_SIGNAL( in_UPDATE_MISS_PREDICTION,_param->_nb_inst_update,1);
60      }
61    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
62
63    if (_param->_have_component_victim)
64      {
65    delete [] _component_sort;
66    delete _component_victim;
67      }
68    delete _component_branch_target_buffer_glue;
69    delete _component_branch_target_buffer_register;
70
71    delete _component;
72
73    log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"End");
74  };
75
76}; // end namespace branch_target_buffer
77}; // end namespace prediction_unit
78}; // end namespace front_end
79}; // end namespace multi_front_end
80}; // end namespace core
81
82}; // end namespace behavioural
83}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.