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

Last change on this file since 76 was 76, checked in by rosiere, 16 years ago

Add new component : Read_unit (no tested)
Change functionnal_unit : now use type and operation to execute the good function
Change New_Component's script

File size: 6.1 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_operation       ,
30                          uint32_t nb_type            ,
31                          uint32_t nb_gpr_write       ,
32                          uint32_t nb_spr_write       ,
33                          uint32_t size_store_queue   ,
34                          uint32_t size_load_queue    ):
35    _size_queue            (size_queue           ),
36    _nb_context            (nb_context           ),
37    _nb_front_end          (nb_front_end         ),
38    _nb_ooo_engine         (nb_ooo_engine        ),
39    _nb_packet             (nb_packet            ),
40    _size_general_data     (size_general_data    ),
41    _size_special_data     (size_special_data    ),
42    _nb_general_register   (nb_general_register  ),
43    _nb_special_register   (nb_special_register  ),
44    _nb_operation          (nb_operation         ),
45    _nb_type               (nb_type              ),
46    _nb_gpr_write          (nb_gpr_write         ),
47    _nb_spr_write          (nb_spr_write         ),
48    _size_store_queue      (size_store_queue     ),
49    _size_load_queue       (size_load_queue      ),
50
51    _nb_gpr_read           (2                    ),
52    _nb_spr_read           (1                    ),
53    _size_context_id       (static_cast<uint32_t>(log2(_nb_context         ))),
54    _size_front_end_id     (static_cast<uint32_t>(log2(_nb_front_end       ))),
55    _size_ooo_engine_id    (static_cast<uint32_t>(log2(_nb_ooo_engine      ))),
56    _size_rob_id           (static_cast<uint32_t>(log2(_nb_packet          ))),
57    _size_general_register (static_cast<uint32_t>(log2(_nb_general_register))),
58    _size_special_register (static_cast<uint32_t>(log2(_nb_special_register))),
59    _size_operation        (static_cast<uint32_t>(log2(_nb_operation       ))),
60    _size_type             (static_cast<uint32_t>(log2(_nb_type            ))),
61
62    _have_port_context_id    (_size_context_id    > 0),
63    _have_port_front_end_id  (_size_front_end_id  > 0),
64    _have_port_ooo_engine_id (_size_ooo_engine_id > 0),
65    _have_port_rob_id        (_size_rob_id        > 0),
66
67    _size_internal_queue     (  _size_context_id       //_context_id   
68                              + _size_front_end_id     //_front_end_id
69                              + _size_ooo_engine_id    //_ooo_engine_id
70                              + _size_rob_id           //_rob_id       
71                              + _size_operation        //_operation   
72                              + _size_type             //_type         
73                              + log2(_size_store_queue)//_store_queue_ptr_write
74                              + log2(_size_load_queue )//_load_queue_ptr_write
75                              + 1                      //_has_immediat
76                              + _size_general_data     //_immediat     
77                              + 1                      //_read_ra     
78                              + _size_general_register //_num_reg_ra   
79                              + 1                      //_read_rb     
80                              + _size_general_register //_num_reg_rb   
81                              + 1                      //_read_rc     
82                              + _size_special_register //_num_reg_rc   
83                              + 1                      //_write_rd     
84                              + _size_general_register //_num_reg_rd   
85                              + 1                      //_write_re     
86                              + _size_special_register //_num_reg_re   
87                                )
88                               
89
90  {
91    log_printf(FUNC,Read_queue,"Parameters","Begin");
92    test();
93    log_printf(FUNC,Read_queue,"Parameters","End");
94  };
95 
96  Parameters::Parameters (Parameters & param):
97    _size_queue            (param._size_queue            ),
98    _nb_context            (param._nb_context            ),
99    _nb_front_end          (param._nb_front_end          ),
100    _nb_ooo_engine         (param._nb_ooo_engine         ),
101    _nb_packet             (param._nb_packet             ),
102    _size_general_data     (param._size_general_data     ),
103    _size_special_data     (param._size_special_data     ),
104    _nb_general_register   (param._nb_general_register   ),
105    _nb_special_register   (param._nb_special_register   ),
106    _nb_operation          (param._nb_operation          ),
107    _nb_type               (param._nb_type               ),
108    _nb_gpr_write          (param._nb_gpr_write          ),
109    _nb_spr_write          (param._nb_spr_write          ),
110    _size_store_queue      (param._size_store_queue      ),
111    _size_load_queue       (param._size_load_queue       ),
112
113    _nb_gpr_read           (param._nb_gpr_read           ),
114    _nb_spr_read           (param._nb_spr_read           ),
115    _size_context_id       (param._size_context_id       ),
116    _size_front_end_id     (param._size_front_end_id     ),
117    _size_ooo_engine_id    (param._size_ooo_engine_id    ),
118    _size_rob_id           (param._size_rob_id           ),
119    _size_general_register (param._size_general_register ),
120    _size_special_register (param._size_special_register ),
121    _size_operation        (param._size_operation        ),
122    _size_type             (param._size_type             ),
123
124    _have_port_context_id    (param._have_port_context_id   ),
125    _have_port_front_end_id  (param._have_port_front_end_id ),
126    _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
127    _have_port_rob_id        (param._have_port_rob_id       ),
128
129    _size_internal_queue     (param._size_internal_queue    )
130  {
131    log_printf(FUNC,Read_queue,"Parameters (copy)","Begin");
132    test();
133    log_printf(FUNC,Read_queue,"Parameters (copy)","End");
134  };
135
136  Parameters::~Parameters () 
137  {
138    log_printf(FUNC,Read_queue,"~Parameters","Begin");
139    log_printf(FUNC,Read_queue,"~Parameters","End");
140  };
141
142}; // end namespace read_queue
143}; // end namespace read_unit
144}; // end namespace multi_read_unit
145}; // end namespace execute_loop
146}; // end namespace multi_execute_loop
147}; // end namespace core
148
149}; // end namespace behavioural
150}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.