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 @ 139

Last change on this file since 139 was 139, checked in by rosiere, 14 years ago
  • Add test for all configuration
  • RAT : add rat scheme (depth_save)
  • Property svn:keywords set to Id
File size: 7.9 KB
Line 
1/*
2 * $Id: Register_Address_Translation_unit_deallocation.cpp 139 2010-07-30 14:47:27Z 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        DELETE1(internal_RENAME_ACK                    ,_param->_nb_inst_insert);
79        DELETE1(internal_RENAME_SAVE                   ,_param->_nb_inst_insert);
80        DELETE1(internal_INSERT_ACK                    ,_param->_nb_inst_insert);
81        DELETE1(internal_RETIRE_ACK                    ,_param->_nb_inst_retire);
82        DELETE2(internal_RETIRE_EVENT_ACK              ,_param->_nb_front_end,_param->_nb_context[it1]);
83
84        DELETE3(rat_gpr_speculative          ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
85        DELETE3(rat_spr_speculative          ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
86
87        switch(_param->_rat_scheme)
88          {
89          case RAT_NO_SAVE    :
90            {
91              break;
92            }
93          case RAT_ONE_SAVE   :
94            {
95              DELETE3(rat_gpr_not_speculative      ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
96              DELETE3(rat_gpr_speculative_valid    ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
97             
98              DELETE3(rat_spr_not_speculative      ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
99              DELETE3(rat_spr_speculative_valid    ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
100             
101              break;
102            }
103          case RAT_DEPTH_SAVE :
104            {
105              DELETE4(rat_gpr_save                 ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_general_register_logic);
106              DELETE4(rat_spr_save                 ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_branch_speculated[it1][it2],_param->_nb_special_register_logic);
107              DELETE2(rat_depth                    ,_param->_nb_front_end,_param->_nb_context[it1]);
108
109              break;
110            }
111          }
112      }
113
114     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
115    delete    _component;
116
117    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
118  };
119
120}; // end namespace register_address_translation_unit
121}; // end namespace register_translation_unit
122}; // end namespace rename_unit
123}; // end namespace ooo_engine
124}; // end namespace multi_ooo_engine
125}; // end namespace core
126
127}; // end namespace behavioural
128}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.