source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Parameters.cpp @ 146

Last change on this file since 146 was 146, checked in by rosiere, 13 years ago

1) Integration of RegisterFile_Internal_Banked in RegisterFile?
2) Erase "read_write" interface in RegisterFile_Monolithic component
3) Add smith predictor parameters in Load_store_pointer_unit.
4) Fix not statistics flags

  • Property svn:keywords set to Id
File size: 4.4 KB
Line 
1/*
2 * $Id: Parameters.cpp 146 2011-02-01 20:57:54Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_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 load_store_pointer_unit {
18
19
20#undef  FUNCTION
21#define FUNCTION "Load_Store_pointer_unit::Parameters"
22  Parameters::Parameters (uint32_t    nb_front_end                    ,
23                          uint32_t  * nb_context                      ,
24//                        uint32_t    size_front_end_id               ,
25//                        uint32_t    size_context_id                 ,
26                          uint32_t    nb_load_store_queue             ,
27                          uint32_t  * size_store_queue                ,
28                          uint32_t  * size_load_queue                 ,
29                          Tpredictor_t   * speculative_commit_predictor_scheme,//[nb_load_store_queue]
30                          uint32_t      ** lsu_pht_size_counter               ,//[nb_load_store_queue][1]
31                          uint32_t      ** lsu_pht_nb_counter                 ,//[nb_load_store_queue][1]
32                          Tpht_scheme_t ** lsu_pht_scheme                     ,//[nb_load_store_queue][1]
33                          uint32_t  * nb_inst_memory                  ,
34                          uint32_t ** link_load_store_unit_with_thread,
35                          uint32_t    nb_inst_insert                  ,
36                          uint32_t    nb_inst_retire                  ,
37                          bool        is_toplevel
38                          )
39  {
40    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin");
41
42    _nb_front_end                     = nb_front_end                    ;
43    _nb_context                       = nb_context                      ;
44    _nb_load_store_queue              = nb_load_store_queue             ;
45    _size_store_queue                 = size_store_queue                ;
46    _size_load_queue                  = size_load_queue                 ;
47    _speculative_commit_predictor_scheme = speculative_commit_predictor_scheme;
48    _lsu_pht_size_counter                = lsu_pht_size_counter               ;
49    _lsu_pht_nb_counter                  = lsu_pht_nb_counter                 ;
50    _lsu_pht_scheme                      = lsu_pht_scheme                     ;
51    _nb_inst_memory                   = nb_inst_memory                  ;
52    _link_load_store_unit_with_thread = link_load_store_unit_with_thread;
53    _nb_inst_insert                   = nb_inst_insert                  ;
54    _nb_inst_retire                   = nb_inst_retire                  ;
55   
56    test();
57
58    _max_size_store_queue             = max<uint32_t>(_size_store_queue,_nb_load_store_queue);
59    _max_size_load_queue              = max<uint32_t>(_size_load_queue ,_nb_load_store_queue);
60
61    if (is_toplevel)
62      {
63        _size_front_end_id                = log2(_nb_front_end);
64        _size_context_id                  = log2(max<uint32_t>(_nb_context,_nb_front_end));
65        _size_store_queue_ptr             = log2(max<uint32_t>(size_store_queue, nb_load_store_queue));
66        _size_load_queue_ptr              = log2(max<uint32_t>(size_load_queue,  nb_load_store_queue));
67
68        _have_port_front_end_id           = (_size_front_end_id   > 0);
69        _have_port_context_id             = (_size_context_id     > 0);
70        _have_port_load_queue_ptr         = (_size_load_queue_ptr > 0);
71   
72        copy();
73      }
74
75    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End");
76  };
77 
78// #undef  FUNCTION
79// #define FUNCTION "Load_Store_pointer_unit::Parameters (copy)"
80//   Parameters::Parameters (Parameters & param)
81//   {
82//     log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin");
83//     test();
84//     log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End");
85//   };
86
87#undef  FUNCTION
88#define FUNCTION "Load_Store_pointer_unit::~Parameters"
89  Parameters::~Parameters (void) 
90  {
91    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin");
92    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End");
93  };
94
95#undef  FUNCTION
96#define FUNCTION "Load_Store_pointer_unit::copy"
97  void Parameters::copy (void) 
98  {
99    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin");
100    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End");
101  };
102
103}; // end namespace load_store_pointer_unit
104}; // end namespace rename_unit
105}; // end namespace ooo_engine
106}; // end namespace multi_ooo_engine
107}; // end namespace core
108
109}; // end namespace behavioural
110}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.