source: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/New_Component.cpp @ 71

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

Modification of Statisctics
Add a new systemC component : Load_Store_Queue (tested with one benchmark and one configuration). Store don't supported the Data Buss Error (Load is supported)

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