[2] | 1 | #ifdef VHDL |
---|
| 2 | /* |
---|
| 3 | * $Id$ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Generic/Select/Pseudo_LRU/include/Pseudo_LRU.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace generic { |
---|
| 14 | namespace select { |
---|
| 15 | namespace pseudo_lru { |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | void Pseudo_LRU::vhdl_port (Vhdl & vhdl) |
---|
| 19 | { |
---|
| 20 | vhdl.set_port ("in_CLOCK" , IN, "std_logic"); |
---|
| 21 | |
---|
| 22 | for (uint32_t i = 0; i < _param._nb_access; i ++) |
---|
| 23 | { |
---|
| 24 | vhdl.set_port (" in_ACCESS_VAL_"+toString(i)+" ",IN ,std_logic(1)); |
---|
| 25 | vhdl.set_port ("out_ACCESS_ACK_"+toString(i)+" ",OUT,std_logic(1)); |
---|
| 26 | if (_param._size_table>1) |
---|
| 27 | vhdl.set_port (" in_ACCESS_ADDRESS_"+toString(i)+" ",IN ,std_logic(static_cast<uint32_t>(log2(_param._size_table)))); |
---|
| 28 | vhdl.set_port ("out_ACCESS_ENTITY_"+toString(i)+" ",OUT,std_logic(static_cast<uint32_t>(log2(_param._nb_entity)))); |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | for (uint32_t i = 0; i < _param._nb_update; i ++) |
---|
| 32 | { |
---|
| 33 | vhdl.set_port (" in_UPDATE_VAL_"+toString(i)+" ",IN ,std_logic(1)); |
---|
| 34 | vhdl.set_port ("out_UPDATE_ACK_"+toString(i)+" ",OUT,std_logic(1)); |
---|
| 35 | if (_param._size_table>1) |
---|
| 36 | vhdl.set_port (" in_UPDATE_ADDRESS_"+toString(i)+" ",IN ,std_logic(static_cast<uint32_t>(log2(_param._size_table)))); |
---|
| 37 | vhdl.set_port (" in_UPDATE_ENTITY_"+toString(i)+" ",IN ,std_logic(static_cast<uint32_t>(log2(_param._nb_entity)))); |
---|
| 38 | } |
---|
| 39 | }; |
---|
| 40 | |
---|
| 41 | }; // end namespace pseudo_lru |
---|
| 42 | }; // end namespace select |
---|
| 43 | }; // end namespace generic |
---|
| 44 | |
---|
| 45 | }; // end namespace behavioural |
---|
| 46 | }; // end namespace morpheo |
---|
| 47 | #endif |
---|