source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/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: 4.4 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/Reexecute_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 reexecute_unit {
17
18
19#undef  FUNCTION
20#define FUNCTION "Reexecute_unit::Parameters"
21  Parameters::Parameters (uint32_t            size_context_id         ,
22                          uint32_t            size_front_end_id       ,
23                          uint32_t            size_packet_id          ,
24                          uint32_t            size_queue              ,
25                          uint32_t            nb_execute_loop         ,
26                          uint32_t          * nb_inst_execute         ,
27                          uint32_t            nb_inst_commit          ,
28                          uint32_t            nb_inst_reexecute       ,
29                          uint32_t            nb_execute_loop_select  ,
30                          Tpriority_t         priority_execute_loop   ,
31                          Tload_balancing_t   load_balancing          ,
32                          uint32_t            size_general_register_id,
33                          uint32_t            size_special_register_id,
34                          uint32_t            size_general_data       ,
35                          uint32_t            size_special_data       ,
36                          uint32_t            size_store_queue_ptr    ,
37                          uint32_t            size_load_queue_ptr     ,
38                          bool                is_toplevel)
39  {
40    log_begin(Reexecute_unit,FUNCTION);
41
42//  _size_context_id          = size_context_id         ;
43//  _size_front_end_id        = size_front_end_id       ;
44//  _size_packet_id           = size_packet_id          ;
45    _size_queue               = size_queue              ;
46    _nb_execute_loop          = nb_execute_loop         ;
47    _nb_inst_execute          = nb_inst_execute         ;
48    _nb_inst_commit           = nb_inst_commit          ;
49    _nb_inst_reexecute        = nb_inst_reexecute       ;
50    _nb_execute_loop_select   = nb_execute_loop_select  ;
51    _priority_execute_loop    = priority_execute_loop   ;
52    _load_balancing           = load_balancing          ;
53//  _size_general_register_id = size_general_register_id;
54//  _size_special_register_id = size_special_register_id;
55//  _size_general_data        = size_general_data       ;
56//  _size_special_data        = size_special_data       ;
57//  _size_store_queue_ptr     = size_store_queue_ptr    ;
58//  _size_load_queue_ptr      = size_load_queue_ptr     ;
59
60    _max_nb_inst_execute      = max<uint32_t>(_nb_inst_execute, _nb_execute_loop);
61    _nb_bank                  = _nb_inst_reexecute;
62    _size_bank                = _size_queue / _nb_bank;
63
64//  _have_port_context_id     = _size_context_id     > 0;
65//  _have_port_front_end_id   = _size_front_end_id   > 0;
66//  _have_port_packet_id      = _size_packet_id      > 0;
67//  _have_port_load_queue_ptr = _size_load_queue_ptr > 0;
68
69    test();
70
71    if (is_toplevel)
72      {
73        _size_context_id          = size_context_id         ;
74        _size_front_end_id        = size_front_end_id       ;
75        _size_rob_ptr             = size_packet_id          ;
76        _size_general_register    = size_general_register_id;
77        _size_special_register    = size_special_register_id;
78        _size_general_data        = size_general_data       ;
79        _size_special_data        = size_special_data       ;
80        _size_store_queue_ptr     = size_store_queue_ptr    ;
81        _size_load_queue_ptr      = size_load_queue_ptr     ;
82       
83        _have_port_context_id     = _size_context_id     > 0;
84        _have_port_front_end_id   = _size_front_end_id   > 0;
85        _have_port_rob_ptr        = _size_rob_ptr        > 0;
86        _have_port_load_queue_ptr = _size_load_queue_ptr > 0;
87
88        copy();
89      }
90
91    log_end(Reexecute_unit,FUNCTION);
92  };
93 
94// #undef  FUNCTION
95// #define FUNCTION "Reexecute_unit::Parameters (copy)"
96//   Parameters::Parameters (Parameters & param)
97//   {
98//     log_begin(Reexecute_unit,FUNCTION);
99//     test();
100//     log_end(Reexecute_unit,FUNCTION);
101//   };
102
103#undef  FUNCTION
104#define FUNCTION "Reexecute_unit::~Parameters"
105  Parameters::~Parameters (void) 
106  {
107    log_begin(Reexecute_unit,FUNCTION);
108    log_end(Reexecute_unit,FUNCTION);
109  };
110
111#undef  FUNCTION
112#define FUNCTION "Reexecute_unit::copy"
113  void Parameters::copy (void) 
114  {
115    log_begin(Reexecute_unit,FUNCTION);
116    log_end(Reexecute_unit,FUNCTION);
117  };
118
119}; // end namespace reexecute_unit
120}; // end namespace ooo_engine
121}; // end namespace multi_ooo_engine
122}; // end namespace core
123
124}; // end namespace behavioural
125}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.