source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/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_Write_unit/Write_unit/include/Parameters.h"
9
10namespace morpheo {
11namespace behavioural {
12namespace core {
13namespace multi_execute_loop {
14namespace execute_loop {
15namespace multi_write_unit {
16namespace write_unit {
17
18
19#undef  FUNCTION
20#define FUNCTION "Write_unit::Parameters"
21  Parameters::Parameters (uint32_t size_write_queue   ,
22                          uint32_t size_execute_queue ,
23                          uint32_t nb_context         ,
24                          uint32_t nb_front_end       ,
25                          uint32_t nb_ooo_engine      ,
26                          uint32_t nb_packet          ,
27                          uint32_t size_general_data  ,
28                          uint32_t nb_general_register,
29                          uint32_t size_special_data  ,
30                          uint32_t nb_special_register,
31                          uint32_t nb_bypass_write    ):
32    _size_write_queue        (size_write_queue   ),
33    _size_execute_queue      (size_execute_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    _nb_general_register     (nb_general_register),
40    _size_special_data       (size_special_data  ),
41    _nb_special_register     (nb_special_register),
42    _nb_bypass_write         (nb_bypass_write    ),
43
44    _nb_gpr_write            (1),
45    _nb_spr_write            (1),
46
47    _size_context_id         (log2(_nb_context         )),
48    _size_front_end_id       (log2(_nb_front_end       )),
49    _size_ooo_engine_id      (log2(_nb_ooo_engine      )),
50    _size_packet_id          (log2(_nb_packet          )),
51    _size_general_register   (log2(_nb_general_register)),
52    _size_special_register   (log2(_nb_special_register)),
53
54    _have_component_execute_queue (_size_execute_queue > 0),
55    _have_port_context_id         (_size_context_id    > 0),
56    _have_port_front_end_id       (_size_front_end_id  > 0),
57    _have_port_ooo_engine_id      (_size_ooo_engine_id > 0),
58    _have_port_packet_id          (_size_packet_id     > 0)
59  {
60    log_printf(FUNC,Write_unit,FUNCTION,"Begin");
61
62    _param_write_queue  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue  ::Parameters(size_write_queue   ,
63                                                                                                                                                    nb_context         ,
64                                                                                                                                                    nb_front_end       ,
65                                                                                                                                                    nb_ooo_engine      ,
66                                                                                                                                                    nb_packet          ,
67                                                                                                                                                    size_general_data  ,
68                                                                                                                                                    nb_general_register,
69                                                                                                                                                    size_special_data  ,
70                                                                                                                                                    nb_special_register,
71                                                                                                                                                    nb_bypass_write    );
72   
73    if (_have_component_execute_queue)
74      _param_execute_queue  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters(size_execute_queue   ,
75                                                                                                                                                        nb_context         ,
76                                                                                                                                                        nb_front_end       ,
77                                                                                                                                                        nb_ooo_engine      ,
78                                                                                                                                                        nb_packet          ,
79                                                                                                                                                        size_general_data  ,
80                                                                                                                                                        size_special_data  );
81
82    test();
83
84    log_printf(FUNC,Write_unit,FUNCTION,"End");
85  };
86 
87#undef  FUNCTION
88#define FUNCTION "Write_unit::Parameters (copy)"
89  Parameters::Parameters (Parameters & param):
90    _size_write_queue        (param._size_write_queue       ),
91    _size_execute_queue      (param._size_execute_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    _nb_general_register     (param._nb_general_register    ),
98    _size_special_data       (param._size_special_data      ),
99    _nb_special_register     (param._nb_special_register    ),
100    _nb_bypass_write         (param._nb_bypass_write        ),
101
102    _nb_gpr_write            (param._nb_gpr_write           ),
103    _nb_spr_write            (param._nb_spr_write           ),
104
105    _size_context_id         (param._size_context_id        ),
106    _size_front_end_id       (param._size_front_end_id      ),
107    _size_ooo_engine_id      (param._size_ooo_engine_id     ),
108    _size_packet_id          (param._size_packet_id         ),
109    _size_general_register   (param._size_general_register  ),
110    _size_special_register   (param._size_special_register  ),
111
112    _have_component_execute_queue (param._have_component_execute_queue),
113    _have_port_context_id         (param._have_port_context_id        ),
114    _have_port_front_end_id       (param._have_port_front_end_id      ),
115    _have_port_ooo_engine_id      (param._have_port_ooo_engine_id     ),
116    _have_port_packet_id          (param._have_port_packet_id         )
117  {
118    log_printf(FUNC,Write_unit,FUNCTION,"Begin");
119   
120    _param_write_queue   = param._param_write_queue  ;
121    _param_execute_queue = param._param_execute_queue;
122
123    test();
124    log_printf(FUNC,Write_unit,FUNCTION,"End");
125  };
126
127#undef  FUNCTION
128#define FUNCTION "Write_unit::~Parameters"
129  Parameters::~Parameters () 
130  {
131    log_printf(FUNC,Write_unit,FUNCTION,"Begin");
132
133    delete _param_write_queue;
134
135    if (_have_component_execute_queue)
136      delete _param_execute_queue;
137
138    log_printf(FUNC,Write_unit,FUNCTION,"End");
139  };
140
141}; // end namespace write_unit
142}; // end namespace multi_write_unit
143}; // end namespace execute_loop
144}; // end namespace multi_execute_loop
145}; // end namespace core
146
147}; // end namespace behavioural
148}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.