1 | /* |
---|
2 | * $Id: Reexecute_unit_deallocation.cpp 88 2008-12-10 18:31:39Z 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 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace core { |
---|
14 | namespace multi_ooo_engine { |
---|
15 | namespace ooo_engine { |
---|
16 | namespace 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_FLAGS ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],_param->_size_special_data); |
---|
38 | DELETE2_SIGNAL( in_EXECUTE_LOOP_EXCEPTION ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],_param->_size_exception ); |
---|
39 | DELETE2_SIGNAL( in_EXECUTE_LOOP_NO_SEQUENCE ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],1 ); |
---|
40 | DELETE2_SIGNAL( in_EXECUTE_LOOP_ADDRESS ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],_param->_size_general_data); |
---|
41 | DELETE2_SIGNAL( in_EXECUTE_LOOP_DATA ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],_param->_size_general_data); |
---|
42 | |
---|
43 | DELETE1_SIGNAL(out_COMMIT_VAL ,_param->_nb_inst_commit,1); |
---|
44 | DELETE1_SIGNAL( in_COMMIT_ACK ,_param->_nb_inst_commit,1); |
---|
45 | DELETE1_SIGNAL(out_COMMIT_WEN ,_param->_nb_inst_commit,1); |
---|
46 | DELETE1_SIGNAL(out_COMMIT_CONTEXT_ID ,_param->_nb_inst_commit,_param->_size_context_id ); |
---|
47 | DELETE1_SIGNAL(out_COMMIT_FRONT_END_ID ,_param->_nb_inst_commit,_param->_size_front_end_id); |
---|
48 | DELETE1_SIGNAL(out_COMMIT_PACKET_ID ,_param->_nb_inst_commit,_param->_size_rob_ptr ); |
---|
49 | // DELETE1_SIGNAL(out_COMMIT_OPERATION ,_param->_nb_inst_commit,_param->_size_operation ); |
---|
50 | // DELETE1_SIGNAL(out_COMMIT_TYPE ,_param->_nb_inst_commit,_param->_size_type ); |
---|
51 | DELETE1_SIGNAL(out_COMMIT_FLAGS ,_param->_nb_inst_commit,_param->_size_special_data); |
---|
52 | DELETE1_SIGNAL(out_COMMIT_EXCEPTION ,_param->_nb_inst_commit,_param->_size_exception ); |
---|
53 | DELETE1_SIGNAL(out_COMMIT_NO_SEQUENCE ,_param->_nb_inst_commit,1 ); |
---|
54 | DELETE1_SIGNAL(out_COMMIT_ADDRESS ,_param->_nb_inst_commit,_param->_size_general_data); |
---|
55 | DELETE1_SIGNAL( in_COMMIT_NUM_REG_RD ,_param->_nb_inst_commit,_param->_size_general_register ); |
---|
56 | |
---|
57 | DELETE1_SIGNAL(out_SPR_VAL , _param->_nb_inst_reexecute,1); |
---|
58 | DELETE1_SIGNAL( in_SPR_ACK , _param->_nb_inst_reexecute,1); |
---|
59 | DELETE1_SIGNAL(out_SPR_WEN , _param->_nb_inst_reexecute,1); |
---|
60 | DELETE1_SIGNAL(out_SPR_CONTEXT_ID , _param->_nb_inst_reexecute,_param->_size_context_id ); |
---|
61 | DELETE1_SIGNAL(out_SPR_FRONT_END_ID , _param->_nb_inst_reexecute,_param->_size_front_end_id); |
---|
62 | DELETE1_SIGNAL(out_SPR_NUM_GROUP , _param->_nb_inst_reexecute,_param->_size_special_address_group ); |
---|
63 | DELETE1_SIGNAL(out_SPR_NUM_REG , _param->_nb_inst_reexecute,_param->_size_special_address_register); |
---|
64 | DELETE1_SIGNAL(out_SPR_WDATA , _param->_nb_inst_reexecute,_param->_size_spr); |
---|
65 | DELETE1_SIGNAL( in_SPR_RDATA , _param->_nb_inst_reexecute,_param->_size_spr); |
---|
66 | DELETE1_SIGNAL( in_SPR_INVALID , _param->_nb_inst_reexecute,1); |
---|
67 | |
---|
68 | DELETE1_SIGNAL( in_REEXECUTE_ROB_VAL , _param->_nb_inst_reexecute,1); |
---|
69 | DELETE1_SIGNAL(out_REEXECUTE_ROB_ACK , _param->_nb_inst_reexecute,1); |
---|
70 | DELETE1_SIGNAL( in_REEXECUTE_ROB_CONTEXT_ID , _param->_nb_inst_reexecute,_param->_size_context_id); |
---|
71 | DELETE1_SIGNAL( in_REEXECUTE_ROB_FRONT_END_ID , _param->_nb_inst_reexecute,_param->_size_front_end_id); |
---|
72 | DELETE1_SIGNAL( in_REEXECUTE_ROB_PACKET_ID , _param->_nb_inst_reexecute,_param->_size_rob_ptr ); |
---|
73 | DELETE1_SIGNAL( in_REEXECUTE_ROB_OPERATION , _param->_nb_inst_reexecute,_param->_size_operation); |
---|
74 | DELETE1_SIGNAL( in_REEXECUTE_ROB_TYPE , _param->_nb_inst_reexecute,_param->_size_type); |
---|
75 | DELETE1_SIGNAL( in_REEXECUTE_ROB_STORE_QUEUE_PTR_WRITE , _param->_nb_inst_reexecute,_param->_size_store_queue_ptr); |
---|
76 | |
---|
77 | DELETE1_SIGNAL(out_REEXECUTE_VAL , _param->_nb_inst_reexecute,1); |
---|
78 | DELETE1_SIGNAL( in_REEXECUTE_ACK , _param->_nb_inst_reexecute,1); |
---|
79 | DELETE1_SIGNAL(out_REEXECUTE_CONTEXT_ID , _param->_nb_inst_reexecute,_param->_size_context_id ); |
---|
80 | DELETE1_SIGNAL(out_REEXECUTE_FRONT_END_ID , _param->_nb_inst_reexecute,_param->_size_front_end_id ); |
---|
81 | DELETE1_SIGNAL(out_REEXECUTE_PACKET_ID , _param->_nb_inst_reexecute,_param->_size_rob_ptr ); |
---|
82 | DELETE1_SIGNAL(out_REEXECUTE_OPERATION , _param->_nb_inst_reexecute,_param->_size_operation ); |
---|
83 | DELETE1_SIGNAL(out_REEXECUTE_TYPE , _param->_nb_inst_reexecute,_param->_size_type ); |
---|
84 | DELETE1_SIGNAL(out_REEXECUTE_STORE_QUEUE_PTR_WRITE , _param->_nb_inst_reexecute,_param->_size_store_queue_ptr ); |
---|
85 | DELETE1_SIGNAL(out_REEXECUTE_LOAD_QUEUE_PTR_WRITE , _param->_nb_inst_reexecute,_param->_size_load_queue_ptr ); |
---|
86 | DELETE1_SIGNAL(out_REEXECUTE_HAS_IMMEDIAT , _param->_nb_inst_reexecute,1 ); |
---|
87 | DELETE1_SIGNAL(out_REEXECUTE_IMMEDIAT , _param->_nb_inst_reexecute,_param->_size_general_data ); |
---|
88 | DELETE1_SIGNAL(out_REEXECUTE_READ_RA , _param->_nb_inst_reexecute,1 ); |
---|
89 | DELETE1_SIGNAL(out_REEXECUTE_NUM_REG_RA , _param->_nb_inst_reexecute,_param->_size_general_register ); |
---|
90 | DELETE1_SIGNAL(out_REEXECUTE_READ_RB , _param->_nb_inst_reexecute,1 ); |
---|
91 | DELETE1_SIGNAL(out_REEXECUTE_NUM_REG_RB , _param->_nb_inst_reexecute,_param->_size_general_register ); |
---|
92 | DELETE1_SIGNAL(out_REEXECUTE_READ_RC , _param->_nb_inst_reexecute,1 ); |
---|
93 | DELETE1_SIGNAL(out_REEXECUTE_NUM_REG_RC , _param->_nb_inst_reexecute,_param->_size_special_register ); |
---|
94 | DELETE1_SIGNAL(out_REEXECUTE_WRITE_RD , _param->_nb_inst_reexecute,1 ); |
---|
95 | DELETE1_SIGNAL(out_REEXECUTE_NUM_REG_RD , _param->_nb_inst_reexecute,_param->_size_general_register ); |
---|
96 | DELETE1_SIGNAL(out_REEXECUTE_WRITE_RE , _param->_nb_inst_reexecute,1 ); |
---|
97 | DELETE1_SIGNAL(out_REEXECUTE_NUM_REG_RE , _param->_nb_inst_reexecute,_param->_size_special_register ); |
---|
98 | |
---|
99 | // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
100 | for (uint32_t i=0; i<_param->_nb_bank; i++) |
---|
101 | if (not _reexecute_queue [i].empty() and (_reexecute_queue [i].front()->state == STATE_EMPTY)) |
---|
102 | { |
---|
103 | entry_t * entry = _reexecute_queue [i].front(); |
---|
104 | _reexecute_queue [i].pop_front(); |
---|
105 | delete entry; |
---|
106 | } |
---|
107 | delete [] _reexecute_queue; |
---|
108 | |
---|
109 | // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
110 | delete [] internal_QUEUE_PUSH ; |
---|
111 | delete [] internal_QUEUE_NUM_EXECUTE_LOOP; |
---|
112 | delete [] internal_QUEUE_NUM_INST_EXECUTE; |
---|
113 | delete [] internal_QUEUE_NUM_INST_COMMIT ; |
---|
114 | delete [] internal_QUEUE_INFO ; |
---|
115 | delete [] internal_SPR_VAL ; |
---|
116 | delete [] internal_REEXECUTE_ROB_ACK ; |
---|
117 | delete [] internal_REEXECUTE_VAL ; |
---|
118 | #ifdef STATISTICS |
---|
119 | delete [] internal_COMMIT_VAL ; |
---|
120 | #endif |
---|
121 | } |
---|
122 | |
---|
123 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
124 | |
---|
125 | delete _priority_execute_loop; |
---|
126 | delete _priority_queue_in ; |
---|
127 | |
---|
128 | delete _component; |
---|
129 | |
---|
130 | log_end(Reexecute_unit,FUNCTION); |
---|
131 | }; |
---|
132 | |
---|
133 | }; // end namespace reexecute_unit |
---|
134 | }; // end namespace ooo_engine |
---|
135 | }; // end namespace multi_ooo_engine |
---|
136 | }; // end namespace core |
---|
137 | |
---|
138 | }; // end namespace behavioural |
---|
139 | }; // end namespace morpheo |
---|