[77] | 1 | /* |
---|
| 2 | * $Id: Execution_unit_to_Write_unit_allocation.cpp 81 2008-04-15 18:40:01Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Execution_unit_to_Write_unit.h" |
---|
| 9 | #include "Behavioural/include/Allocation.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_execute_loop { |
---|
| 15 | namespace execute_loop { |
---|
| 16 | namespace network { |
---|
| 17 | namespace execution_unit_to_write_unit { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | #undef FUNCTION |
---|
| 22 | #define FUNCTION "Execution_unit_to_Write_unit::allocation" |
---|
| 23 | void Execution_unit_to_Write_unit::allocation ( |
---|
| 24 | #ifdef STATISTICS |
---|
| 25 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
| 26 | #else |
---|
| 27 | void |
---|
| 28 | #endif |
---|
| 29 | ) |
---|
| 30 | { |
---|
| 31 | log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin"); |
---|
| 32 | |
---|
| 33 | _component = new Component (_usage); |
---|
| 34 | |
---|
| 35 | Entity * entity = _component->set_entity (_name |
---|
| 36 | ,"Execution_unit_to_Write_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 "execute_unit_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 59 | { |
---|
| 60 | ALLOC1_INTERFACE("execute_unit_out", IN, EAST, "Output of execution_unit", _param->_nb_execute_unit); |
---|
| 61 | |
---|
[78] | 62 | ALLOC1_VALACK_IN ( in_EXECUTE_UNIT_OUT_VAL,VAL); |
---|
| 63 | ALLOC1_VALACK_OUT(out_EXECUTE_UNIT_OUT_ACK,ACK); |
---|
[77] | 64 | ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id ); |
---|
| 65 | ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id ); |
---|
| 66 | ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id ); |
---|
| 67 | ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_PACKET_ID ,"packet_id" ,Tpacket_t ,_param->_size_packet_id ); |
---|
| 68 | //ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation ); |
---|
[78] | 69 | ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_TYPE ,"type" ,Ttype_t ,_param->_size_type ); |
---|
[77] | 70 | ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_WRITE_RD ,"write_rd" ,Tcontrol_t ,1 ); |
---|
| 71 | ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_NUM_REG_RD ,"num_reg_rd" ,Tgeneral_address_t,_param->_size_general_register); |
---|
| 72 | ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_DATA_RD ,"data_rd" ,Tgeneral_data_t ,_param->_size_general_data ); |
---|
| 73 | ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_WRITE_RE ,"write_re" ,Tcontrol_t ,1 ); |
---|
| 74 | ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_NUM_REG_RE ,"num_reg_re" ,Tspecial_address_t,_param->_size_special_register); |
---|
| 75 | ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_DATA_RE ,"data_re" ,Tspecial_data_t ,_param->_size_special_data ); |
---|
| 76 | ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_EXCEPTION ,"exception" ,Texception_t ,_param->_size_exception ); |
---|
| 77 | ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_NO_SEQUENCE ,"no_sequence" ,Tcontrol_t ,1 ); |
---|
| 78 | ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_ADDRESS ,"address" ,Tgeneral_data_t ,_param->_size_general_data ); |
---|
| 79 | } |
---|
| 80 | // ~~~~~[ Interface "write_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 81 | { |
---|
| 82 | ALLOC1_INTERFACE("write_unit_in", OUT, WEST, "Input of write_unit", _param->_nb_write_unit); |
---|
| 83 | |
---|
[78] | 84 | ALLOC1_VALACK_OUT(out_WRITE_UNIT_IN_VAL,VAL); |
---|
| 85 | ALLOC1_VALACK_IN ( in_WRITE_UNIT_IN_ACK,ACK); |
---|
[77] | 86 | ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id ); |
---|
| 87 | ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id ); |
---|
| 88 | ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id ); |
---|
| 89 | ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_PACKET_ID ,"packet_id" ,Tpacket_t ,_param->_size_packet_id ); |
---|
| 90 | //ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation ); |
---|
[78] | 91 | ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_TYPE ,"type" ,Ttype_t ,_param->_size_type ); |
---|
[77] | 92 | ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_WRITE_RD ,"write_rd" ,Tcontrol_t ,1 ); |
---|
| 93 | ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_NUM_REG_RD ,"num_reg_rd" ,Tgeneral_address_t,_param->_size_general_register); |
---|
| 94 | ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_DATA_RD ,"data_rd" ,Tgeneral_data_t ,_param->_size_general_data ); |
---|
| 95 | ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_WRITE_RE ,"write_re" ,Tcontrol_t ,1 ); |
---|
| 96 | ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_NUM_REG_RE ,"num_reg_re" ,Tspecial_address_t,_param->_size_special_register); |
---|
| 97 | ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_DATA_RE ,"data_re" ,Tspecial_data_t ,_param->_size_special_data ); |
---|
| 98 | ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_EXCEPTION ,"exception" ,Texception_t ,_param->_size_exception ); |
---|
| 99 | ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_NO_SEQUENCE ,"no_sequence" ,Tcontrol_t ,1 ); |
---|
| 100 | ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_ADDRESS ,"address" ,Tgeneral_data_t ,_param->_size_general_data ); |
---|
| 101 | } |
---|
| 102 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 103 | |
---|
| 104 | _destination = new std::list<uint32_t> * [_param->_nb_execute_unit]; |
---|
| 105 | for (uint32_t i=0; i<_param->_nb_execute_unit; i++) |
---|
| 106 | { |
---|
| 107 | _destination [i] = new std::list<uint32_t> [_param->_nb_thread]; |
---|
| 108 | } |
---|
| 109 | |
---|
| 110 | #ifdef POSITION |
---|
| 111 | _component->generate_file(); |
---|
| 112 | #endif |
---|
| 113 | |
---|
| 114 | log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End"); |
---|
| 115 | }; |
---|
| 116 | |
---|
| 117 | }; // end namespace execution_unit_to_write_unit |
---|
| 118 | }; // end namespace network |
---|
| 119 | }; // end namespace execute_loop |
---|
| 120 | }; // end namespace multi_execute_loop |
---|
| 121 | }; // end namespace core |
---|
| 122 | |
---|
| 123 | }; // end namespace behavioural |
---|
| 124 | }; // end namespace morpheo |
---|