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

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

read_queue : systemC et vhdl ok !
queue : quelques petits modif pour avoir une queue de taille 1
nettoyage des fichiers *mkf*

File size: 5.7 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    _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_operation          (nb_operation         ),
43    _nb_type               (nb_type              ),
44    _nb_gpr_write          (nb_gpr_write         ),
45    _nb_spr_write          (nb_spr_write         ),
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    _size_operation        (static_cast<uint32_t>(log2(_nb_operation       ))),
56    _size_type             (static_cast<uint32_t>(log2(_nb_type            ))),
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_rob_id        (_size_rob_id        > 0),
62
63    _size_internal_queue     (  _size_context_id       //_context_id   
64                              + _size_front_end_id     //_front_end_id
65                              + _size_ooo_engine_id    //_ooo_engine_id
66                              + _size_rob_id           //_rob_id       
67                              + _size_operation        //_operation   
68                              + _size_type             //_type         
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_operation          (param._nb_operation          ),
101    _nb_type               (param._nb_type               ),
102    _nb_gpr_write          (param._nb_gpr_write          ),
103    _nb_spr_write          (param._nb_spr_write          ),
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    _size_operation        (param._size_operation        ),
114    _size_type             (param._size_type             ),
115
116    _have_port_context_id    (param._have_port_context_id   ),
117    _have_port_front_end_id  (param._have_port_front_end_id ),
118    _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
119    _have_port_rob_id        (param._have_port_rob_id       ),
120
121    _size_internal_queue     (param._size_internal_queue    )
122  {
123    log_printf(FUNC,Read_queue,"Parameters (copy)","Begin");
124    test();
125    log_printf(FUNC,Read_queue,"Parameters (copy)","End");
126  };
127
128  Parameters::~Parameters () 
129  {
130    log_printf(FUNC,Read_queue,"~Parameters","Begin");
131    log_printf(FUNC,Read_queue,"~Parameters","End");
132  };
133
134}; // end namespace read_queue
135}; // end namespace read_unit
136}; // end namespace multi_read_unit
137}; // end namespace execute_loop
138}; // end namespace multi_execute_loop
139}; // end namespace core
140
141}; // end namespace behavioural
142}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.