source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_deallocation.cpp @ 146

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

1) Add new algo in ifetch queue
2) Add Cancel bit
3) new config

  • Property svn:keywords set to Id
File size: 10.3 KB
Line 
1/*
2 * $Id: Reexecute_unit_deallocation.cpp 136 2009-10-20 18:52:15Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/include/Reexecute_unit.h"
9#include "Behavioural/include/Allocation.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_ooo_engine {
15namespace ooo_engine {
16namespace reexecute_unit {
17
18
19#undef  FUNCTION
20#define FUNCTION "Reexecute_unit::deallocation"
21  void Reexecute_unit::deallocation (void)
22  {
23    log_begin(Reexecute_unit,FUNCTION);
24
25    if (usage_is_set(_usage,USE_SYSTEMC))
26      {
27        delete    in_CLOCK ;
28        delete    in_NRESET;
29
30        DELETE2_SIGNAL( in_EXECUTE_LOOP_VAL                     ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],1);
31        DELETE2_SIGNAL(out_EXECUTE_LOOP_ACK                     ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],1);
32        DELETE2_SIGNAL( in_EXECUTE_LOOP_CONTEXT_ID              ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],_param->_size_context_id  );
33        DELETE2_SIGNAL( in_EXECUTE_LOOP_FRONT_END_ID            ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],_param->_size_front_end_id);
34        DELETE2_SIGNAL( in_EXECUTE_LOOP_PACKET_ID               ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],_param->_size_rob_ptr     );
35//      DELETE2_SIGNAL( in_EXECUTE_LOOP_OPERATION               ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],_param->_size_operation   );
36//      DELETE2_SIGNAL( in_EXECUTE_LOOP_TYPE                    ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],_param->_size_type        );
37        DELETE2_SIGNAL( in_EXECUTE_LOOP_CANCEL                  ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],1                         );
38        DELETE2_SIGNAL( in_EXECUTE_LOOP_FLAGS                   ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],_param->_size_special_data);
39        DELETE2_SIGNAL( in_EXECUTE_LOOP_EXCEPTION               ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],_param->_size_exception   );
40        DELETE2_SIGNAL( in_EXECUTE_LOOP_NO_SEQUENCE             ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],1                         );
41        DELETE2_SIGNAL( in_EXECUTE_LOOP_ADDRESS                 ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],_param->_size_general_data);
42        DELETE2_SIGNAL( in_EXECUTE_LOOP_DATA                    ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],_param->_size_general_data);
43       
44        DELETE1_SIGNAL(out_COMMIT_VAL                           ,_param->_nb_inst_commit,1);
45        DELETE1_SIGNAL( in_COMMIT_ACK                           ,_param->_nb_inst_commit,1);
46        DELETE1_SIGNAL(out_COMMIT_WEN                           ,_param->_nb_inst_commit,1);
47//      DELETE1_SIGNAL(out_COMMIT_CONTEXT_ID                    ,_param->_nb_inst_commit,_param->_size_context_id  );
48//      DELETE1_SIGNAL(out_COMMIT_FRONT_END_ID                  ,_param->_nb_inst_commit,_param->_size_front_end_id);
49        DELETE1_SIGNAL(out_COMMIT_PACKET_ID                     ,_param->_nb_inst_commit,_param->_size_rob_ptr     );
50//      DELETE1_SIGNAL(out_COMMIT_OPERATION                     ,_param->_nb_inst_commit,_param->_size_operation   );
51//      DELETE1_SIGNAL(out_COMMIT_TYPE                          ,_param->_nb_inst_commit,_param->_size_type        );
52        DELETE1_SIGNAL(out_COMMIT_CANCEL                        ,_param->_nb_inst_commit,1                         );
53        DELETE1_SIGNAL(out_COMMIT_FLAGS                         ,_param->_nb_inst_commit,_param->_size_special_data);
54        DELETE1_SIGNAL(out_COMMIT_EXCEPTION                     ,_param->_nb_inst_commit,_param->_size_exception   );
55        DELETE1_SIGNAL(out_COMMIT_NO_SEQUENCE                   ,_param->_nb_inst_commit,1                         );
56        DELETE1_SIGNAL(out_COMMIT_ADDRESS                       ,_param->_nb_inst_commit,_param->_size_general_data);
57        DELETE1_SIGNAL( in_COMMIT_NUM_REG_RD                    ,_param->_nb_inst_commit,_param->_size_general_register   );
58       
59        DELETE1_SIGNAL(out_SPR_VAL                              , _param->_nb_inst_reexecute,1);
60        DELETE1_SIGNAL( in_SPR_ACK                              , _param->_nb_inst_reexecute,1);
61        DELETE1_SIGNAL(out_SPR_WEN                              , _param->_nb_inst_reexecute,1);
62        DELETE1_SIGNAL(out_SPR_CONTEXT_ID                       , _param->_nb_inst_reexecute,_param->_size_context_id  );
63        DELETE1_SIGNAL(out_SPR_FRONT_END_ID                     , _param->_nb_inst_reexecute,_param->_size_front_end_id);
64        DELETE1_SIGNAL(out_SPR_NUM_GROUP                        , _param->_nb_inst_reexecute,_param->_size_special_address_group   );
65        DELETE1_SIGNAL(out_SPR_NUM_REG                          , _param->_nb_inst_reexecute,_param->_size_special_address_register);
66        DELETE1_SIGNAL(out_SPR_WDATA                            , _param->_nb_inst_reexecute,_param->_size_spr);
67        DELETE1_SIGNAL( in_SPR_RDATA                            , _param->_nb_inst_reexecute,_param->_size_spr);
68        DELETE1_SIGNAL( in_SPR_INVALID                          , _param->_nb_inst_reexecute,1);
69       
70        DELETE1_SIGNAL( in_REEXECUTE_ROB_VAL                    , _param->_nb_inst_reexecute,1);
71        DELETE1_SIGNAL(out_REEXECUTE_ROB_ACK                    , _param->_nb_inst_reexecute,1);
72        DELETE1_SIGNAL( in_REEXECUTE_ROB_CONTEXT_ID             , _param->_nb_inst_reexecute,_param->_size_context_id);
73        DELETE1_SIGNAL( in_REEXECUTE_ROB_FRONT_END_ID           , _param->_nb_inst_reexecute,_param->_size_front_end_id);
74        DELETE1_SIGNAL( in_REEXECUTE_ROB_PACKET_ID              , _param->_nb_inst_reexecute,_param->_size_rob_ptr  );
75        DELETE1_SIGNAL( in_REEXECUTE_ROB_OPERATION              , _param->_nb_inst_reexecute,_param->_size_operation);
76        DELETE1_SIGNAL( in_REEXECUTE_ROB_TYPE                   , _param->_nb_inst_reexecute,_param->_size_type);
77        DELETE1_SIGNAL( in_REEXECUTE_ROB_STORE_QUEUE_PTR_WRITE  , _param->_nb_inst_reexecute,_param->_size_store_queue_ptr);
78       
79        DELETE1_SIGNAL(out_REEXECUTE_VAL                        , _param->_nb_inst_reexecute,1);
80        DELETE1_SIGNAL( in_REEXECUTE_ACK                        , _param->_nb_inst_reexecute,1);
81        DELETE1_SIGNAL(out_REEXECUTE_CONTEXT_ID                 , _param->_nb_inst_reexecute,_param->_size_context_id         );
82        DELETE1_SIGNAL(out_REEXECUTE_FRONT_END_ID               , _param->_nb_inst_reexecute,_param->_size_front_end_id       );
83        DELETE1_SIGNAL(out_REEXECUTE_PACKET_ID                  , _param->_nb_inst_reexecute,_param->_size_rob_ptr            );
84        DELETE1_SIGNAL(out_REEXECUTE_OPERATION                  , _param->_nb_inst_reexecute,_param->_size_operation          );
85        DELETE1_SIGNAL(out_REEXECUTE_TYPE                       , _param->_nb_inst_reexecute,_param->_size_type               );
86        DELETE1_SIGNAL(out_REEXECUTE_STORE_QUEUE_PTR_WRITE      , _param->_nb_inst_reexecute,_param->_size_store_queue_ptr    );
87        DELETE1_SIGNAL(out_REEXECUTE_STORE_QUEUE_PTR_READ       , _param->_nb_inst_reexecute,_param->_size_store_queue_ptr    );
88        DELETE1_SIGNAL(out_REEXECUTE_STORE_QUEUE_EMPTY          , _param->_nb_inst_reexecute,1);
89        DELETE1_SIGNAL(out_REEXECUTE_LOAD_QUEUE_PTR_WRITE       , _param->_nb_inst_reexecute,_param->_size_load_queue_ptr     );
90        DELETE1_SIGNAL(out_REEXECUTE_HAS_IMMEDIAT               , _param->_nb_inst_reexecute,1                                );
91        DELETE1_SIGNAL(out_REEXECUTE_IMMEDIAT                   , _param->_nb_inst_reexecute,_param->_size_general_data       );
92        DELETE1_SIGNAL(out_REEXECUTE_READ_RA                    , _param->_nb_inst_reexecute,1                                );
93        DELETE1_SIGNAL(out_REEXECUTE_NUM_REG_RA                 , _param->_nb_inst_reexecute,_param->_size_general_register   );
94        DELETE1_SIGNAL(out_REEXECUTE_READ_RB                    , _param->_nb_inst_reexecute,1                                );
95        DELETE1_SIGNAL(out_REEXECUTE_NUM_REG_RB                 , _param->_nb_inst_reexecute,_param->_size_general_register   );
96        DELETE1_SIGNAL(out_REEXECUTE_READ_RC                    , _param->_nb_inst_reexecute,1                                );
97        DELETE1_SIGNAL(out_REEXECUTE_NUM_REG_RC                 , _param->_nb_inst_reexecute,_param->_size_special_register   );
98        DELETE1_SIGNAL(out_REEXECUTE_WRITE_RD                   , _param->_nb_inst_reexecute,1                                );
99        DELETE1_SIGNAL(out_REEXECUTE_NUM_REG_RD                 , _param->_nb_inst_reexecute,_param->_size_general_register   );
100        DELETE1_SIGNAL(out_REEXECUTE_WRITE_RE                   , _param->_nb_inst_reexecute,1                                );
101        DELETE1_SIGNAL(out_REEXECUTE_NUM_REG_RE                 , _param->_nb_inst_reexecute,_param->_size_special_register   );
102
103        // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
104        for (uint32_t i=0; i<_param->_nb_bank; i++)
105          while (not _reexecute_queue [i].empty())
106            {
107              delete _reexecute_queue [i].front();
108              _reexecute_queue [i].pop_front();
109            }
110        DELETE1(_reexecute_queue                ,_param->_nb_bank);
111       
112        // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
113        DELETE1(internal_QUEUE_PUSH             ,_param->_nb_bank);
114        DELETE1(internal_QUEUE_NUM_EXECUTE_LOOP ,_param->_nb_bank);
115        DELETE1(internal_QUEUE_NUM_INST_EXECUTE ,_param->_nb_bank);
116        DELETE1(internal_QUEUE_NUM_INST_COMMIT  ,_param->_nb_bank);
117        DELETE1(internal_QUEUE_INFO             ,_param->_nb_bank);
118        DELETE1(internal_SPR_VAL                ,_param->_nb_inst_reexecute);
119        DELETE1(internal_REEXECUTE_ROB_ACK      ,_param->_nb_inst_reexecute);
120        DELETE1(internal_REEXECUTE_VAL          ,_param->_nb_inst_reexecute);
121#ifdef STATISTICS
122        DELETE1(internal_COMMIT_VAL             ,_param->_nb_inst_commit);
123#endif
124      }
125       
126    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
127   
128    delete _priority_execute_loop;
129    delete _priority_queue_in    ;
130
131    delete _component;
132   
133    log_end(Reexecute_unit,FUNCTION);
134  };
135
136}; // end namespace reexecute_unit
137}; // end namespace ooo_engine
138}; // end namespace multi_ooo_engine
139}; // end namespace core
140
141}; // end namespace behavioural
142}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.