source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_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.5 KB
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_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 load_store_unit {
18
19
20#undef  FUNCTION
21#define FUNCTION "Load_store_unit::Parameters"
22  Parameters::Parameters (uint32_t            size_store_queue       ,
23                          uint32_t            size_load_queue        ,
24                          uint32_t            size_speculative_access_queue,
25                          uint32_t            nb_port_check          ,
26                          Tspeculative_load_t speculative_load       ,
27                          uint32_t            nb_context             ,
28                          uint32_t            nb_front_end           ,
29                          uint32_t            nb_ooo_engine          ,
30                          uint32_t            nb_packet              ,
31                          uint32_t            size_general_data      ,
32                          uint32_t            nb_general_register    ):
33    _size_store_queue        (size_store_queue       ),
34    _size_load_queue         (size_load_queue        ),
35    _size_speculative_access_queue (size_speculative_access_queue),
36    _nb_port_check           (nb_port_check          ),
37    _speculative_load        (speculative_load       ),
38    _nb_context              (nb_context             ),
39    _nb_front_end            (nb_front_end           ),
40    _nb_ooo_engine           (nb_ooo_engine          ),
41    _nb_packet               (nb_packet              ),
42    _size_general_data       (size_general_data      ),
43    _nb_general_register     (nb_general_register    ),
44   
45    _size_address_store_queue              (log2(size_store_queue             )),
46    _size_address_load_queue               (log2(size_load_queue              )),
47    _size_address_speculative_access_queue (log2(size_speculative_access_queue)),
48
49    _size_context_id         (log2(nb_context         )),
50    _size_front_end_id       (log2(nb_front_end       )),
51    _size_ooo_engine_id      (log2(nb_ooo_engine      )),
52    _size_packet_id          (log2(nb_packet          )),
53    _size_general_register   (log2(nb_general_register)),
54    _size_dcache_context_id  (_size_context_id + _size_front_end_id + _size_ooo_engine_id),
55    _size_dcache_packet_id   ((log2((size_store_queue>size_load_queue)?size_store_queue:size_load_queue))+1),
56
57    _have_port_context_id        (_size_context_id   >0),
58    _have_port_front_end_id      (_size_front_end_id >0),
59    _have_port_ooo_engine_id     (_size_ooo_engine_id>0),
60    _have_port_packet_id         (_size_packet_id    >0),
61    _have_port_dcache_context_id (_size_dcache_context_id>0),
62
63    _mask_address_lsb            (gen_mask<Tdcache_address_t>(log2(size_general_data/8))),
64    _mask_address_msb            (gen_mask<Tdcache_address_t>(size_general_data) << log2(size_general_data/8))
65  {
66    log_printf(FUNC,Load_store_unit,FUNCTION,"Begin");
67    test();
68    log_printf(FUNC,Load_store_unit,FUNCTION,"End");
69  };
70 
71#undef  FUNCTION
72#define FUNCTION "Load_store_unit::Parameters (copy)"
73  Parameters::Parameters (Parameters & param):
74    _size_store_queue        (param._size_store_queue       ),
75    _size_load_queue         (param._size_load_queue        ),
76    _size_speculative_access_queue (param._size_speculative_access_queue),
77    _nb_port_check           (param._nb_port_check          ),
78    _speculative_load        (param._speculative_load       ),
79    _nb_context              (param._nb_context             ),
80    _nb_front_end            (param._nb_front_end           ),
81    _nb_ooo_engine           (param._nb_ooo_engine          ),
82    _nb_packet               (param._nb_packet              ),
83    _size_general_data       (param._size_general_data      ),
84    _nb_general_register     (param._nb_general_register    ),
85
86    _size_address_store_queue              (param._size_address_store_queue             ),
87    _size_address_load_queue               (param._size_address_load_queue              ),
88    _size_address_speculative_access_queue (param._size_address_speculative_access_queue),
89
90    _size_context_id         (param._size_context_id        ),
91    _size_front_end_id       (param._size_front_end_id      ),
92    _size_ooo_engine_id      (param._size_ooo_engine_id     ),
93    _size_packet_id          (param._size_packet_id         ),
94    _size_general_register   (param._size_general_register  ),
95    _size_dcache_context_id  (param._size_dcache_context_id ),
96    _size_dcache_packet_id   (param._size_dcache_packet_id  ),
97
98    _have_port_context_id    (param._have_port_context_id   ),
99    _have_port_front_end_id  (param._have_port_front_end_id ),
100    _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
101    _have_port_packet_id     (param._have_port_packet_id    ),
102
103    _have_port_dcache_context_id(param._have_port_dcache_context_id),
104
105    _mask_address_lsb        (param._mask_address_lsb),
106    _mask_address_msb        (param._mask_address_msb)
107  {
108    log_printf(FUNC,Load_store_unit,FUNCTION,"Begin");
109    test();
110    log_printf(FUNC,Load_store_unit,FUNCTION,"End");
111  };
112
113#undef  FUNCTION
114#define FUNCTION "Load_store_unit::~Parameters"
115  Parameters::~Parameters () 
116  {
117    log_printf(FUNC,Load_store_unit,FUNCTION,"Begin");
118    log_printf(FUNC,Load_store_unit,FUNCTION,"End");
119  };
120
121}; // end namespace load_store_unit
122}; // end namespace execute_unit
123}; // end namespace multi_execute_unit
124}; // end namespace execute_loop
125}; // end namespace multi_execute_loop
126}; // end namespace core
127
128}; // end namespace behavioural
129}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.