[78] | 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" |
---|
| 10 | namespace morpheo { |
---|
| 11 | namespace behavioural { |
---|
| 12 | namespace core { |
---|
| 13 | namespace multi_ooo_engine { |
---|
| 14 | namespace ooo_engine { |
---|
| 15 | namespace rename_unit { |
---|
| 16 | namespace register_translation_unit { |
---|
| 17 | namespace 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 , |
---|
[88] | 27 | uint32_t nb_inst_retire , |
---|
| 28 | bool is_toplevel) |
---|
[78] | 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 | |
---|
[88] | 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); |
---|
[78] | 47 | |
---|
[88] | 48 | _have_port_front_end_id = _size_front_end_id>0; |
---|
| 49 | _have_port_context_id = _size_context_id >0; |
---|
| 50 | |
---|
| 51 | copy(); |
---|
| 52 | } |
---|
[78] | 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" |
---|
[88] | 68 | Parameters::~Parameters (void) |
---|
[78] | 69 | { |
---|
| 70 | log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin"); |
---|
| 71 | log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End"); |
---|
| 72 | }; |
---|
| 73 | |
---|
[88] | 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 | |
---|
[78] | 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 |
---|