source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station.cpp @ 123

Last change on this file since 123 was 123, checked in by rosiere, 15 years ago

1) Fix performance
2) add auto generation to SPECINT2000
3) add reset in genMoore and genMealy

  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1/*
2 * $Id: Reservation_station.cpp 123 2009-06-08 20:43:30Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Reservation_station.h"
9
10namespace morpheo                    {
11namespace behavioural {
12namespace core {
13namespace multi_execute_loop {
14namespace execute_loop {
15namespace multi_read_unit {
16namespace read_unit {
17namespace reservation_station {
18
19
20#undef  FUNCTION
21#define FUNCTION "Reservation_station::Reservation_station"
22
23  Reservation_station::Reservation_station
24  (
25#ifdef SYSTEMC
26   sc_module_name name,
27#else
28   std::string name,
29#endif
30#ifdef STATISTICS
31   morpheo::behavioural::Parameters_Statistics * param_statistics,
32#endif
33   morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Parameters * param,
34   morpheo::behavioural::Tusage_t                usage ):
35    _name   (name)
36    ,_param (param)
37    ,_usage (usage)
38  {
39    log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
40
41// #if DEBUG_Reservation_station == true
42//     log_printf(INFO,Reservation_station,FUNCTION,_("<%s> Parameters"),_name.c_str());
43
44//     std::cout << *param << std::endl;
45// #endif   
46
47#ifdef SYSTEMC
48    log_printf(INFO,Reservation_station,FUNCTION,"Allocation");
49
50    allocation ();
51#endif
52
53#ifdef STATISTICS
54    if (usage_is_set(_usage,USE_STATISTICS))
55      { 
56        log_printf(INFO,Reservation_station,FUNCTION,"Allocation of statistics");
57       
58        statistics_declaration(param_statistics);
59      }
60#endif
61
62#ifdef VHDL
63    if (usage_is_set(_usage,USE_VHDL))
64      { 
65        // generate the vhdl
66        log_printf(INFO,Reservation_station,FUNCTION,"Generate the vhdl");
67       
68        vhdl();
69      }
70#endif
71
72#ifdef SYSTEMC
73    if (usage_is_set(_usage,USE_SYSTEMC))
74      { 
75//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
76    log_printf(INFO,Reservation_station,FUNCTION,"Method - transition");
77
78    SC_METHOD (transition);
79    dont_initialize ();
80    sensitive_pos << *(in_CLOCK);
81//#endif
82
83#ifdef SYSTEMCASS_SPECIFIC
84    // List dependency information
85#endif   
86
87    log_printf(INFO,Reservation_station,FUNCTION,"Method - genMoore");
88
89    SC_METHOD (genMoore);
90    dont_initialize ();
91    sensitive_neg << *(in_CLOCK);
92
93#ifdef SYSTEMCASS_SPECIFIC
94    // List dependency information
95#endif   
96      }
97#endif
98    log_printf(FUNC,Reservation_station,FUNCTION,"End");
99  };
100 
101#undef  FUNCTION
102#define FUNCTION "Reservation_station::~Reservation_station"
103  Reservation_station::~Reservation_station (void)
104  {
105    log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
106
107#ifdef STATISTICS
108    if (usage_is_set(_usage,USE_STATISTICS))
109      { 
110        log_printf(INFO,Reservation_station,FUNCTION,"Generate Statistics file");
111       
112        delete _stat;
113      }
114#endif
115
116#ifdef SYSTEMC
117    log_printf(INFO,Reservation_station,FUNCTION,"Deallocation");
118
119    deallocation ();
120#endif
121
122    log_printf(FUNC,Reservation_station,FUNCTION,"End");
123  };
124
125}; // end namespace reservation_station
126}; // end namespace read_unit
127}; // end namespace multi_read_unit
128}; // end namespace execute_loop
129}; // end namespace multi_execute_loop
130}; // end namespace core
131
132}; // end namespace behavioural
133}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.