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

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

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
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
37    allocation (
38#ifdef STATISTICS
39                param_statistics
40#endif
41                );
42
43#ifdef STATISTICS
44    if (_usage & USE_STATISTICS)
45      { 
46        log_printf(INFO,@COMPONENT,FUNCTION,"Allocation of statistics");
47
48        statistics_allocation(param_statistics);
49      }
50#endif
51
52#ifdef VHDL
53    if (_usage & USE_VHDL)
54      {
55        // generate the vhdl
56        log_printf(INFO,@COMPONENT,FUNCTION,"Generate the vhdl");
57       
58        vhdl();
59      }
60#endif
61
62#ifdef SYSTEMC
63    if (_usage & USE_SYSTEMC)
64      {
65        log_printf(INFO,@COMPONENT,FUNCTION,"Method - transition");
66
67        SC_METHOD (transition);
68        dont_initialize ();
69        sensitive << (*(in_CLOCK)).pos();
70       
71# ifdef SYSTEMCASS_SPECIFIC
72        // List dependency information
73# endif   
74       
75#endif
76      }
77    log_printf(FUNC,@COMPONENT,FUNCTION,"End");
78  };
79   
80#undef  FUNCTION
81#define FUNCTION "@COMPONENT::~@COMPONENT"
82  @COMPONENT::~@COMPONENT (void)
83  {
84    log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
85
86#ifdef STATISTICS
87    if (_usage & USE_STATISTICS)
88      {
89        statistics_deallocation();
90      }
91#endif
92
93    log_printf(INFO,@COMPONENT,FUNCTION,"Deallocation");
94    deallocation ();
95
96    log_printf(FUNC,@COMPONENT,FUNCTION,"End");
97  };
98
99@NAMESPACE_END
100}; // end namespace behavioural
101}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.