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

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

1) Add new algo in ifetch queue
2) Add Cancel bit
3) new config

  • Property svn:keywords set to Id
File size: 3.4 KB
RevLine 
[55]1/*
2 * $Id: Reservation_station.cpp 136 2009-10-20 18:52:15Z 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"
[82]22
23  Reservation_station::Reservation_station
24  (
[55]25#ifdef SYSTEMC
[82]26   sc_module_name name,
[55]27#else
[82]28   std::string name,
[55]29#endif
30#ifdef STATISTICS
[82]31   morpheo::behavioural::Parameters_Statistics * param_statistics,
[55]32#endif
[82]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)
[55]38  {
[136]39    log_printf(FUNC,Reservation_station,FUNCTION,_("<%s> Begin"),_name.c_str());
[55]40
[123]41// #if DEBUG_Reservation_station == true
42//     log_printf(INFO,Reservation_station,FUNCTION,_("<%s> Parameters"),_name.c_str());
[88]43
[123]44//     std::cout << *param << std::endl;
45// #endif   
[88]46
[55]47#ifdef SYSTEMC
[136]48    log_printf(INFO,Reservation_station,FUNCTION,_("<%s> Allocation"),_name.c_str());
[55]49
50    allocation ();
51#endif
52
53#ifdef STATISTICS
[88]54    if (usage_is_set(_usage,USE_STATISTICS))
55      { 
[136]56        log_printf(INFO,Reservation_station,FUNCTION,_("<%s> Allocation of statistics"),_name.c_str());
[88]57       
58        statistics_declaration(param_statistics);
59      }
[55]60#endif
61
62#ifdef VHDL
[88]63    if (usage_is_set(_usage,USE_VHDL))
64      { 
65        // generate the vhdl
[136]66        log_printf(INFO,Reservation_station,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str());
[88]67       
68        vhdl();
69      }
[55]70#endif
71
72#ifdef SYSTEMC
[88]73    if (usage_is_set(_usage,USE_SYSTEMC))
74      { 
[55]75//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
[136]76    log_printf(INFO,Reservation_station,FUNCTION,_("<%s> Method - transition"),_name.c_str());
[55]77
78    SC_METHOD (transition);
79    dont_initialize ();
[131]80    sensitive << (*(in_CLOCK)).pos();
[55]81//#endif
82
83#ifdef SYSTEMCASS_SPECIFIC
84    // List dependency information
85#endif   
86
[136]87    log_printf(INFO,Reservation_station,FUNCTION,_("<%s> Method - genMoore"),_name.c_str());
[55]88
89    SC_METHOD (genMoore);
90    dont_initialize ();
[131]91    sensitive << (*(in_CLOCK)).neg();
[55]92
93#ifdef SYSTEMCASS_SPECIFIC
94    // List dependency information
95#endif   
[88]96      }
[55]97#endif
[136]98    log_printf(FUNC,Reservation_station,FUNCTION,_("<%s> End"),_name.c_str());
[55]99  };
100 
101#undef  FUNCTION
102#define FUNCTION "Reservation_station::~Reservation_station"
103  Reservation_station::~Reservation_station (void)
104  {
[136]105    log_printf(FUNC,Reservation_station,FUNCTION,_("<%s> Begin"),_name.c_str());
[55]106
107#ifdef STATISTICS
[88]108    if (usage_is_set(_usage,USE_STATISTICS))
109      { 
[136]110        log_printf(INFO,Reservation_station,FUNCTION,_("<%s> Generate Statistics file"),_name.c_str());
[88]111       
112        delete _stat;
113      }
[55]114#endif
115
116#ifdef SYSTEMC
[136]117    log_printf(INFO,Reservation_station,FUNCTION,_("<%s> Deallocation"),_name.c_str());
[55]118
119    deallocation ();
120#endif
121
[136]122    log_printf(FUNC,Reservation_station,FUNCTION,_("<%s> End"),_name.c_str());
[55]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.