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