[78] | 1 | /* |
---|
| 2 | * $Id: Load_Store_pointer_unit_allocation.cpp 112 2009-03-18 22:36:26Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/include/Load_Store_pointer_unit.h" |
---|
| 9 | #include "Behavioural/include/Allocation.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_ooo_engine { |
---|
| 15 | namespace ooo_engine { |
---|
| 16 | namespace rename_unit { |
---|
| 17 | namespace load_store_pointer_unit { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | #undef FUNCTION |
---|
| 22 | #define FUNCTION "Load_Store_pointer_unit::allocation" |
---|
| 23 | void Load_Store_pointer_unit::allocation ( |
---|
| 24 | #ifdef STATISTICS |
---|
| 25 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
| 26 | #else |
---|
| 27 | void |
---|
| 28 | #endif |
---|
| 29 | ) |
---|
| 30 | { |
---|
| 31 | log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin"); |
---|
| 32 | |
---|
| 33 | _component = new Component (_usage); |
---|
| 34 | |
---|
| 35 | Entity * entity = _component->set_entity (_name |
---|
| 36 | ,"Load_Store_pointer_unit" |
---|
| 37 | #ifdef POSITION |
---|
| 38 | ,COMBINATORY |
---|
| 39 | #endif |
---|
| 40 | ); |
---|
| 41 | |
---|
| 42 | _interfaces = entity->set_interfaces(); |
---|
| 43 | |
---|
| 44 | // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 45 | { |
---|
| 46 | Interface * interface = _interfaces->set_interface("" |
---|
| 47 | #ifdef POSITION |
---|
| 48 | ,IN |
---|
| 49 | ,SOUTH, |
---|
| 50 | "Generalist interface" |
---|
| 51 | #endif |
---|
| 52 | ); |
---|
| 53 | |
---|
| 54 | in_CLOCK = interface->set_signal_clk ("clock" ,1, CLOCK_VHDL_YES); |
---|
| 55 | in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); |
---|
| 56 | } |
---|
| 57 | |
---|
| 58 | // ~~~~~[ Interface : "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 59 | { |
---|
[112] | 60 | ALLOC1_INTERFACE_BEGIN("insert", IN, EAST, _("insert to the re order buffer an instruction"), _param->_nb_inst_insert); |
---|
[78] | 61 | |
---|
| 62 | ALLOC1_VALACK_IN ( in_INSERT_VAL ,VAL); |
---|
| 63 | ALLOC1_VALACK_OUT(out_INSERT_ACK ,ACK); |
---|
| 64 | ALLOC1_SIGNAL_IN ( in_INSERT_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id ); |
---|
| 65 | ALLOC1_SIGNAL_IN ( in_INSERT_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id ); |
---|
| 66 | ALLOC1_SIGNAL_IN ( in_INSERT_TYPE ,"type" ,Ttype_t ,_param->_size_type ); |
---|
| 67 | ALLOC1_SIGNAL_IN ( in_INSERT_OPERATION ,"operation" ,Toperation_t,_param->_size_operation ); |
---|
| 68 | ALLOC1_SIGNAL_OUT(out_INSERT_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t ,_param->_size_store_queue_ptr); |
---|
| 69 | ALLOC1_SIGNAL_OUT(out_INSERT_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t ,_param->_size_load_queue_ptr ); |
---|
[112] | 70 | |
---|
| 71 | ALLOC1_INTERFACE_END(_param->_nb_inst_insert); |
---|
[78] | 72 | } |
---|
| 73 | |
---|
| 74 | // ~~~~~[ Interface : "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 75 | { |
---|
[112] | 76 | ALLOC1_INTERFACE_BEGIN("retire", IN, EAST, _("retire from the re order buffer an instruction"), _param->_nb_inst_retire); |
---|
[78] | 77 | |
---|
| 78 | ALLOC1_VALACK_IN ( in_RETIRE_VAL ,VAL); |
---|
| 79 | ALLOC1_VALACK_OUT(out_RETIRE_ACK ,ACK); |
---|
| 80 | ALLOC1_SIGNAL_IN ( in_RETIRE_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id ); |
---|
| 81 | ALLOC1_SIGNAL_IN ( in_RETIRE_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id ); |
---|
[88] | 82 | // ALLOC1_SIGNAL_IN ( in_RETIRE_TYPE ,"type" ,Ttype_t ,_param->_size_type ); |
---|
| 83 | // ALLOC1_SIGNAL_IN ( in_RETIRE_OPERATION ,"operation" ,Toperation_t,_param->_size_operation ); |
---|
[97] | 84 | ALLOC1_SIGNAL_IN ( in_RETIRE_USE_STORE_QUEUE ,"use_store_queue" ,Tcontrol_t ,1); |
---|
| 85 | ALLOC1_SIGNAL_IN ( in_RETIRE_USE_LOAD_QUEUE ,"use_load_queue" ,Tcontrol_t ,1); |
---|
[78] | 86 | ALLOC1_SIGNAL_IN ( in_RETIRE_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t ,_param->_size_store_queue_ptr); |
---|
| 87 | ALLOC1_SIGNAL_IN ( in_RETIRE_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t ,_param->_size_load_queue_ptr ); |
---|
[112] | 88 | |
---|
| 89 | ALLOC1_INTERFACE_END(_param->_nb_inst_retire); |
---|
[78] | 90 | } |
---|
| 91 | |
---|
[88] | 92 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
| 93 | { |
---|
[112] | 94 | ALLOC1(reg_STORE_QUEUE_PTR_WRITE ,Tlsq_ptr_t ,_param->_nb_load_store_queue); |
---|
| 95 | ALLOC2(reg_STORE_QUEUE_USE ,bool ,_param->_nb_load_store_queue,_param->_size_store_queue [it1]); |
---|
| 96 | ALLOC1(reg_STORE_QUEUE_NB_USE ,Tlsq_ptr_t ,_param->_nb_load_store_queue); |
---|
| 97 | ALLOC1(reg_LOAD_QUEUE_PTR_WRITE ,Tlsq_ptr_t ,_param->_nb_load_store_queue); |
---|
| 98 | ALLOC2(reg_LOAD_QUEUE_USE ,bool ,_param->_nb_load_store_queue,_param->_size_load_queue [it1]); |
---|
[78] | 99 | |
---|
[112] | 100 | ALLOC1(internal_INSERT_ACK ,Tcontrol_t ,_param->_nb_inst_insert); |
---|
| 101 | ALLOC1(internal_INSERT_OPERATION_USE ,operation_use_t,_param->_nb_inst_insert); |
---|
| 102 | ALLOC1(internal_INSERT_LSQ ,uint32_t ,_param->_nb_inst_insert); |
---|
| 103 | ALLOC1(internal_INSERT_PTR ,Tlsq_ptr_t ,_param->_nb_inst_insert); |
---|
[78] | 104 | |
---|
[112] | 105 | ALLOC1(internal_RETIRE_ACK ,Tcontrol_t ,_param->_nb_inst_retire); |
---|
| 106 | ALLOC1(internal_RETIRE_OPERATION_USE ,operation_use_t,_param->_nb_inst_retire); |
---|
| 107 | ALLOC1(internal_RETIRE_LSQ ,uint32_t ,_param->_nb_inst_retire); |
---|
| 108 | ALLOC1(internal_RETIRE_PTR ,Tlsq_ptr_t ,_param->_nb_inst_retire); |
---|
[88] | 109 | } |
---|
| 110 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[78] | 111 | |
---|
| 112 | #ifdef POSITION |
---|
[88] | 113 | if (usage_is_set(_usage,USE_POSITION)) |
---|
| 114 | _component->generate_file(); |
---|
[78] | 115 | #endif |
---|
| 116 | |
---|
| 117 | log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End"); |
---|
| 118 | }; |
---|
| 119 | |
---|
| 120 | }; // end namespace load_store_pointer_unit |
---|
| 121 | }; // end namespace rename_unit |
---|
| 122 | }; // end namespace ooo_engine |
---|
| 123 | }; // end namespace multi_ooo_engine |
---|
| 124 | }; // end namespace core |
---|
| 125 | |
---|
| 126 | }; // end namespace behavioural |
---|
| 127 | }; // end namespace morpheo |
---|