source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Parameters.cpp @ 77

Last change on this file since 77 was 77, checked in by rosiere, 16 years ago
  • Add two component :
    • network between read unit and execute unit
    • network between execute unit and write unit
  • remove parameters "nb_operation" and "nb_type"
  • in write_queue add the special case : load_speculative
File size: 5.6 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Parameters.h"
9
10namespace morpheo {
11namespace behavioural {
12namespace core {
13namespace multi_execute_loop {
14namespace execute_loop {
15namespace multi_read_unit {
16namespace read_unit {
17namespace read_queue {
18
19
20  Parameters::Parameters (uint32_t size_queue         ,
21                          uint32_t nb_context         ,
22                          uint32_t nb_front_end       ,
23                          uint32_t nb_ooo_engine      ,
24                          uint32_t nb_packet          ,
25                          uint32_t size_general_data  ,
26                          uint32_t size_special_data  ,
27                          uint32_t nb_general_register,
28                          uint32_t nb_special_register,
29                          uint32_t nb_gpr_write       ,
30                          uint32_t nb_spr_write       ,
31                          uint32_t size_store_queue   ,
32                          uint32_t size_load_queue    ):
33    _size_queue            (size_queue           ),
34    _nb_context            (nb_context           ),
35    _nb_front_end          (nb_front_end         ),
36    _nb_ooo_engine         (nb_ooo_engine        ),
37    _nb_packet             (nb_packet            ),
38    _size_general_data     (size_general_data    ),
39    _size_special_data     (size_special_data    ),
40    _nb_general_register   (nb_general_register  ),
41    _nb_special_register   (nb_special_register  ),
42    _nb_gpr_write          (nb_gpr_write         ),
43    _nb_spr_write          (nb_spr_write         ),
44    _size_store_queue      (size_store_queue     ),
45    _size_load_queue       (size_load_queue      ),
46
47    _nb_gpr_read           (2                    ),
48    _nb_spr_read           (1                    ),
49    _size_context_id       (static_cast<uint32_t>(log2(_nb_context         ))),
50    _size_front_end_id     (static_cast<uint32_t>(log2(_nb_front_end       ))),
51    _size_ooo_engine_id    (static_cast<uint32_t>(log2(_nb_ooo_engine      ))),
52    _size_rob_id           (static_cast<uint32_t>(log2(_nb_packet          ))),
53    _size_general_register (static_cast<uint32_t>(log2(_nb_general_register))),
54    _size_special_register (static_cast<uint32_t>(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_rob_id        (_size_rob_id        > 0),
60
61    _size_internal_queue     (  _size_context_id       //_context_id   
62                              + _size_front_end_id     //_front_end_id
63                              + _size_ooo_engine_id    //_ooo_engine_id
64                              + _size_rob_id           //_rob_id       
65                              + _size_operation        //_operation   
66                              + _size_type             //_type         
67                              + log2(_size_store_queue)//_store_queue_ptr_write
68                              + log2(_size_load_queue )//_load_queue_ptr_write
69                              + 1                      //_has_immediat
70                              + _size_general_data     //_immediat     
71                              + 1                      //_read_ra     
72                              + _size_general_register //_num_reg_ra   
73                              + 1                      //_read_rb     
74                              + _size_general_register //_num_reg_rb   
75                              + 1                      //_read_rc     
76                              + _size_special_register //_num_reg_rc   
77                              + 1                      //_write_rd     
78                              + _size_general_register //_num_reg_rd   
79                              + 1                      //_write_re     
80                              + _size_special_register //_num_reg_re   
81                                )
82                               
83
84  {
85    log_printf(FUNC,Read_queue,"Parameters","Begin");
86    test();
87    log_printf(FUNC,Read_queue,"Parameters","End");
88  };
89 
90  Parameters::Parameters (Parameters & param):
91    _size_queue            (param._size_queue            ),
92    _nb_context            (param._nb_context            ),
93    _nb_front_end          (param._nb_front_end          ),
94    _nb_ooo_engine         (param._nb_ooo_engine         ),
95    _nb_packet             (param._nb_packet             ),
96    _size_general_data     (param._size_general_data     ),
97    _size_special_data     (param._size_special_data     ),
98    _nb_general_register   (param._nb_general_register   ),
99    _nb_special_register   (param._nb_special_register   ),
100    _nb_gpr_write          (param._nb_gpr_write          ),
101    _nb_spr_write          (param._nb_spr_write          ),
102    _size_store_queue      (param._size_store_queue      ),
103    _size_load_queue       (param._size_load_queue       ),
104
105    _nb_gpr_read           (param._nb_gpr_read           ),
106    _nb_spr_read           (param._nb_spr_read           ),
107    _size_context_id       (param._size_context_id       ),
108    _size_front_end_id     (param._size_front_end_id     ),
109    _size_ooo_engine_id    (param._size_ooo_engine_id    ),
110    _size_rob_id           (param._size_rob_id           ),
111    _size_general_register (param._size_general_register ),
112    _size_special_register (param._size_special_register ),
113
114    _have_port_context_id    (param._have_port_context_id   ),
115    _have_port_front_end_id  (param._have_port_front_end_id ),
116    _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
117    _have_port_rob_id        (param._have_port_rob_id       ),
118
119    _size_internal_queue     (param._size_internal_queue    )
120  {
121    log_printf(FUNC,Read_queue,"Parameters (copy)","Begin");
122    test();
123    log_printf(FUNC,Read_queue,"Parameters (copy)","End");
124  };
125
126  Parameters::~Parameters () 
127  {
128    log_printf(FUNC,Read_queue,"~Parameters","Begin");
129    log_printf(FUNC,Read_queue,"~Parameters","End");
130  };
131
132}; // end namespace read_queue
133}; // end namespace read_unit
134}; // end namespace multi_read_unit
135}; // end namespace execute_loop
136}; // end namespace multi_execute_loop
137}; // end namespace core
138
139}; // end namespace behavioural
140}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.