source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/src/Parameters.cpp @ 120

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

1) Context_state : Add statistics
2) Add configuration with multi front_end
3) Add optionnal pid at log filename

  • Property svn:keywords set to Id
File size: 4.3 KB
Line 
1/*
2 * $Id: Parameters.cpp 120 2009-05-26 19:01:47Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Parameters.h"
9#include "Common/include/Max.h"
10namespace morpheo {
11namespace behavioural {
12namespace core {
13namespace multi_execute_loop {
14namespace execute_loop {
15namespace network {
16namespace execution_unit_to_write_unit {
17
18
19#undef  FUNCTION
20#define FUNCTION "Execution_unit_to_Write_unit::Parameters"
21  Parameters::Parameters (uint32_t    nb_execute_unit              ,
22                          uint32_t  * nb_execute_unit_port         ,//[nb_execute_unit]
23                          uint32_t    nb_write_unit                ,
24                          uint32_t    nb_context                   ,
25                          uint32_t    nb_front_end                 ,
26                          uint32_t    nb_ooo_engine                ,
27                          uint32_t    nb_packet                    ,
28                          uint32_t    size_general_data            ,
29                          uint32_t    size_special_data            ,
30                          uint32_t    nb_general_register          ,
31                          uint32_t    nb_special_register          ,
32                          Tpriority_t priority                     ,
33                          bool    *** table_routing                ,//[nb_execute_unit][nb_execute_unit_port][nb_write_unit]
34                          bool     ** table_thread                 ,//[nb_write_unit][nb_thread]                           
35                          bool      * num_thread_valid             ,//[nb_thread]
36                          bool        is_toplevel                  )
37  {
38    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
39
40    _nb_execute_unit         = nb_execute_unit     ;
41    _nb_execute_unit_port    = nb_execute_unit_port;
42    _nb_write_unit           = nb_write_unit       ;
43    _nb_context              = nb_context          ;
44    _nb_front_end            = nb_front_end        ;
45    _nb_ooo_engine           = nb_ooo_engine       ;
46    _nb_packet               = nb_packet           ;
47    _nb_general_register     = nb_general_register ;
48    _nb_special_register     = nb_special_register ;
49    _priority                = priority            ;
50    _table_routing           = table_routing       ;
51    _table_thread            = table_thread        ;
52    _num_thread_valid        = num_thread_valid    ;
53
54    _max_nb_execute_unit_port= max<uint32_t>(_nb_execute_unit_port, _nb_execute_unit);
55
56    _nb_thread               = get_nb_thread (nb_context, nb_front_end, nb_ooo_engine);
57
58    test();
59
60    if (is_toplevel)
61      {
62        _size_instruction_address= size_general_data-2;
63        _size_context_id         = log2(nb_context         );
64        _size_front_end_id       = log2(nb_front_end       );
65        _size_ooo_engine_id      = log2(nb_ooo_engine      );
66        _size_rob_ptr            = log2(nb_packet          );
67        _size_general_register   = log2(nb_general_register);
68        _size_special_register   = log2(nb_special_register);
69        _size_general_data       = size_general_data  ;
70        _size_special_data       = size_special_data  ;
71       
72        _have_port_context_id    = _size_context_id    > 0;
73        _have_port_front_end_id  = _size_front_end_id  > 0;
74        _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
75        _have_port_rob_ptr       = _size_rob_ptr       > 0;
76
77        copy();
78      }
79
80    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End");
81  };
82 
83// #undef  FUNCTION
84// #define FUNCTION "Execution_unit_to_Write_unit::Parameters (copy)"
85//   Parameters::Parameters (Parameters & param) 
86//   {
87//     log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
88
89//     test();
90//     log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End");
91//   };
92
93#undef  FUNCTION
94#define FUNCTION "Execution_unit_to_Write_unit::~Parameters"
95  Parameters::~Parameters (void) 
96  {
97    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
98    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End");
99  };
100
101#undef  FUNCTION
102#define FUNCTION "Execution_unit_to_Write_unit::copy"
103  void Parameters::copy (void) 
104  {
105    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
106    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End");
107  };
108
109}; // end namespace execution_unit_to_write_unit
110}; // end namespace network
111}; // end namespace execute_loop
112}; // end namespace multi_execute_loop
113}; // end namespace core
114
115}; // end namespace behavioural
116}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.