[10] | 1 | #ifdef VHDL |
---|
| 2 | /* |
---|
| 3 | * $Id$ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Generic/Select/Priority_Fixed/include/Priority_Fixed.h" |
---|
| 10 | |
---|
| 11 | #ifdef VHDL_TESTBENCH |
---|
| 12 | # define VHDL_SET_PORT(name,direction,size) do {vhdl.set_port (name,direction,size); _vhdl_testbench->set_port (name,direction,size);} while (0) |
---|
| 13 | #else |
---|
| 14 | # define VHDL_SET_PORT(name,direction,size) vhdl.set_port (name,direction,size) |
---|
| 15 | #endif |
---|
| 16 | |
---|
| 17 | namespace morpheo { |
---|
| 18 | namespace behavioural { |
---|
| 19 | namespace generic { |
---|
| 20 | namespace select { |
---|
| 21 | namespace priority_fixed { |
---|
| 22 | |
---|
| 23 | |
---|
| 24 | void Priority_Fixed::vhdl_port (Vhdl & vhdl) |
---|
| 25 | { |
---|
| 26 | log_printf(FUNC,Priority_Fixed,"vhdl_port","Begin"); |
---|
| 27 | |
---|
| 28 | for (uint32_t i=0; i<_param._nb_entity; i++) |
---|
| 29 | { |
---|
| 30 | VHDL_SET_PORT (" in_VAL_"+toString(i) , IN, 1); |
---|
| 31 | if (_param._encoding_one_hot) |
---|
| 32 | VHDL_SET_PORT ("out_ACK_"+toString(i) ,OUT, 1); |
---|
| 33 | } |
---|
| 34 | if (_param._encoding_compact) |
---|
| 35 | { |
---|
| 36 | VHDL_SET_PORT ("out_ENTITY ",OUT,_param._size_entity); |
---|
| 37 | VHDL_SET_PORT ("out_ENTITY_ACK",OUT,1); |
---|
| 38 | } |
---|
| 39 | log_printf(FUNC,Priority_Fixed,"vhdl_port","End"); |
---|
| 40 | }; |
---|
| 41 | |
---|
| 42 | }; // end namespace priority_fixed |
---|
| 43 | }; // end namespace select |
---|
| 44 | }; // end namespace generic |
---|
| 45 | |
---|
| 46 | }; // end namespace behavioural |
---|
| 47 | }; // end namespace morpheo |
---|
| 48 | #endif |
---|