source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/src/Special_Register_unit_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: 4.5 KB
Line 
1/*
2 * $Id: Special_Register_unit_deallocation.cpp 112 2009-03-18 22:36:26Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/include/Special_Register_unit.h"
9#include "Behavioural/include/Allocation.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_ooo_engine {
15namespace ooo_engine {
16namespace special_register_unit {
17
18
19#undef  FUNCTION
20#define FUNCTION "Special_Register_unit::deallocation"
21  void Special_Register_unit::deallocation (void)
22  {
23    log_begin(Special_Register_unit,FUNCTION);
24
25    if (usage_is_set(_usage,USE_SYSTEMC))
26      {
27        delete    in_CLOCK ;
28        delete    in_NRESET;
29
30        DELETE1_SIGNAL( in_SPR_ACCESS_VAL          ,_param->_nb_inst_reexecute,1);
31        DELETE1_SIGNAL(out_SPR_ACCESS_ACK          ,_param->_nb_inst_reexecute,1);
32        DELETE1_SIGNAL( in_SPR_ACCESS_WEN          ,_param->_nb_inst_reexecute,1);
33        DELETE1_SIGNAL( in_SPR_ACCESS_CONTEXT_ID   ,_param->_nb_inst_reexecute,_param->_size_context_id  );
34        DELETE1_SIGNAL( in_SPR_ACCESS_FRONT_END_ID ,_param->_nb_inst_reexecute,_param->_size_front_end_id);
35        DELETE1_SIGNAL( in_SPR_ACCESS_NUM_GROUP    ,_param->_nb_inst_reexecute,_param->_size_special_address_group   );
36        DELETE1_SIGNAL( in_SPR_ACCESS_NUM_REG      ,_param->_nb_inst_reexecute,_param->_size_special_address_register);
37        DELETE1_SIGNAL( in_SPR_ACCESS_WDATA        ,_param->_nb_inst_reexecute,_param->_size_spr);
38        DELETE1_SIGNAL(out_SPR_ACCESS_RDATA        ,_param->_nb_inst_reexecute,_param->_size_spr);
39        DELETE1_SIGNAL(out_SPR_ACCESS_INVALID      ,_param->_nb_inst_reexecute,1);
40       
41        DELETE2_SIGNAL(out_SPR_READ_SR             ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_spr);
42       
43        DELETE2_SIGNAL( in_SPR_COMMIT_VAL          ,_param->_nb_front_end, _param->_nb_context[it1],1);
44        DELETE2_SIGNAL(out_SPR_COMMIT_ACK          ,_param->_nb_front_end, _param->_nb_context[it1],1);
45        DELETE2_SIGNAL( in_SPR_COMMIT_SR_F_VAL     ,_param->_nb_front_end, _param->_nb_context[it1],1);
46        DELETE2_SIGNAL( in_SPR_COMMIT_SR_F         ,_param->_nb_front_end, _param->_nb_context[it1],1);
47        DELETE2_SIGNAL( in_SPR_COMMIT_SR_CY_VAL    ,_param->_nb_front_end, _param->_nb_context[it1],1);
48        DELETE2_SIGNAL( in_SPR_COMMIT_SR_CY        ,_param->_nb_front_end, _param->_nb_context[it1],1);
49        DELETE2_SIGNAL( in_SPR_COMMIT_SR_OV_VAL    ,_param->_nb_front_end, _param->_nb_context[it1],1);
50        DELETE2_SIGNAL( in_SPR_COMMIT_SR_OV        ,_param->_nb_front_end, _param->_nb_context[it1],1);
51
52        DELETE2_SIGNAL( in_SPR_EVENT_VAL           ,_param->_nb_front_end, _param->_nb_context[it1],1);
53        DELETE2_SIGNAL(out_SPR_EVENT_ACK           ,_param->_nb_front_end, _param->_nb_context[it1],1);
54        DELETE2_SIGNAL( in_SPR_EVENT_EPCR          ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_spr);
55        DELETE2_SIGNAL( in_SPR_EVENT_EEAR_WEN      ,_param->_nb_front_end, _param->_nb_context[it1],1);
56        DELETE2_SIGNAL( in_SPR_EVENT_EEAR          ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_spr);
57        DELETE2_SIGNAL( in_SPR_EVENT_SR_DSX        ,_param->_nb_front_end, _param->_nb_context[it1],1);
58        DELETE2_SIGNAL( in_SPR_EVENT_SR_TO_ESR     ,_param->_nb_front_end, _param->_nb_context[it1],1);
59
60        // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
61        DELETE1(internal_SPR_ACCESS_ACK ,_param->_nb_inst_reexecute);
62        DELETE2(internal_SPR_COMMIT_ACK ,_param->_nb_front_end,_param->_nb_context [it1]);
63        DELETE2(internal_SPR_EVENT_ACK  ,_param->_nb_front_end,_param->_nb_context [it1]);
64      }
65
66    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
67
68    for (uint32_t i=0; i<_param->_nb_front_end; i++)
69      {
70        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
71          {
72            for (uint32_t k=0; k<NB_GROUP; k++)
73              {
74                if (_spr [i][j][k] != NULL)
75                  {
76                    for (uint32_t l=0; l<NB_REG_GROUP[k]; l++)
77                      if (_spr [i][j][k][l] != NULL)
78                        delete _spr [i][j][k][l];
79                    delete [] _spr [i][j][k];
80                  }
81              }
82            delete [] _spr [i][j];
83          }     
84        delete [] _spr [i];
85      }
86    delete [] _spr;
87
88    for (uint32_t i=0; i<_param->_nb_front_end; i++)
89      {
90        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
91          delete _spr_access_mode [i][j];
92        delete [] _spr_access_mode [i];
93      }
94    delete [] _spr_access_mode;
95
96    delete    _component;
97
98    log_end(Special_Register_unit,FUNCTION);
99  };
100
101}; // end namespace special_register_unit
102}; // end namespace ooo_engine
103}; // end namespace multi_ooo_engine
104}; // end namespace core
105
106}; // end namespace behavioural
107}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.