source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Parameters.cpp @ 88

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

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 2.8 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_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Parameters.h"
9#include "Common/include/Max.h"
10namespace morpheo {
11namespace behavioural {
12namespace core {
13namespace multi_ooo_engine {
14namespace ooo_engine {
15namespace rename_unit {
16namespace register_translation_unit {
17namespace register_address_translation_unit {
18
19
20#undef  FUNCTION
21#define FUNCTION "Register_Address_Translation_unit::Parameters"
22  Parameters::Parameters (uint32_t   nb_front_end       ,
23                          uint32_t * nb_context         ,
24                          uint32_t   nb_general_register,
25                          uint32_t   nb_special_register,
26                          uint32_t   nb_inst_insert     ,
27                          uint32_t   nb_inst_retire     ,
28                          bool       is_toplevel)
29  {
30    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
31
32    _nb_front_end           = nb_front_end       ;
33    _nb_context             = nb_context         ;
34    _nb_general_register    = nb_general_register;
35    _nb_special_register    = nb_special_register;
36    _nb_inst_insert         = nb_inst_insert     ;
37    _nb_inst_retire         = nb_inst_retire     ;
38
39    test();
40
41    if (is_toplevel)
42      {
43        _size_front_end_id      = log2(nb_front_end       );
44        _size_context_id        = log2(max<uint32_t>(nb_context, nb_front_end));
45        _size_general_register  = log2(nb_general_register);
46        _size_special_register  = log2(nb_special_register);
47   
48        _have_port_front_end_id = _size_front_end_id>0;
49        _have_port_context_id   = _size_context_id  >0;
50       
51        copy();
52      }
53
54    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
55  };
56 
57// #undef  FUNCTION
58// #define FUNCTION "Register_Address_Translation_unit::Parameters (copy)"
59//   Parameters::Parameters (Parameters & param)
60//   {
61//     log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
62//     test();
63//     log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
64//   };
65
66#undef  FUNCTION
67#define FUNCTION "Register_Address_Translation_unit::~Parameters"
68  Parameters::~Parameters (void) 
69  {
70    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
71    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
72  };
73
74#undef  FUNCTION
75#define FUNCTION "Register_Address_Translation_unit::copy"
76  void Parameters::copy (void) 
77  {
78    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
79    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
80  };
81
82}; // end namespace register_address_translation_unit
83}; // end namespace register_translation_unit
84}; // end namespace rename_unit
85}; // end namespace ooo_engine
86}; // end namespace multi_ooo_engine
87}; // end namespace core
88
89}; // end namespace behavioural
90}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.