1 | /* |
---|
2 | * $Id: Functionnal_unit_deallocation.cpp 118 2009-05-20 22:01:32Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Functionnal_unit.h" |
---|
9 | #include "Behavioural/include/Allocation.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace core { |
---|
14 | namespace multi_execute_loop { |
---|
15 | namespace execute_loop { |
---|
16 | namespace multi_execute_unit { |
---|
17 | namespace execute_unit { |
---|
18 | namespace functionnal_unit { |
---|
19 | |
---|
20 | |
---|
21 | #undef FUNCTION |
---|
22 | #define FUNCTION "Functionnal_unit::deallocation" |
---|
23 | void Functionnal_unit::deallocation (void) |
---|
24 | { |
---|
25 | log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin"); |
---|
26 | |
---|
27 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
28 | { |
---|
29 | delete in_CLOCK ; |
---|
30 | delete in_NRESET; |
---|
31 | |
---|
32 | DELETE0_SIGNAL( in_EXECUTE_IN_VAL ,1); |
---|
33 | DELETE0_SIGNAL(out_EXECUTE_IN_ACK ,1); |
---|
34 | DELETE0_SIGNAL( in_EXECUTE_IN_CONTEXT_ID , _param->_size_context_id ); |
---|
35 | DELETE0_SIGNAL( in_EXECUTE_IN_FRONT_END_ID , _param->_size_front_end_id ); |
---|
36 | DELETE0_SIGNAL( in_EXECUTE_IN_OOO_ENGINE_ID , _param->_size_ooo_engine_id); |
---|
37 | DELETE0_SIGNAL( in_EXECUTE_IN_PACKET_ID , _param->_size_rob_ptr ); |
---|
38 | DELETE0_SIGNAL( in_EXECUTE_IN_OPERATION , _param->_size_operation ); |
---|
39 | DELETE0_SIGNAL( in_EXECUTE_IN_TYPE , _param->_size_type ); |
---|
40 | DELETE0_SIGNAL( in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE ,_param->_size_store_queue_ptr); |
---|
41 | DELETE0_SIGNAL( in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE ,_param->_size_load_queue_ptr); |
---|
42 | DELETE0_SIGNAL( in_EXECUTE_IN_HAS_IMMEDIAT , 1); |
---|
43 | DELETE0_SIGNAL( in_EXECUTE_IN_IMMEDIAT , _param->_size_general_data); |
---|
44 | DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RA , _param->_size_general_data); |
---|
45 | DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RB , _param->_size_general_data); |
---|
46 | DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RC , _param->_size_special_data); |
---|
47 | DELETE0_SIGNAL( in_EXECUTE_IN_WRITE_RD , 1); |
---|
48 | DELETE0_SIGNAL( in_EXECUTE_IN_NUM_REG_RD , _param->_size_general_register); |
---|
49 | DELETE0_SIGNAL( in_EXECUTE_IN_WRITE_RE , 1); |
---|
50 | DELETE0_SIGNAL( in_EXECUTE_IN_NUM_REG_RE , _param->_size_special_register); |
---|
51 | |
---|
52 | DELETE0_SIGNAL(out_EXECUTE_OUT_VAL ,1); |
---|
53 | DELETE0_SIGNAL( in_EXECUTE_OUT_ACK ,1); |
---|
54 | DELETE0_SIGNAL(out_EXECUTE_OUT_CONTEXT_ID ,_param->_size_context_id ); |
---|
55 | DELETE0_SIGNAL(out_EXECUTE_OUT_FRONT_END_ID ,_param->_size_front_end_id ); |
---|
56 | DELETE0_SIGNAL(out_EXECUTE_OUT_OOO_ENGINE_ID ,_param->_size_ooo_engine_id); |
---|
57 | DELETE0_SIGNAL(out_EXECUTE_OUT_PACKET_ID ,_param->_size_rob_ptr ); |
---|
58 | //DELETE0_SIGNAL(out_EXECUTE_OUT_OPERATION ,_param->_size_operation ); |
---|
59 | //DELETE0_SIGNAL(out_EXECUTE_OUT_TYPE ,_param->_size_type ); |
---|
60 | DELETE0_SIGNAL(out_EXECUTE_OUT_WRITE_RD ,1); |
---|
61 | DELETE0_SIGNAL(out_EXECUTE_OUT_NUM_REG_RD ,_param->_size_general_register); |
---|
62 | DELETE0_SIGNAL(out_EXECUTE_OUT_DATA_RD ,_param->_size_general_data); |
---|
63 | DELETE0_SIGNAL(out_EXECUTE_OUT_WRITE_RE ,1); |
---|
64 | DELETE0_SIGNAL(out_EXECUTE_OUT_NUM_REG_RE ,_param->_size_special_register); |
---|
65 | DELETE0_SIGNAL(out_EXECUTE_OUT_DATA_RE ,_param->_size_special_data); |
---|
66 | DELETE0_SIGNAL(out_EXECUTE_OUT_EXCEPTION ,_param->_size_exception); |
---|
67 | DELETE0_SIGNAL(out_EXECUTE_OUT_NO_SEQUENCE ,1); |
---|
68 | DELETE0_SIGNAL(out_EXECUTE_OUT_ADDRESS ,_param->_size_instruction_address); |
---|
69 | |
---|
70 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
71 | |
---|
72 | for (uint32_t i=0; i<_param->_nb_context; i++) |
---|
73 | for (uint32_t j=0; j<_param->_nb_front_end; j++) |
---|
74 | for (uint32_t k=0; k<_param->_nb_ooo_engine; k++) |
---|
75 | delete _execute_register [i][j][k]; |
---|
76 | |
---|
77 | DELETE3(_execute_register,_param->_nb_context,_param->_nb_front_end,_param->_nb_ooo_engine); |
---|
78 | DELETE0(_execute_param); |
---|
79 | if (_param->_have_pipeline_in) |
---|
80 | DELETE0(_execute_operation_in); |
---|
81 | DELETE0(_execute_operation_out); |
---|
82 | DELETE2(_function_execute,_param->_nb_type,_param->_nb_operation); |
---|
83 | } |
---|
84 | |
---|
85 | delete _component; |
---|
86 | |
---|
87 | log_printf(FUNC,Functionnal_unit,FUNCTION,"End"); |
---|
88 | }; |
---|
89 | |
---|
90 | }; // end namespace functionnal_unit |
---|
91 | }; // end namespace execute_unit |
---|
92 | }; // end namespace multi_execute_unit |
---|
93 | }; // end namespace execute_loop |
---|
94 | }; // end namespace multi_execute_loop |
---|
95 | }; // end namespace core |
---|
96 | |
---|
97 | }; // end namespace behavioural |
---|
98 | }; // end namespace morpheo |
---|