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

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

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1/*
2 * $Id: Parameters.cpp 88 2008-12-10 18:31:39Z 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_context_id         = log2(nb_context         );
61        _size_front_end_id       = log2(nb_front_end       );
62        _size_ooo_engine_id      = log2(nb_ooo_engine      );
63        _size_rob_ptr            = log2(nb_packet          );
64        _size_general_register   = log2(nb_general_register);
65        _size_special_register   = log2(nb_special_register);
66        _size_general_data       = size_general_data  ;
67        _size_special_data       = size_special_data  ;
68       
69        _have_port_context_id    = _size_context_id    > 0;
70        _have_port_front_end_id  = _size_front_end_id  > 0;
71        _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
72        _have_port_rob_ptr       = _size_rob_ptr       > 0;
73
74        copy();
75      }
76
77    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End");
78  };
79 
80// #undef  FUNCTION
81// #define FUNCTION "Execution_unit_to_Write_unit::Parameters (copy)"
82//   Parameters::Parameters (Parameters & param) 
83//   {
84//     log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
85
86//     test();
87//     log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End");
88//   };
89
90#undef  FUNCTION
91#define FUNCTION "Execution_unit_to_Write_unit::~Parameters"
92  Parameters::~Parameters (void) 
93  {
94    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
95    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End");
96  };
97
98#undef  FUNCTION
99#define FUNCTION "Execution_unit_to_Write_unit::copy"
100  void Parameters::copy (void) 
101  {
102    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
103    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End");
104  };
105
106}; // end namespace execution_unit_to_write_unit
107}; // end namespace network
108}; // end namespace execute_loop
109}; // end namespace multi_execute_loop
110}; // end namespace core
111
112}; // end namespace behavioural
113}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.