source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue.cpp @ 88

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

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1/*
2 * $Id: Execute_queue.cpp 88 2008-12-10 18:31:39Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h"
9
10namespace morpheo                    {
11namespace behavioural {
12namespace core {
13namespace multi_execute_loop {
14namespace execute_loop {
15namespace multi_write_unit {
16namespace write_unit {
17namespace execute_queue {
18
19
20#undef  FUNCTION
21#define FUNCTION "Execute_queue::Execute_queue"
22  Execute_queue::Execute_queue
23  (
24#ifdef SYSTEMC
25   sc_module_name name,
26#else
27   string name,
28#endif
29#ifdef STATISTICS
30   morpheo::behavioural::Parameters_Statistics * param_statistics,
31#endif
32   morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters * param,
33   morpheo::behavioural::Tusage_t usage
34   ):
35    _name              (name)
36    ,_param            (param)
37    ,_usage            (usage)
38  {
39    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
40
41#if DEBUG_Execute_queue == true
42    log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
43
44    std::cout << *param << std::endl;
45#endif   
46
47    log_printf(INFO,Execute_queue,FUNCTION,"Allocation");
48    allocation ();
49
50#ifdef STATISTICS
51    if (usage_is_set(_usage,USE_STATISTICS))
52      { 
53        log_printf(INFO,Execute_queue,FUNCTION,"Allocation of statistics");
54
55        statistics_declaration(param_statistics);
56      }
57#endif
58
59#ifdef VHDL
60    if (usage_is_set(_usage,USE_VHDL))
61      {
62        // generate the vhdl
63        log_printf(INFO,Execute_queue,FUNCTION,"Generate the vhdl");
64       
65        vhdl();
66      }
67#endif
68
69#ifdef SYSTEMC
70    if (usage_is_set(_usage,USE_SYSTEMC))
71      {
72        log_printf(INFO,Execute_queue,FUNCTION,"Method - transition");
73
74        SC_METHOD (transition);
75        dont_initialize ();
76        sensitive << (*(in_CLOCK)).pos();
77       
78# ifdef SYSTEMCASS_SPECIFIC
79        // List dependency information
80# endif   
81
82        log_printf(INFO,Execute_queue,FUNCTION,"Method - genMoore");
83
84        SC_METHOD (genMoore);
85        dont_initialize ();
86        sensitive << (*(in_CLOCK)).neg();
87       
88# ifdef SYSTEMCASS_SPECIFIC
89        // List dependency information
90# endif   
91       
92#endif
93      }
94    log_printf(FUNC,Execute_queue,FUNCTION,"End");
95  };
96   
97#undef  FUNCTION
98#define FUNCTION "Execute_queue::~Execute_queue"
99  Execute_queue::~Execute_queue (void)
100  {
101    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
102
103#ifdef STATISTICS
104    if (usage_is_set(_usage,USE_STATISTICS))
105      {
106        log_printf(INFO,Execute_queue,FUNCTION,"Generate Statistics file");
107       
108        delete _stat;
109      }
110#endif
111
112    log_printf(INFO,Execute_queue,FUNCTION,"Deallocation");
113    deallocation ();
114
115    log_printf(FUNC,Execute_queue,FUNCTION,"End");
116  };
117
118}; // end namespace execute_queue
119}; // end namespace write_unit
120}; // end namespace multi_write_unit
121}; // end namespace execute_loop
122}; // end namespace multi_execute_loop
123}; // end namespace core
124
125}; // end namespace behavioural
126}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.