source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/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.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/Issue_queue/include/Parameters.h"
9#include "Common/include/Max.h"
10
11namespace morpheo {
12namespace behavioural {
13namespace core {
14namespace multi_ooo_engine {
15namespace ooo_engine {
16namespace issue_queue {
17
18
19#undef  FUNCTION
20#define FUNCTION "Issue_queue::Parameters"
21  Parameters::Parameters (uint32_t          nb_context              ,
22                          uint32_t          nb_front_end            ,
23                          uint32_t          nb_rename_unit          ,
24                          uint32_t          size_queue              ,
25                          uint32_t          nb_bank                 ,
26                          uint32_t          size_packet             ,
27                          uint32_t          size_general_data       ,
28                          uint32_t          size_special_data       ,
29                          uint32_t          size_general_register   ,
30                          uint32_t          size_special_register   ,
31                          uint32_t          size_store_queue_ptr    ,
32                          uint32_t          size_load_queue_ptr     ,
33                          uint32_t          nb_inst_issue           ,
34                          uint32_t        * nb_inst_rename          ,
35                          uint32_t          nb_inst_reexecute       ,
36                          uint32_t          nb_rename_unit_select   ,
37                          Tpriority_t       priority                ,
38                          Tload_balancing_t load_balancing          ,
39                          bool           ** table_routing           ,
40                          bool           ** table_issue_type        ,
41                          bool              is_toplevel             )
42  {
43    log_begin(Issue_queue,FUNCTION);
44
45    _nb_context               = nb_context           ;
46    _nb_front_end             = nb_front_end         ;
47    _nb_rename_unit           = nb_rename_unit       ;
48    _size_queue               = size_queue           ;
49    _nb_bank                  = nb_bank              ;   
50    _nb_inst_issue            = nb_inst_issue        ;
51    _nb_inst_rename           = nb_inst_rename       ;
52    _nb_inst_reexecute        = nb_inst_reexecute    ;
53    _nb_rename_unit_select    = nb_rename_unit_select;
54    _priority                 = priority             ;
55    _load_balancing           = load_balancing       ;
56    _table_routing            = table_routing        ;
57    _table_issue_type         = table_issue_type     ;
58
59    _max_nb_inst_rename       = max<uint32_t>(_nb_inst_rename,_nb_rename_unit);
60    _nb_bank_select_out       = _nb_bank/nb_inst_issue;
61
62    _size_bank                = _size_queue / _nb_bank;
63   
64    test();
65
66    if (is_toplevel)
67      {
68        _size_context_id          = log2(nb_context  );
69        _size_front_end_id        = log2(nb_front_end);
70        _size_rob_ptr             = size_packet          ;
71        _size_general_data        = size_general_data    ;
72        _size_special_data        = size_special_data    ;
73        _size_general_register    = size_general_register;
74        _size_special_register    = size_special_register;
75        _size_store_queue_ptr     = size_store_queue_ptr ;
76        _size_load_queue_ptr      = size_load_queue_ptr  ;
77       
78        _have_port_context_id     = (_size_context_id     > 0);
79        _have_port_front_end_id   = (_size_front_end_id   > 0);
80        _have_port_rob_ptr        = (_size_rob_ptr        > 0);
81        _have_port_load_queue_ptr = (_size_load_queue_ptr > 0);
82       
83        copy();
84      }
85
86    log_end(Issue_queue,FUNCTION);
87  };
88 
89// #undef  FUNCTION
90// #define FUNCTION "Issue_queue::Parameters (copy)"
91//   Parameters::Parameters (Parameters & param)
92//   {
93//     log_begin(Issue_queue,FUNCTION);
94//     test();
95//     log_end(Issue_queue,FUNCTION);
96//   };
97
98#undef  FUNCTION
99#define FUNCTION "Issue_queue::~Parameters"
100  Parameters::~Parameters (void) 
101  {
102    log_begin(Issue_queue,FUNCTION);
103    log_end(Issue_queue,FUNCTION);
104  };
105
106#undef  FUNCTION
107#define FUNCTION "Issue_queue::copy"
108  void Parameters::copy (void) 
109  {
110    log_begin(Issue_queue,FUNCTION);
111    log_end(Issue_queue,FUNCTION);
112  };
113
114}; // end namespace issue_queue
115}; // end namespace ooo_engine
116}; // end namespace multi_ooo_engine
117}; // end namespace core
118
119}; // end namespace behavioural
120}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.