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

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

1) Update Prediction Table : statistics
2) Size instruction address on 30 bits
3) Change Log File
4) Add debug_level in simulation configuration file

  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1/*
2 * $Id: Parameters.cpp 97 2008-12-19 15:34:00Z 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        is_toplevel                  )
36  {
37    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
38
39    _nb_execute_unit         = nb_execute_unit     ;
40    _nb_execute_unit_port    = nb_execute_unit_port;
41    _nb_write_unit           = nb_write_unit       ;
42    _nb_context              = nb_context          ;
43    _nb_front_end            = nb_front_end        ;
44    _nb_ooo_engine           = nb_ooo_engine       ;
45    _nb_packet               = nb_packet           ;
46    _nb_general_register     = nb_general_register ;
47    _nb_special_register     = nb_special_register ;
48    _priority                = priority            ;
49    _table_routing           = table_routing       ;
50    _table_thread            = table_thread        ;
51
52    _max_nb_execute_unit_port= max<uint32_t>(_nb_execute_unit_port, _nb_execute_unit);
53
54    _nb_thread               = get_nb_thread (nb_context, nb_front_end, nb_ooo_engine);
55
56    test();
57
58    if (is_toplevel)
59      {
60        _size_instruction_address= size_general_data-2;
61        _size_context_id         = log2(nb_context         );
62        _size_front_end_id       = log2(nb_front_end       );
63        _size_ooo_engine_id      = log2(nb_ooo_engine      );
64        _size_rob_ptr            = log2(nb_packet          );
65        _size_general_register   = log2(nb_general_register);
66        _size_special_register   = log2(nb_special_register);
67        _size_general_data       = size_general_data  ;
68        _size_special_data       = size_special_data  ;
69       
70        _have_port_context_id    = _size_context_id    > 0;
71        _have_port_front_end_id  = _size_front_end_id  > 0;
72        _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
73        _have_port_rob_ptr       = _size_rob_ptr       > 0;
74
75        copy();
76      }
77
78    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End");
79  };
80 
81// #undef  FUNCTION
82// #define FUNCTION "Execution_unit_to_Write_unit::Parameters (copy)"
83//   Parameters::Parameters (Parameters & param) 
84//   {
85//     log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
86
87//     test();
88//     log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End");
89//   };
90
91#undef  FUNCTION
92#define FUNCTION "Execution_unit_to_Write_unit::~Parameters"
93  Parameters::~Parameters (void) 
94  {
95    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
96    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End");
97  };
98
99#undef  FUNCTION
100#define FUNCTION "Execution_unit_to_Write_unit::copy"
101  void Parameters::copy (void) 
102  {
103    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
104    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End");
105  };
106
107}; // end namespace execution_unit_to_write_unit
108}; // end namespace network
109}; // end namespace execute_loop
110}; // end namespace multi_execute_loop
111}; // end namespace core
112
113}; // end namespace behavioural
114}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.