source: trunk/IPs/systemC/processor/Morpheo/TopLevel/src/Morpheo.cpp @ 97

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

1) Update Prediction Table : statistics
2) Size instruction address on 30 bits
3) Change Log File
4) Add debug_level in simulation configuration file

  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1/*
2 * $Id: Morpheo.cpp 97 2008-12-19 15:34:00Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "TopLevel/include/Morpheo.h"
9#include "Common/include/Translation.h"
10
11namespace morpheo {
12
13  using namespace behavioural;
14
15#undef  FUNCTION
16#define FUNCTION "Morpheo::Morpheo"
17  Morpheo::Morpheo
18  (
19#ifdef SYSTEMC
20   sc_module_name name,
21#else             
22   std::string    name,
23#endif                         
24   std::string    filename_simulator, 
25   std::string    filename_generator, 
26   std::string    filename_instance ,
27   morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void)
28   )
29  {
30    translation ();
31   
32    log_begin(Morpheo,FUNCTION);
33
34    log_printf(INFO,Morpheo,FUNCTION,_("Configuration"));
35    configuration (filename_simulator,
36                   filename_generator, 
37                   filename_instance, 
38                   get_custom_information);
39 
40    log_printf(INFO,Morpheo,FUNCTION,_("<%s> : Allocation"),_name.c_str());
41
42    allocation (
43#ifdef STATISTICS
44                _param_statistics
45#endif
46                );
47
48#ifdef STATISTICS
49    if (usage_is_set(_usage,USE_STATISTICS))
50      { 
51        log_printf(INFO,Morpheo,FUNCTION,_("<%s> : Allocation of statistics"),_name.c_str());
52
53        statistics_allocation(_param_statistics);
54      }
55#endif
56
57#ifdef VHDL
58    if (usage_is_set(_usage,USE_VHDL))
59      {
60        // generate the vhdl
61        log_printf(INFO,Morpheo,FUNCTION,_("<%s> : Generate the vhdl"),_name.c_str());
62       
63        vhdl();
64      }
65#endif
66
67#ifdef SYSTEMC
68    if (usage_is_set(_usage,USE_SYSTEMC))
69      {
70        log_printf(INFO,Morpheo,FUNCTION,_("<%s> : Method - transition"),_name.c_str());
71
72        SC_METHOD (transition);
73        dont_initialize ();
74        sensitive << (*(in_CLOCK)).pos();
75       
76# ifdef SYSTEMCASS_SPECIFIC
77        // List dependency information
78# endif   
79       
80#endif
81      }
82    log_end(Morpheo,FUNCTION);
83  };
84   
85#undef  FUNCTION
86#define FUNCTION "Morpheo::~Morpheo"
87  Morpheo::~Morpheo (void)
88  {
89    log_begin(Morpheo,FUNCTION);
90
91#ifdef STATISTICS
92    if (usage_is_set(_usage,USE_STATISTICS))
93      {
94        statistics_deallocation();
95      }
96#endif
97
98    log_printf(INFO,Morpheo,FUNCTION,_("<%s> : Deallocation"),_name.c_str());
99    deallocation ();
100
101    delete _param_core;
102    delete _config;
103
104    log_end(Morpheo,FUNCTION);
105  };
106
107}; // end namespace morpheo
Note: See TracBrowser for help on using the repository browser.