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

Last change on this file since 67 was 67, checked in by rosiere, 17 years ago

Ajout d'un nouveau composant : fifo generic (un port lecture et un port ecriture).

File size: 2.2 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// #ifdef STATISTICS
35//                            ,_param_statistics (param_statistics)
36// #endif
37  {
38    log_printf(FUNC,Queue,FUNCTION,"Begin");
39
40    log_printf(INFO,Queue,FUNCTION,"Allocation");
41    allocation ();
42
43#ifdef STATISTICS
44    log_printf(INFO,Queue,FUNCTION,"Allocation of statistics");
45
46    // Allocation of statistics
47    _stat = new Statistics (static_cast<string>(_name),
48                            param_statistics          ,
49                            param);
50#endif
51
52#ifdef VHDL
53    // generate the vhdl
54    log_printf(INFO,Queue,FUNCTION,"Generate the vhdl");
55
56    vhdl();
57#endif
58
59#ifdef SYSTEMC
60//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
61    log_printf(INFO,Queue,FUNCTION,"Method - transition");
62
63    SC_METHOD (transition);
64    dont_initialize ();
65    sensitive << (*(in_CLOCK)).pos();
66//#endif
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    log_printf(FUNC,Queue,FUNCTION,"End");
84  };
85 
86#undef  FUNCTION
87#define FUNCTION "Queue::~Queue"
88  Queue::~Queue (void)
89  {
90    log_printf(FUNC,Queue,FUNCTION,"Begin");
91
92#ifdef STATISTICS
93    log_printf(INFO,Queue,FUNCTION,"Generate Statistics file");
94
95    _stat->generate_file(statistics(0));
96    delete _stat;
97#endif
98
99    log_printf(INFO,Queue,FUNCTION,"Deallocation");
100    deallocation ();
101
102    log_printf(FUNC,Queue,FUNCTION,"End");
103  };
104
105}; // end namespace queue
106}; // end namespace generic
107
108}; // end namespace behavioural
109}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.