source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_deallocation.cpp @ 145

Last change on this file since 145 was 145, checked in by rosiere, 14 years ago

1) add test with SPECINT2K
2) new config of Selftest
3) modif RAT to support multiple depth_save ... but not finish (need fix Update Prediction Table)
4) add Function_pointer but need fix

  • Property svn:keywords set to Id
File size: 8.6 KB
Line 
1/*
2 * $Id: Register_Address_Translation_unit_deallocation.cpp 145 2010-10-13 18:15:51Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Register_Address_Translation_unit.h"
9#include "Behavioural/include/Allocation.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_ooo_engine {
15namespace ooo_engine {
16namespace rename_unit {
17namespace register_translation_unit {
18namespace register_address_translation_unit {
19
20
21#undef  FUNCTION
22#define FUNCTION "Register_Address_Translation_unit::deallocation"
23  void Register_Address_Translation_unit::deallocation (void)
24  {
25    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
26
27    if (usage_is_set(_usage,USE_SYSTEMC))
28      {
29        delete     in_CLOCK ;
30        delete     in_NRESET;
31
32        DELETE1_SIGNAL     ( in_RENAME_VAL               ,_param->_nb_inst_insert,1);
33        DELETE1_SIGNAL     (out_RENAME_ACK               ,_param->_nb_inst_insert,1);
34        DELETE1_SIGNAL     ( in_RENAME_FRONT_END_ID      ,_param->_nb_inst_insert,_param->_size_front_end_id);
35        DELETE1_SIGNAL     ( in_RENAME_CONTEXT_ID        ,_param->_nb_inst_insert,_param->_size_context_id  );
36        DELETE1_SIGNAL_COND( in_RENAME_DEPTH             ,_param->_nb_inst_insert,_param->_size_depth,_param->_rat_scheme == RAT_DEPTH_SAVE);
37        DELETE1_SIGNAL     ( in_RENAME_SAVE_RAT          ,_param->_nb_inst_insert,1);
38        DELETE1_SIGNAL     ( in_RENAME_NUM_REG_RA_LOG    ,_param->_nb_inst_insert,_param->_size_general_register_logic);
39        DELETE1_SIGNAL     ( in_RENAME_NUM_REG_RB_LOG    ,_param->_nb_inst_insert,_param->_size_general_register_logic);
40        DELETE1_SIGNAL     ( in_RENAME_NUM_REG_RC_LOG    ,_param->_nb_inst_insert,_param->_size_special_register_logic);
41        DELETE1_SIGNAL     ( in_RENAME_NUM_REG_RD_LOG    ,_param->_nb_inst_insert,_param->_size_general_register_logic);
42        DELETE1_SIGNAL     ( in_RENAME_NUM_REG_RE_LOG    ,_param->_nb_inst_insert,_param->_size_special_register_logic);
43        DELETE1_SIGNAL     (out_RENAME_NUM_REG_RA_PHY    ,_param->_nb_inst_insert,_param->_size_general_register);
44        DELETE1_SIGNAL     (out_RENAME_NUM_REG_RB_PHY    ,_param->_nb_inst_insert,_param->_size_general_register);
45        DELETE1_SIGNAL     (out_RENAME_NUM_REG_RC_PHY    ,_param->_nb_inst_insert,_param->_size_special_register);
46        DELETE1_SIGNAL     (out_RENAME_NUM_REG_RD_PHY_OLD,_param->_nb_inst_insert,_param->_size_general_register);
47        DELETE1_SIGNAL     (out_RENAME_NUM_REG_RE_PHY_OLD,_param->_nb_inst_insert,_param->_size_special_register);
48                           
49        DELETE1_SIGNAL     ( in_INSERT_VAL           ,_param->_nb_inst_insert,1);
50        DELETE1_SIGNAL     (out_INSERT_ACK           ,_param->_nb_inst_insert,1);
51//      DELETE1_SIGNAL     ( in_INSERT_FRONT_END_ID  ,_param->_nb_inst_insert,_param->_size_front_end_id);
52//      DELETE1_SIGNAL     ( in_INSERT_CONTEXT_ID    ,_param->_nb_inst_insert,_param->_size_context_id  );
53        DELETE1_SIGNAL     ( in_INSERT_WRITE_RD      ,_param->_nb_inst_insert,1);
54        DELETE1_SIGNAL     ( in_INSERT_WRITE_RE      ,_param->_nb_inst_insert,1);
55        DELETE1_SIGNAL     ( in_INSERT_NUM_REG_RD_LOG,_param->_nb_inst_insert,_param->_size_general_register_logic);
56        DELETE1_SIGNAL     ( in_INSERT_NUM_REG_RE_LOG,_param->_nb_inst_insert,_param->_size_special_register_logic);
57        DELETE1_SIGNAL     ( in_INSERT_NUM_REG_RD_PHY,_param->_nb_inst_insert,_param->_size_general_register);
58        DELETE1_SIGNAL     ( in_INSERT_NUM_REG_RE_PHY,_param->_nb_inst_insert,_param->_size_special_register);
59                           
60        DELETE1_SIGNAL     ( in_RETIRE_VAL               ,_param->_nb_inst_retire,1);
61        DELETE1_SIGNAL     (out_RETIRE_ACK               ,_param->_nb_inst_retire,1);
62        DELETE1_SIGNAL     ( in_RETIRE_FRONT_END_ID      ,_param->_nb_inst_retire,_param->_size_front_end_id);
63        DELETE1_SIGNAL     ( in_RETIRE_CONTEXT_ID        ,_param->_nb_inst_retire,_param->_size_context_id  );
64        DELETE1_SIGNAL     ( in_RETIRE_WRITE_RD          ,_param->_nb_inst_retire,1);
65        DELETE1_SIGNAL     ( in_RETIRE_WRITE_RE          ,_param->_nb_inst_retire,1);
66        DELETE1_SIGNAL     ( in_RETIRE_NUM_REG_RD_LOG    ,_param->_nb_inst_retire,_param->_size_general_register_logic);
67        DELETE1_SIGNAL     ( in_RETIRE_NUM_REG_RE_LOG    ,_param->_nb_inst_retire,_param->_size_special_register_logic);
68        DELETE1_SIGNAL     ( in_RETIRE_NUM_REG_RD_PHY_NEW,_param->_nb_inst_retire,_param->_size_general_register);
69        DELETE1_SIGNAL     ( in_RETIRE_NUM_REG_RE_PHY_NEW,_param->_nb_inst_retire,_param->_size_special_register);
70        DELETE1_SIGNAL     ( in_RETIRE_RESTORE           ,_param->_nb_inst_retire,1);
71                           
72        DELETE2_SIGNAL     ( in_RETIRE_EVENT_VAL            ,_param->_nb_front_end, _param->_nb_context[it1],1);
73        DELETE2_SIGNAL     (out_RETIRE_EVENT_ACK            ,_param->_nb_front_end, _param->_nb_context[it1],1);
74        DELETE2_SIGNAL     ( in_RETIRE_EVENT_STATE          ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_event_state);
75        DELETE2_SIGNAL_COND( in_RETIRE_EVENT_TYPE           ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_event_type,_param->_rat_scheme == RAT_DEPTH_SAVE);
76        DELETE2_SIGNAL_COND( in_RETIRE_EVENT_DEPTH          ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_depth     ,_param->_rat_scheme == RAT_DEPTH_SAVE);
77
78        DELETE2_SIGNAL     ( in_DEPTH_MIN                   ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth);
79        DELETE2_SIGNAL     ( in_DEPTH_MAX                   ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth);
80        DELETE2_SIGNAL     ( in_DEPTH_FULL                  ,_param->_nb_front_end,_param->_nb_context[it1],1                  );
81
82        DELETE1(internal_RENAME_ACK                    ,_param->_nb_inst_insert);
83        DELETE1(internal_RETIRE_ACK                    ,_param->_nb_inst_retire);
84        DELETE2(internal_RETIRE_EVENT_ACK              ,_param->_nb_front_end,_param->_nb_context[it1]);
85
86        DELETE3(RAT_GPR_NOT_SPECULATIVE      ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
87        DELETE3(RAT_SPR_NOT_SPECULATIVE      ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
88       
89        switch(_param->_rat_scheme)
90          {
91          case RAT_NO_SAVE    :
92            {
93              break;
94            }
95          case RAT_ONE_SAVE   :
96            {
97              DELETE4(RAT_GPR_SPECULATIVE          ,_param->_nb_front_end,_param->_nb_context[it1],1,_param->_nb_general_register_logic);
98              DELETE4(RAT_SPR_SPECULATIVE          ,_param->_nb_front_end,_param->_nb_context[it1],1,_param->_nb_special_register_logic);
99
100              DELETE4(RAT_GPR_SPECULATIVE_VALID    ,_param->_nb_front_end,_param->_nb_context[it1],1,_param->_nb_general_register_logic);
101              DELETE4(RAT_SPR_SPECULATIVE_VALID    ,_param->_nb_front_end,_param->_nb_context[it1],1,_param->_nb_special_register_logic);
102             
103              break;
104            }
105          case RAT_DEPTH_SAVE :
106            {
107              DELETE4(RAT_GPR_SPECULATIVE          ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_general_register_logic);
108              DELETE4(RAT_SPR_SPECULATIVE          ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_special_register_logic);
109
110              DELETE4(RAT_GPR_SPECULATIVE_VALID    ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_general_register_logic);
111              DELETE4(RAT_SPR_SPECULATIVE_VALID    ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_special_register_logic);
112
113              DELETE3(reg_RAT_USE                  ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2]);
114              DELETE2(reg_SAVE_RAT                 ,_param->_nb_front_end,_param->_nb_context[it1]);
115
116              break;
117            }
118          }
119      }
120
121     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
122    delete    _component;
123
124    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
125  };
126
127}; // end namespace register_address_translation_unit
128}; // end namespace register_translation_unit
129}; // end namespace rename_unit
130}; // end namespace ooo_engine
131}; // end namespace multi_ooo_engine
132}; // end namespace core
133
134}; // end namespace behavioural
135}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.