[78] | 1 | /* |
---|
| 2 | * $Id: Ifetch_unit_Glue_allocation.cpp 112 2009-03-18 22:36:26Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/include/Ifetch_unit_Glue.h" |
---|
| 9 | #include "Behavioural/include/Allocation.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_front_end { |
---|
| 15 | namespace front_end { |
---|
| 16 | namespace ifetch_unit { |
---|
| 17 | namespace ifetch_unit_glue { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | #undef FUNCTION |
---|
| 22 | #define FUNCTION "Ifetch_unit_Glue::allocation" |
---|
| 23 | void Ifetch_unit_Glue::allocation ( |
---|
| 24 | #ifdef STATISTICS |
---|
| 25 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
| 26 | #else |
---|
| 27 | void |
---|
| 28 | #endif |
---|
| 29 | ) |
---|
| 30 | { |
---|
| 31 | log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"Begin"); |
---|
| 32 | |
---|
| 33 | _component = new Component (_usage); |
---|
| 34 | |
---|
| 35 | Entity * entity = _component->set_entity (_name |
---|
| 36 | ,"Ifetch_unit_Glue" |
---|
| 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, |
---|
[112] | 50 | _("Generalist interface") |
---|
[78] | 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 "icache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 59 | { |
---|
[112] | 60 | ALLOC0_INTERFACE_BEGIN("icache_req",OUT, WEST, "Instruction Cache request."); |
---|
[78] | 61 | |
---|
[112] | 62 | ALLOC0_SIGNAL_OUT(out_ICACHE_REQ_VAL ,"val" ,Tcontrol_t,1); |
---|
| 63 | ALLOC0_SIGNAL_IN ( in_ICACHE_REQ_ADDRESS_VAL ,"address_val" ,Tcontrol_t,1); |
---|
| 64 | ALLOC0_SIGNAL_OUT(out_ICACHE_REQ_QUEUE_VAL ,"queue_val" ,Tcontrol_t,1); |
---|
| 65 | ALLOC0_SIGNAL_IN ( in_ICACHE_REQ_ACK ,"ack" ,Tcontrol_t,1); |
---|
| 66 | ALLOC0_SIGNAL_OUT(out_ICACHE_REQ_ADDRESS_ACK ,"address_ack" ,Tcontrol_t,1); |
---|
| 67 | ALLOC0_SIGNAL_IN ( in_ICACHE_REQ_QUEUE_ACK ,"queue_ack" ,Tcontrol_t,1); |
---|
| 68 | ALLOC0_SIGNAL_OUT(out_ICACHE_REQ_TYPE ,"type" ,Ticache_type_t,_param->_size_icache_type); |
---|
| 69 | ALLOC0_SIGNAL_OUT(out_ICACHE_REQ_ADDRESS ,"address" ,Taddress_t,_param->_size_instruction_address); |
---|
| 70 | ALLOC0_SIGNAL_IN ( in_ICACHE_REQ_ADDRESS_ADDRESS,"address_address",Taddress_t,_param->_size_instruction_address); |
---|
| 71 | ALLOC0_SIGNAL_OUT(out_ICACHE_REQ_QUEUE_ADDRESS ,"queue_address" ,Taddress_t,_param->_size_instruction_address); |
---|
| 72 | |
---|
| 73 | ALLOC0_INTERFACE_END(); |
---|
[78] | 74 | } |
---|
| 75 | |
---|
| 76 | // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 77 | { |
---|
[112] | 78 | ALLOC0_INTERFACE_BEGIN("event",IN, EAST, _("Event interface.")); |
---|
[78] | 79 | |
---|
[112] | 80 | ALLOC0_SIGNAL_IN ( in_EVENT_VAL ,"val" ,Tcontrol_t,1); |
---|
| 81 | ALLOC0_SIGNAL_OUT(out_EVENT_ADDRESS_VAL,"address_val",Tcontrol_t,1); |
---|
| 82 | ALLOC0_SIGNAL_OUT(out_EVENT_QUEUE_VAL ,"queue_val" ,Tcontrol_t,1); |
---|
| 83 | ALLOC0_SIGNAL_OUT(out_EVENT_ACK ,"ack" ,Tcontrol_t,1); |
---|
| 84 | ALLOC0_SIGNAL_IN ( in_EVENT_ADDRESS_ACK,"address_ack",Tcontrol_t,1); |
---|
| 85 | ALLOC0_SIGNAL_IN ( in_EVENT_QUEUE_ACK ,"queue_ack" ,Tcontrol_t,1); |
---|
| 86 | |
---|
| 87 | ALLOC0_INTERFACE_END(); |
---|
[78] | 88 | } |
---|
| 89 | |
---|
| 90 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 91 | |
---|
| 92 | #ifdef POSITION |
---|
[88] | 93 | if (usage_is_set(_usage,USE_POSITION)) |
---|
| 94 | _component->generate_file(); |
---|
[78] | 95 | #endif |
---|
| 96 | |
---|
| 97 | log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"End"); |
---|
| 98 | }; |
---|
| 99 | |
---|
| 100 | }; // end namespace ifetch_unit_glue |
---|
| 101 | }; // end namespace ifetch_unit |
---|
| 102 | }; // end namespace front_end |
---|
| 103 | }; // end namespace multi_front_end |
---|
| 104 | }; // end namespace core |
---|
| 105 | |
---|
| 106 | }; // end namespace behavioural |
---|
| 107 | }; // end namespace morpheo |
---|