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