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

Last change on this file since 88 was 88, checked in by rosiere, 16 years ago

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1/*
2 * $Id: Parameters.cpp 88 2008-12-10 18:31:39Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/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 rename_select {
18
19
20#undef  FUNCTION
21#define FUNCTION "Rename_select::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          max_branch_speculated,
27                          uint32_t          size_general_data    ,
28                          uint32_t          nb_inst_rename       ,
29                          uint32_t *        nb_inst_decod        ,
30                          uint32_t          nb_front_end_select  ,
31                          Tpriority_t       priority             ,
32                          Tload_balancing_t load_balancing       ,
33                          bool              is_toplevel)
34  {
35    log_printf(FUNC,Rename_select,FUNCTION,"Begin");
36
37    _nb_front_end          = nb_front_end         ;
38    _nb_context            = nb_context           ;
39    _max_branch_speculated = max_branch_speculated;
40    _nb_inst_rename        = nb_inst_rename       ;
41    _nb_inst_decod         = nb_inst_decod        ;
42    _nb_front_end_select   = nb_front_end_select  ;
43    _priority              = priority             ;
44    _load_balancing        = load_balancing       ;
45
46    _max_nb_inst_decod     = max<uint32_t>(nb_inst_decod,nb_front_end);
47
48    test();
49
50    if (is_toplevel)
51      {
52        _size_general_data     = size_general_data    ;
53        _size_depth            = log2(max_branch_speculated);
54        _size_front_end_id     = log2(_nb_front_end);
55        _size_context_id       = log2(max<uint32_t>(_nb_context,_nb_front_end));
56       
57        _have_port_front_end_id= _size_front_end_id > 0;
58        _have_port_context_id  = _size_context_id   > 0;
59        _have_port_depth       = _size_depth        > 0;
60       
61        copy();
62      }
63
64    log_printf(FUNC,Rename_select,FUNCTION,"End");
65  };
66 
67// #undef  FUNCTION
68// #define FUNCTION "Rename_select::Parameters (copy)"
69//   Parameters::Parameters (Parameters & param)
70//   {
71//     log_printf(FUNC,Rename_select,FUNCTION,"Begin");
72//     test();
73//     log_printf(FUNC,Rename_select,FUNCTION,"End");
74//   };
75
76#undef  FUNCTION
77#define FUNCTION "Rename_select::~Parameters"
78  Parameters::~Parameters () 
79  {
80    log_printf(FUNC,Rename_select,FUNCTION,"Begin");
81    log_printf(FUNC,Rename_select,FUNCTION,"End");
82  };
83
84#undef  FUNCTION
85#define FUNCTION "Rename_select::copy"
86  void Parameters::copy (void) 
87  {
88    log_printf(FUNC,Rename_select,FUNCTION,"Begin");
89    log_printf(FUNC,Rename_select,FUNCTION,"End");
90  };
91
92}; // end namespace rename_select
93}; // end namespace rename_unit
94}; // end namespace ooo_engine
95}; // end namespace multi_ooo_engine
96}; // end namespace core
97
98}; // end namespace behavioural
99}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.