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

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

1) add constant method - compatibility with SystemC
2) add Script to test sensitive list
3) fix bug in sensitive list

  • Property svn:keywords set to Id
File size: 3.1 KB
RevLine 
[78]1/*
2 * $Id: Ifetch_queue.cpp 132 2009-07-11 16:39:35Z 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
10namespace morpheo                    {
11namespace behavioural {
12namespace core {
13namespace multi_front_end {
14namespace front_end {
15namespace ifetch_unit {
16namespace ifetch_queue {
17
18
19#undef  FUNCTION
20#define FUNCTION "Ifetch_queue::Ifetch_queue"
21  Ifetch_queue::Ifetch_queue
22  (
23#ifdef SYSTEMC
24   sc_module_name name,
25#else
26   string name,
27#endif
28#ifdef STATISTICS
29   morpheo::behavioural::Parameters_Statistics * param_statistics,
30#endif
31   morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::Parameters * param,
32   morpheo::behavioural::Tusage_t usage
33   ):
34    _name              (name)
35    ,_param            (param)
36    ,_usage            (usage)
37  {
38    log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
39
[123]40// #if DEBUG_Ifetch_queue == true
41//     log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
[78]42
[123]43//     std::cout << *param << std::endl;
44// #endif   
[88]45
46    log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Allocation"),_name.c_str());
47
[78]48    allocation (
49#ifdef STATISTICS
50                param_statistics
51#endif
52                );
53
54#ifdef STATISTICS
[88]55    if (usage_is_set(_usage,USE_STATISTICS))
[78]56      { 
[88]57        log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Allocation of statistics"),_name.c_str());
[78]58
59        statistics_allocation(param_statistics);
60      }
61#endif
62
63#ifdef VHDL
[88]64    if (usage_is_set(_usage,USE_VHDL))
[78]65      {
66        // generate the vhdl
[88]67        log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str());
[78]68       
69        vhdl();
70      }
71#endif
72
73#ifdef SYSTEMC
[88]74    if (usage_is_set(_usage,USE_SYSTEMC))
[78]75      {
[131]76        log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Method - constant"),_name.c_str());
[78]77
[132]78#ifdef SYSTEMCASS_SPECIFIC
79        constant();
80#else
[131]81        SC_METHOD (constant);
82//      dont_initialize ();
83       
84# ifdef SYSTEMCASS_SPECIFIC
85        // List dependency information
86# endif   
[132]87#endif
[88]88        log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Method - transition"),_name.c_str());
[78]89
90        SC_METHOD (transition);
91        dont_initialize ();
92        sensitive << (*(in_CLOCK)).pos();
93       
94# ifdef SYSTEMCASS_SPECIFIC
95        // List dependency information
96# endif   
97
[88]98        log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Method - genMoore"),_name.c_str());
[78]99
100        SC_METHOD (genMoore);
101        dont_initialize ();
102        sensitive << (*(in_CLOCK)).neg(); // use internal register
103       
104# ifdef SYSTEMCASS_SPECIFIC
105        // List dependency information
106# endif   
107       
108#endif
109      }
110    log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
111  };
112   
113#undef  FUNCTION
114#define FUNCTION "Ifetch_queue::~Ifetch_queue"
115  Ifetch_queue::~Ifetch_queue (void)
116  {
117    log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
118
119#ifdef STATISTICS
[88]120    if (usage_is_set(_usage,USE_STATISTICS))
[78]121      {
122        statistics_deallocation();
123      }
124#endif
125
[88]126    log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Deallocation"),_name.c_str());
[78]127    deallocation ();
128
129    log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
130  };
131
132}; // end namespace ifetch_queue
133}; // end namespace ifetch_unit
134}; // end namespace front_end
135}; // end namespace multi_front_end
136}; // end namespace core
137
138}; // end namespace behavioural
139}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.