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

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

1) Stat List : scan all queue to find free register
2) Write_queue : test "genMealy" add bypass [0]
3) Functionnal_unit : add const parameters to add or not the pipeline_in
4) Load Store Unit : if load make an exception, free nb_check
5) Debug, change test to add model

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