source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_deallocation.cpp

Last change on this file was 136, checked in by rosiere, 15 years ago

1) Add new algo in ifetch queue
2) Add Cancel bit
3) new config

  • Property svn:keywords set to Id
File size: 3.9 KB
Line 
1/*
2 * $Id: Ifetch_queue_deallocation.cpp 136 2009-10-20 18:52:15Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/include/Ifetch_queue.h"
9#include "Behavioural/include/Allocation.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace core {
14namespace multi_front_end {
15namespace front_end {
16namespace ifetch_unit {
17namespace ifetch_queue {
18
19
20#undef  FUNCTION
21#define FUNCTION "Ifetch_queue::deallocation"
22  void Ifetch_queue::deallocation (void)
23  {
24    log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
25
26    if (usage_is_set(_usage,USE_SYSTEMC))
27      {
28        delete    in_CLOCK ;
29        delete    in_NRESET;
30
31        DELETE0_SIGNAL( in_ADDRESS_VAL                        ,1);
32        DELETE0_SIGNAL(out_ADDRESS_ACK                        ,1);
33        DELETE0_SIGNAL( in_ADDRESS_INSTRUCTION_ADDRESS        ,_param->_size_instruction_address);
34        DELETE0_SIGNAL( in_ADDRESS_INST_IFETCH_PTR            ,_param->_size_inst_ifetch_ptr);
35        DELETE0_SIGNAL( in_ADDRESS_BRANCH_STATE               ,_param->_size_branch_state   );
36        DELETE0_SIGNAL( in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID,_param->_size_depth          );
37        DELETE0_SIGNAL(out_ADDRESS_IFETCH_QUEUE_ID            ,_param->_size_ifetch_queue_ptr);
38        DELETE1_SIGNAL( in_ADDRESS_INSTRUCTION_ENABLE         ,_param->_nb_instruction,1);
39     
40        DELETE1_SIGNAL(out_DECOD_VAL                        ,_param->_nb_instruction,1);
41        DELETE1_SIGNAL( in_DECOD_ACK                        ,_param->_nb_instruction,1);
42        DELETE1_SIGNAL(out_DECOD_INSTRUCTION                ,_param->_nb_instruction,_param->_size_instruction);
43        DELETE1_SIGNAL(out_DECOD_ADDRESS                    ,_param->_nb_instruction,_param->_size_instruction_address);
44        DELETE1_SIGNAL(out_DECOD_BRANCH_STATE               ,_param->_nb_instruction,_param->_size_branch_state);
45        DELETE1_SIGNAL(out_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_instruction,_param->_size_depth);
46        DELETE1_SIGNAL(out_DECOD_EXCEPTION                  ,_param->_nb_instruction,_param->_size_exception_ifetch);
47//         DELETE0_SIGNAL(out_DECOD_ADDRESS                    ,_param->_size_instruction_address);
48//         DELETE0_SIGNAL(out_DECOD_INST_IFETCH_PTR            ,_param->_size_inst_ifetch_ptr );
49//         DELETE0_SIGNAL(out_DECOD_BRANCH_STATE               ,_param->_size_branch_state    );
50//         DELETE0_SIGNAL(out_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_size_depth           );
51//         DELETE0_SIGNAL(out_DECOD_EXCEPTION                  ,_param->_size_exception_ifetch);
52
53        DELETE0_SIGNAL( in_ICACHE_RSP_VAL        ,1);
54        DELETE0_SIGNAL(out_ICACHE_RSP_ACK        ,1);
55        DELETE0_SIGNAL( in_ICACHE_RSP_PACKET_ID  ,_param->_size_ifetch_queue_ptr);
56        DELETE0_SIGNAL( in_ICACHE_RSP_ERROR      ,_param->_size_icache_error);
57        DELETE1_SIGNAL( in_ICACHE_RSP_INSTRUCTION,_param->_nb_instruction,_param->_size_instruction);
58
59        DELETE0_SIGNAL( in_EVENT_RESET_VAL,1);
60        DELETE0_SIGNAL(out_EVENT_RESET_ACK,1);
61      }
62
63    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
64    if (usage_is_set(_usage,USE_SYSTEMC))
65      {
66        DELETE1(internal_DECOD_VAL ,_param->_nb_instruction);
67        if (_param->_queue_scheme == IFETCH_QUEUE_SCHEME_FULL_ASSOC)
68          {
69        DELETE1(internal_DECOD_PTR ,_param->_nb_instruction);
70        DELETE1(internal_DECOD_SLOT,_param->_nb_instruction);
71          }
72       
73        for (uint32_t i=0;i<_param->_size_queue; i++)
74          delete _queue[i];
75        delete [] _queue;
76      }
77
78    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
79    delete    _component;
80
81    log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
82  };
83
84}; // end namespace ifetch_queue
85}; // end namespace ifetch_unit
86}; // end namespace front_end
87}; // end namespace multi_front_end
88}; // end namespace core
89
90}; // end namespace behavioural
91}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.