[78] | 1 | /* |
---|
| 2 | * $Id: Ifetch_unit_Glue_allocation.cpp 88 2008-12-10 18:31:39Z 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, |
---|
| 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 "icache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 59 | { |
---|
| 60 | ALLOC_INTERFACE("icache_req",OUT, WEST, "Instruction Cache request."); |
---|
| 61 | |
---|
[85] | 62 | ALLOC_SIGNAL_OUT(out_ICACHE_REQ_VAL ,"val" ,Tcontrol_t,1); |
---|
| 63 | ALLOC_SIGNAL_IN ( in_ICACHE_REQ_ADDRESS_VAL ,"address_val" ,Tcontrol_t,1); |
---|
| 64 | ALLOC_SIGNAL_OUT(out_ICACHE_REQ_QUEUE_VAL ,"queue_val" ,Tcontrol_t,1); |
---|
| 65 | ALLOC_SIGNAL_IN ( in_ICACHE_REQ_ACK ,"ack" ,Tcontrol_t,1); |
---|
| 66 | ALLOC_SIGNAL_OUT(out_ICACHE_REQ_ADDRESS_ACK ,"address_ack" ,Tcontrol_t,1); |
---|
| 67 | ALLOC_SIGNAL_IN ( in_ICACHE_REQ_QUEUE_ACK ,"queue_ack" ,Tcontrol_t,1); |
---|
| 68 | ALLOC_SIGNAL_OUT(out_ICACHE_REQ_TYPE ,"type" ,Ticache_type_t,_param->_size_icache_type); |
---|
[88] | 69 | ALLOC_SIGNAL_OUT(out_ICACHE_REQ_ADDRESS ,"address" ,Taddress_t,_param->_size_instruction_address); |
---|
| 70 | ALLOC_SIGNAL_IN ( in_ICACHE_REQ_ADDRESS_ADDRESS,"address_address",Taddress_t,_param->_size_instruction_address); |
---|
| 71 | ALLOC_SIGNAL_OUT(out_ICACHE_REQ_QUEUE_ADDRESS ,"queue_address" ,Taddress_t,_param->_size_instruction_address); |
---|
[78] | 72 | } |
---|
| 73 | |
---|
| 74 | // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 75 | { |
---|
| 76 | ALLOC_INTERFACE("event",IN, EAST, "Event interface."); |
---|
| 77 | |
---|
| 78 | ALLOC_SIGNAL_IN ( in_EVENT_VAL ,"val" ,Tcontrol_t,1); |
---|
| 79 | ALLOC_SIGNAL_OUT(out_EVENT_ADDRESS_VAL,"address_val",Tcontrol_t,1); |
---|
| 80 | ALLOC_SIGNAL_OUT(out_EVENT_QUEUE_VAL ,"queue_val" ,Tcontrol_t,1); |
---|
| 81 | ALLOC_SIGNAL_OUT(out_EVENT_ACK ,"ack" ,Tcontrol_t,1); |
---|
| 82 | ALLOC_SIGNAL_IN ( in_EVENT_ADDRESS_ACK,"address_ack",Tcontrol_t,1); |
---|
| 83 | ALLOC_SIGNAL_IN ( in_EVENT_QUEUE_ACK ,"queue_ack" ,Tcontrol_t,1); |
---|
| 84 | } |
---|
| 85 | |
---|
| 86 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 87 | |
---|
| 88 | #ifdef POSITION |
---|
[88] | 89 | if (usage_is_set(_usage,USE_POSITION)) |
---|
| 90 | _component->generate_file(); |
---|
[78] | 91 | #endif |
---|
| 92 | |
---|
| 93 | log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"End"); |
---|
| 94 | }; |
---|
| 95 | |
---|
| 96 | }; // end namespace ifetch_unit_glue |
---|
| 97 | }; // end namespace ifetch_unit |
---|
| 98 | }; // end namespace front_end |
---|
| 99 | }; // end namespace multi_front_end |
---|
| 100 | }; // end namespace core |
---|
| 101 | |
---|
| 102 | }; // end namespace behavioural |
---|
| 103 | }; // end namespace morpheo |
---|