source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters.cpp @ 97

Last change on this file since 97 was 97, checked in by rosiere, 15 years ago

1) Update Prediction Table : statistics
2) Size instruction address on 30 bits
3) Change Log File
4) Add debug_level in simulation configuration file

  • Property svn:keywords set to Id
File size: 6.5 KB
Line 
1/*
2 * $Id: Parameters.cpp 97 2008-12-19 15:34:00Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Parameters.h"
9
10namespace morpheo {
11namespace behavioural {
12namespace core {
13namespace multi_execute_loop {
14namespace execute_loop {
15namespace multi_execute_unit {
16namespace execute_unit {
17namespace functionnal_unit {
18
19
20#undef  FUNCTION
21#define FUNCTION "Functionnal_unit::Parameters"
22  Parameters::Parameters (uint32_t           nb_context         ,
23                          uint32_t           nb_front_end       ,
24                          uint32_t           nb_ooo_engine      ,
25                          uint32_t           nb_packet          ,
26                          uint32_t           size_general_data  ,
27                          uint32_t           nb_general_register,
28                          uint32_t           size_special_data  ,
29                          uint32_t           nb_special_register,
30                          uint32_t           size_store_queue   ,
31                          uint32_t           size_load_queue    ,
32                          execute_timing_t** timing             ,
33                          morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void),
34                          bool               is_toplevel)
35  {
36    log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
37
38    _nb_context              = nb_context            ;
39    _nb_front_end            = nb_front_end          ;
40    _nb_ooo_engine           = nb_ooo_engine         ;
41    _nb_packet               = nb_packet             ;
42//  _size_general_data       = size_general_data     ;
43//  _size_special_data       = size_special_data     ;
44//  _nb_general_register     = nb_general_register   ;
45//  _nb_special_register     = nb_special_register   ;
46//  _size_store_queue        = size_store_queue      ;
47//  _size_load_queue         = size_load_queue       ;
48
49//  _size_context_id         = log2(nb_context         );
50//  _size_front_end_id       = log2(nb_front_end       );
51//  _size_ooo_engine_id      = log2(nb_ooo_engine      );
52//  _size_packet_id          = log2(nb_packet          );
53//  _size_general_register   = log2(nb_general_register);
54//  _size_special_register   = log2(nb_special_register);
55
56//  _have_port_context_id    = _size_context_id    > 0;
57//  _have_port_front_end_id  = _size_front_end_id  > 0;
58//  _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
59//  _have_port_packet_id     = _size_packet_id     > 0;
60//  _have_port_load_queue_ptr= _size_load_queue    > 1;
61
62    _have_groupe_MAC         = ( (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MAC  ]._latence > 0) or
63                                 (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MACRC]._latence > 0) or
64                                 (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MSB  ]._latence > 0));
65
66    _timing                  = timing;
67
68    if (get_custom_information == NULL)
69      _get_custom_information = &(morpheo::behavioural::custom::default_get_custom_information);
70    else
71      _get_custom_information = get_custom_information;
72
73    test();
74
75    if (is_toplevel)
76      {
77        _size_instruction_address= size_general_data-2;
78        _size_context_id         = log2(nb_context         );
79        _size_front_end_id       = log2(nb_front_end       );
80        _size_ooo_engine_id      = log2(nb_ooo_engine      );
81        _size_rob_ptr            = log2(nb_packet          );
82        _size_general_register   = log2(nb_general_register);
83        _size_special_register   = log2(nb_special_register);
84
85        _size_general_data       = size_general_data     ;
86        _size_special_data       = size_special_data     ;
87        _size_general_register   = log2(nb_general_register);
88        _size_special_register   = log2(nb_special_register);
89
90        _size_load_queue_ptr     = log2(size_load_queue );
91        _size_store_queue_ptr    = log2(size_store_queue);
92   
93        _have_port_context_id    = _size_context_id    > 0;
94        _have_port_front_end_id  = _size_front_end_id  > 0;
95        _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
96        _have_port_rob_ptr       = _size_rob_ptr       > 0;
97        _have_port_load_queue_ptr= _size_load_queue_ptr> 0;
98
99        copy();
100      }
101
102    log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
103  };
104 
105// #undef  FUNCTION
106// #define FUNCTION "Functionnal_unit::Parameters (copy)"
107//   Parameters::Parameters (Parameters & param):
108//     _nb_context              (param._nb_context             ),
109//     _nb_front_end            (param._nb_front_end           ),
110//     _nb_ooo_engine           (param._nb_ooo_engine          ),
111//     _nb_packet               (param._nb_packet              ),
112//     _size_general_data       (param._size_general_data      ),
113//     _nb_general_register     (param._nb_general_register    ),
114//     _size_special_data       (param._size_special_data      ),
115//     _nb_special_register     (param._nb_special_register    ),
116//     _size_store_queue        (param._size_store_queue       ),
117//     _size_load_queue         (param._size_load_queue        ),
118
119//     _size_context_id         (param._size_context_id        ),
120//     _size_front_end_id       (param._size_front_end_id      ),
121//     _size_ooo_engine_id      (param._size_ooo_engine_id     ),
122//     _size_packet_id          (param._size_packet_id         ),
123//     _size_general_register   (param._size_general_register  ),
124//     _size_special_register   (param._size_special_register  ),
125
126//     _have_port_context_id    (param._have_port_context_id   ),
127//     _have_port_front_end_id  (param._have_port_front_end_id ),
128//     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
129//     _have_port_packet_id     (param._have_port_packet_id    ),
130//     _have_port_load_queue_ptr(param._have_port_load_queue_ptr),
131
132//     _have_groupe_MAC         (param._have_groupe_MAC        )
133//   {
134//     log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
135
136//     _timing                 = param._timing;
137//     _get_custom_information = param._get_custom_information;
138
139//     test();
140//     log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
141//   };
142
143#undef  FUNCTION
144#define FUNCTION "Functionnal_unit::~Parameters"
145  Parameters::~Parameters (void)
146  {
147    log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
148    log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
149  };
150
151#undef  FUNCTION
152#define FUNCTION "Functionnal_unit::copy"
153  void Parameters::copy (void)
154  {
155    log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
156    log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
157  };
158
159}; // end namespace functionnal_unit
160}; // end namespace execute_unit
161}; // end namespace multi_execute_unit
162}; // end namespace execute_loop
163}; // end namespace multi_execute_loop
164}; // end namespace core
165
166}; // end namespace behavioural
167}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.