source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Parameters.cpp @ 98

Last change on this file since 98 was 98, checked in by rosiere, 15 years ago

1) Fix bug (read unit, RAT -> write in R0, SPR desallocation ...)
2) Change VHDL Execute_queue -> use Generic/Queue?
3) Complete document on VHDL generation
4) Add soc test

  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1/*
2 * $Id: Parameters.cpp 98 2008-12-31 10:18:08Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h"
9
10namespace morpheo {
11namespace behavioural {
12namespace core {
13namespace multi_execute_loop {
14namespace execute_loop {
15namespace multi_write_unit {
16namespace write_unit {
17namespace execute_queue {
18
19
20#undef  FUNCTION
21#define FUNCTION "Execute_queue::Parameters"
22  Parameters::Parameters (uint32_t size_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 size_special_data  ,
29                          bool     is_toplevel        )
30  {
31    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
32
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
39    test();
40
41    _size_internal_queue = 
42      (log2( nb_context   )      +
43       log2( nb_front_end )      +
44       log2( nb_ooo_engine)      +
45       log2( nb_packet    )      +     
46//      size_operation           +
47//      size_type                +
48        size_special_data        +
49       _size_exception           +
50       1                         +
51        size_general_data        +
52        size_general_data
53       );
54
55    if (is_toplevel)
56      {
57        _size_instruction_address= size_general_data-2;
58        _size_context_id         = log2(_nb_context   );
59        _size_front_end_id       = log2(_nb_front_end );
60        _size_ooo_engine_id      = log2(_nb_ooo_engine);
61        _size_rob_ptr            = log2(_nb_packet    );
62        _size_general_data       = size_general_data;
63        _size_special_data       = size_special_data;
64        _size_instruction_address= size_general_data;
65
66        _have_port_context_id    = _size_context_id    > 0;
67        _have_port_front_end_id  = _size_front_end_id  > 0;
68        _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
69        _have_port_rob_ptr       = _size_rob_ptr       > 0;
70
71        copy();
72      }
73
74    log_printf(FUNC,Execute_queue,FUNCTION,"End");
75  };
76 
77// #undef  FUNCTION
78// #define FUNCTION "Execute_queue::Parameters (copy)"
79//   Parameters::Parameters (Parameters & param):
80//     _size_queue              (param._size_queue             ),
81//     _nb_context              (param._nb_context             ),
82//     _nb_front_end            (param._nb_front_end           ),
83//     _nb_ooo_engine           (param._nb_ooo_engine          ),
84//     _nb_packet               (param._nb_packet              ),
85//     _size_general_data       (param._size_general_data      ),
86//     _size_special_data       (param._size_special_data      ),
87
88//     _size_context_id         (param._size_context_id        ),
89//     _size_front_end_id       (param._size_front_end_id      ),
90//     _size_ooo_engine_id      (param._size_ooo_engine_id     ),
91//     _size_packet_id          (param._size_packet_id         ),
92
93//     _have_port_context_id    (param._have_port_context_id   ),
94//     _have_port_front_end_id  (param._have_port_front_end_id ),
95//     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
96//     _have_port_packet_id     (param._have_port_packet_id    )
97//   {
98//     log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
99//     test();
100//     log_printf(FUNC,Execute_queue,FUNCTION,"End");
101//   };
102
103#undef  FUNCTION
104#define FUNCTION "Execute_queue::~Parameters"
105  Parameters::~Parameters (void)
106  {
107    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
108    log_printf(FUNC,Execute_queue,FUNCTION,"End");
109  };
110
111#undef  FUNCTION
112#define FUNCTION "Execute_queue::copy"
113  void Parameters::copy (void)
114  {
115    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
116    log_printf(FUNC,Execute_queue,FUNCTION,"End");
117  };
118
119}; // end namespace execute_queue
120}; // end namespace write_unit
121}; // end namespace multi_write_unit
122}; // end namespace execute_loop
123}; // end namespace multi_execute_loop
124}; // end namespace core
125
126}; // end namespace behavioural
127}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.