source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_deallocation.cpp @ 131

Last change on this file since 131 was 128, checked in by rosiere, 15 years ago

1) Correct bug in link two signal
2) Fix error detected with valgrind
3) modif distexe script

  • Property svn:keywords set to Id
File size: 4.6 KB
Line 
1/*
2 * $Id: Register_unit_deallocation.cpp 128 2009-06-26 08:43:23Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Register_unit.h"
9#include "Behavioural/include/Allocation.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_execute_loop {
15namespace execute_loop {
16namespace register_unit {
17
18
19#undef  FUNCTION
20#define FUNCTION "Register_unit::deallocation"
21  void Register_unit::deallocation (void)
22  {
23    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
24
25    if (usage_is_set(_usage,USE_SYSTEMC))
26      {
27        delete     in_CLOCK ;
28        delete     in_NRESET;
29
30        DELETE1_SIGNAL( in_GPR_READ_VAL           ,_param->_nb_gpr_read,1);
31        DELETE1_SIGNAL(out_GPR_READ_ACK           ,_param->_nb_gpr_read,1);
32        DELETE1_SIGNAL( in_GPR_READ_OOO_ENGINE_ID ,_param->_nb_gpr_read,_param->_size_ooo_engine_id);
33        DELETE1_SIGNAL( in_GPR_READ_NUM_REG       ,_param->_nb_gpr_read,_param->_size_gpr_address);
34        DELETE1_SIGNAL(out_GPR_READ_DATA          ,_param->_nb_gpr_read,_param->_size_general_data);
35        DELETE1_SIGNAL(out_GPR_READ_DATA_VAL      ,_param->_nb_gpr_read,1);
36       
37        DELETE1_SIGNAL( in_GPR_WRITE_VAL          ,_param->_nb_gpr_write,1);
38        DELETE1_SIGNAL(out_GPR_WRITE_ACK          ,_param->_nb_gpr_write,1);
39        DELETE1_SIGNAL( in_GPR_WRITE_OOO_ENGINE_ID,_param->_nb_gpr_write,_param->_size_ooo_engine_id);
40        DELETE1_SIGNAL( in_GPR_WRITE_NUM_REG      ,_param->_nb_gpr_write,_param->_size_gpr_address);
41        DELETE1_SIGNAL( in_GPR_WRITE_DATA         ,_param->_nb_gpr_write,_param->_size_general_data);
42
43        DELETE1_SIGNAL( in_SPR_READ_VAL           ,_param->_nb_spr_read,1);
44        DELETE1_SIGNAL(out_SPR_READ_ACK           ,_param->_nb_spr_read,1);
45        DELETE1_SIGNAL( in_SPR_READ_OOO_ENGINE_ID ,_param->_nb_spr_read,_param->_size_ooo_engine_id);
46        DELETE1_SIGNAL( in_SPR_READ_NUM_REG       ,_param->_nb_spr_read,_param->_size_spr_address);
47        DELETE1_SIGNAL(out_SPR_READ_DATA          ,_param->_nb_spr_read,_param->_size_special_data);
48        DELETE1_SIGNAL(out_SPR_READ_DATA_VAL      ,_param->_nb_spr_read,1);
49       
50        DELETE1_SIGNAL( in_SPR_WRITE_VAL          ,_param->_nb_spr_write,1);
51        DELETE1_SIGNAL(out_SPR_WRITE_ACK          ,_param->_nb_spr_write,1);
52        DELETE1_SIGNAL( in_SPR_WRITE_OOO_ENGINE_ID,_param->_nb_spr_write,_param->_size_ooo_engine_id);
53        DELETE1_SIGNAL( in_SPR_WRITE_NUM_REG      ,_param->_nb_spr_write,_param->_size_spr_address);
54        DELETE1_SIGNAL( in_SPR_WRITE_DATA         ,_param->_nb_spr_write,_param->_size_special_data);
55               
56        DELETE2_SIGNAL( in_INSERT_ROB_VAL         ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
57        DELETE2_SIGNAL(out_INSERT_ROB_ACK         ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
58        DELETE2_SIGNAL( in_INSERT_ROB_RD_USE      ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
59        DELETE2_SIGNAL( in_INSERT_ROB_RD_NUM_REG  ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],_param->_size_gpr_address);
60        DELETE2_SIGNAL( in_INSERT_ROB_RE_USE      ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);
61        DELETE2_SIGNAL( in_INSERT_ROB_RE_NUM_REG  ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],_param->_size_spr_address);
62
63//     delete []  in_RETIRE_ROB_VAL               ;
64//     delete [] out_RETIRE_ROB_ACK               ;
65//     delete []  in_RETIRE_ROB_RD_OLD_USE        ;
66//     delete []  in_RETIRE_ROB_RD_OLD_NUM_REG    ;
67//     delete []  in_RETIRE_ROB_RD_NEW_USE        ;
68//     delete []  in_RETIRE_ROB_RD_NEW_NUM_REG    ;
69//     delete []  in_RETIRE_ROB_RE_OLD_USE        ;
70//     delete []  in_RETIRE_ROB_RE_OLD_NUM_REG    ;
71//     delete []  in_RETIRE_ROB_RE_NEW_USE        ;
72//     delete []  in_RETIRE_ROB_RE_NEW_NUM_REG    ;
73      }
74
75    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
76    for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
77      {
78    delete    component_gpr        [i];
79    delete    component_gpr_status [i];
80    delete    component_spr        [i];
81    delete    component_spr_status [i];
82      }
83    delete [] component_gpr       ;
84    delete [] component_gpr_status;
85    delete [] component_spr       ;
86    delete [] component_spr_status;
87    delete    component_glue      ; 
88
89    delete _component;
90
91    log_printf(FUNC,Register_unit,FUNCTION,"End");
92  };
93
94}; // end namespace register_unit
95}; // end namespace execute_loop
96}; // end namespace multi_execute_loop
97}; // end namespace core
98
99}; // end namespace behavioural
100}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.