1 | /* |
---|
2 | * $Id: Core_deallocation.cpp 128 2009-06-26 08:43:23Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/include/Core.h" |
---|
9 | #include "Behavioural/include/Allocation.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace core { |
---|
14 | |
---|
15 | |
---|
16 | #undef FUNCTION |
---|
17 | #define FUNCTION "Core::deallocation" |
---|
18 | void Core::deallocation (void) |
---|
19 | { |
---|
20 | log_begin(Core,FUNCTION); |
---|
21 | |
---|
22 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
23 | { |
---|
24 | delete in_CLOCK ; |
---|
25 | delete in_NRESET; |
---|
26 | |
---|
27 | DELETE1_SIGNAL(out_ICACHE_REQ_VAL ,_param->_nb_icache_port,1); |
---|
28 | DELETE1_SIGNAL( in_ICACHE_REQ_ACK ,_param->_nb_icache_port,1); |
---|
29 | DELETE1_SIGNAL(out_ICACHE_REQ_THREAD_ID ,_param->_nb_icache_port,_param->_size_icache_thread_id); |
---|
30 | DELETE1_SIGNAL(out_ICACHE_REQ_PACKET_ID ,_param->_nb_icache_port,_param->_size_icache_packet_id); |
---|
31 | DELETE1_SIGNAL(out_ICACHE_REQ_ADDRESS ,_param->_nb_icache_port,_param->_size_icache_address); |
---|
32 | DELETE1_SIGNAL(out_ICACHE_REQ_TYPE ,_param->_nb_icache_port,_param->_size_icache_type); |
---|
33 | |
---|
34 | DELETE1_SIGNAL( in_ICACHE_RSP_VAL ,_param->_nb_icache_port,1); |
---|
35 | DELETE1_SIGNAL(out_ICACHE_RSP_ACK ,_param->_nb_icache_port,1); |
---|
36 | DELETE1_SIGNAL( in_ICACHE_RSP_THREAD_ID ,_param->_nb_icache_port,_param->_size_icache_thread_id); |
---|
37 | DELETE1_SIGNAL( in_ICACHE_RSP_PACKET_ID ,_param->_nb_icache_port,_param->_size_icache_packet_id); |
---|
38 | DELETE1_SIGNAL( in_ICACHE_RSP_ERROR ,_param->_nb_icache_port,_param->_size_icache_error); |
---|
39 | DELETE2_SIGNAL( in_ICACHE_RSP_INSTRUCTION ,_param->_nb_icache_port,_param->_icache_nb_instruction[it1],_param->_size_instruction); |
---|
40 | |
---|
41 | DELETE1_SIGNAL(out_DCACHE_REQ_VAL ,_param->_nb_dcache_port,1); |
---|
42 | DELETE1_SIGNAL( in_DCACHE_REQ_ACK ,_param->_nb_dcache_port,1); |
---|
43 | DELETE1_SIGNAL(out_DCACHE_REQ_THREAD_ID ,_param->_nb_dcache_port,_param->_size_dcache_thread_id); |
---|
44 | DELETE1_SIGNAL(out_DCACHE_REQ_PACKET_ID ,_param->_nb_dcache_port,_param->_size_dcache_packet_id); |
---|
45 | DELETE1_SIGNAL(out_DCACHE_REQ_ADDRESS ,_param->_nb_dcache_port,_param->_size_dcache_address); |
---|
46 | DELETE1_SIGNAL(out_DCACHE_REQ_WDATA ,_param->_nb_dcache_port,_param->_size_dcache_data); |
---|
47 | DELETE1_SIGNAL(out_DCACHE_REQ_TYPE ,_param->_nb_dcache_port,_param->_size_dcache_type); |
---|
48 | |
---|
49 | DELETE1_SIGNAL( in_DCACHE_RSP_VAL ,_param->_nb_dcache_port,1); |
---|
50 | DELETE1_SIGNAL(out_DCACHE_RSP_ACK ,_param->_nb_dcache_port,1); |
---|
51 | DELETE1_SIGNAL( in_DCACHE_RSP_THREAD_ID ,_param->_nb_dcache_port,_param->_size_dcache_thread_id); |
---|
52 | DELETE1_SIGNAL( in_DCACHE_RSP_PACKET_ID ,_param->_nb_dcache_port,_param->_size_dcache_packet_id); |
---|
53 | DELETE1_SIGNAL( in_DCACHE_RSP_RDATA ,_param->_nb_dcache_port,_param->_size_dcache_data); |
---|
54 | DELETE1_SIGNAL( in_DCACHE_RSP_ERROR ,_param->_nb_dcache_port,_param->_size_dcache_error); |
---|
55 | |
---|
56 | DELETE1_SIGNAL( in_INTERRUPT_ENABLE ,_param->_nb_thread,1); |
---|
57 | } |
---|
58 | |
---|
59 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
60 | |
---|
61 | delete _component; |
---|
62 | |
---|
63 | delete _component_glue; |
---|
64 | delete _component_dcache_access; |
---|
65 | delete _component_icache_access; |
---|
66 | for (uint32_t i=0; i<_param->_nb_execute_loop; ++i) |
---|
67 | delete _component_execute_loop [i]; |
---|
68 | delete [] _component_execute_loop; |
---|
69 | for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i) |
---|
70 | delete _component_ooo_engine [i]; |
---|
71 | delete [] _component_ooo_engine; |
---|
72 | for (uint32_t i=0; i<_param->_nb_front_end; ++i) |
---|
73 | delete _component_front_end [i]; |
---|
74 | delete [] _component_front_end; |
---|
75 | |
---|
76 | log_end(Core,FUNCTION); |
---|
77 | }; |
---|
78 | |
---|
79 | }; // end namespace core |
---|
80 | }; // end namespace behavioural |
---|
81 | }; // end namespace morpheo |
---|