source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Parameters.cpp @ 144

Last change on this file since 144 was 144, checked in by rosiere, 14 years ago

1) compatible gcc 4.4.3
2) Translation file in MORPHEO_PREFIX directory

  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1/*
2 * $Id: Parameters.cpp 144 2010-09-28 11:19:10Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Parameters.h"
9#include "Common/include/Max.h"
10
11namespace morpheo {
12namespace behavioural {
13namespace core {
14namespace multi_ooo_engine {
15namespace ooo_engine {
16namespace rename_unit {
17namespace register_translation_unit {
18namespace register_address_translation_unit {
19
20#undef  FUNCTION
21#define FUNCTION "Register_Address_Translation_unit::Parameters"
22  Parameters::Parameters (uint32_t         nb_front_end        ,
23                          uint32_t       * nb_context          ,//[nb_front_end]
24                          uint32_t         nb_general_register ,
25                          uint32_t         nb_special_register ,
26                          Trat_scheme_t    rat_scheme          ,
27                          uint32_t         nb_inst_insert      ,
28                          uint32_t         nb_inst_retire      ,
29                          uint32_t      ** nb_branch_speculated,//[nb_front_end][nb_context]
30                          bool             is_toplevel)
31  {
32    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
33
34    _nb_front_end           = nb_front_end        ;
35    _nb_context             = nb_context          ;
36    _nb_general_register    = nb_general_register ;
37    _nb_special_register    = nb_special_register ;
38    _rat_scheme             = rat_scheme          ;
39    _nb_inst_insert         = nb_inst_insert      ;
40    _nb_inst_retire         = nb_inst_retire      ;
41    _nb_branch_speculated   = nb_branch_speculated;
42
43    _max_nb_context         = max<uint32_t>(_nb_context, _nb_front_end);
44
45    test();
46
47    if (is_toplevel)
48      {
49        _size_front_end_id      = log2(_nb_front_end       );
50        _size_context_id        = log2(_max_nb_context     );
51        _size_general_register  = log2(_nb_general_register);
52        _size_special_register  = log2(_nb_special_register);
53        _size_depth             = log2(max<uint32_t>(_nb_branch_speculated,_nb_front_end,_nb_context));
54   
55        _have_port_front_end_id = _size_front_end_id>0;
56        _have_port_context_id   = _size_context_id  >0;
57        _have_port_depth        = _size_depth       >0;
58
59        copy();
60      }
61
62    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
63  };
64 
65// #undef  FUNCTION
66// #define FUNCTION "Register_Address_Translation_unit::Parameters (copy)"
67//   Parameters::Parameters (Parameters & param)
68//   {
69//     log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
70//     test();
71//     log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
72//   };
73
74#undef  FUNCTION
75#define FUNCTION "Register_Address_Translation_unit::~Parameters"
76  Parameters::~Parameters (void) 
77  {
78    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
79    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
80  };
81
82#undef  FUNCTION
83#define FUNCTION "Register_Address_Translation_unit::copy"
84  void Parameters::copy (void) 
85  {
86    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
87    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
88  };
89
90}; // end namespace register_address_translation_unit
91}; // end namespace register_translation_unit
92}; // end namespace rename_unit
93}; // end namespace ooo_engine
94}; // end namespace multi_ooo_engine
95}; // end namespace core
96
97}; // end namespace behavioural
98}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.