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

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

add two component :

  • Write Queue (in Moore version)
  • Execute Queue

add macro to help the interface allocation : Allocation.h

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