source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue.cpp @ 75

Last change on this file since 75 was 75, checked in by rosiere, 16 years ago

Update all component (except front_end) to :

  • new statistics model
  • no namespace std
File size: 2.1 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Generic/Queue/include/Queue.h"
9
10namespace morpheo                    {
11namespace behavioural {
12namespace generic {
13namespace queue {
14
15
16#undef  FUNCTION
17#define FUNCTION "Queue::Queue"
18  Queue::Queue
19  (
20#ifdef SYSTEMC
21   sc_module_name name,
22#else
23   string name,
24#endif
25#ifdef STATISTICS
26   morpheo::behavioural::Parameters_Statistics * param_statistics,
27#endif
28   morpheo::behavioural::generic::queue::Parameters * param,
29   morpheo::behavioural::Tusage_t usage
30   ):
31    _name              (name)
32    ,_param            (param)
33    ,_usage            (usage)
34  {
35    log_printf(FUNC,Queue,FUNCTION,"Begin");
36
37    log_printf(INFO,Queue,FUNCTION,"Allocation");
38    allocation ();
39
40#ifdef STATISTICS
41    if (_usage & USE_STATISTICS)
42      { 
43        log_printf(INFO,Queue,FUNCTION,"Allocation of statistics");
44       
45        statistics_declaration(param_statistics);
46      }
47#endif
48
49#ifdef VHDL
50    if (_usage & USE_VHDL)
51      {
52        // generate the vhdl
53        log_printf(INFO,Queue,FUNCTION,"Generate the vhdl");
54       
55        vhdl();
56      }
57#endif
58
59#ifdef SYSTEMC
60    if (_usage & USE_SYSTEMC)
61      {
62        log_printf(INFO,Queue,FUNCTION,"Method - transition");
63       
64        SC_METHOD (transition);
65        dont_initialize ();
66        sensitive << (*(in_CLOCK)).pos();
67       
68# ifdef SYSTEMCASS_SPECIFIC
69        // List dependency information
70# endif   
71       
72        log_printf(INFO,Queue,FUNCTION,"Method - genMoore");
73       
74        SC_METHOD (genMoore);
75        dont_initialize ();
76        sensitive << (*(in_CLOCK)).neg();
77       
78# ifdef SYSTEMCASS_SPECIFIC
79        // List dependency information
80# endif   
81       
82#endif
83      }
84    log_printf(FUNC,Queue,FUNCTION,"End");
85  };
86 
87#undef  FUNCTION
88#define FUNCTION "Queue::~Queue"
89  Queue::~Queue (void)
90  {
91    log_printf(FUNC,Queue,FUNCTION,"Begin");
92
93#ifdef STATISTICS
94    if (_usage & USE_STATISTICS)
95      {
96        log_printf(INFO,Queue,FUNCTION,"Generate Statistics file");
97       
98        delete _stat;
99      }
100#endif
101
102    log_printf(INFO,Queue,FUNCTION,"Deallocation");
103    deallocation ();
104
105    log_printf(FUNC,Queue,FUNCTION,"End");
106  };
107
108}; // end namespace queue
109}; // end namespace generic
110
111}; // end namespace behavioural
112}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.