[10] | 1 | #ifdef SYSTEMC |
---|
| 2 | /* |
---|
| 3 | * $Id$ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Generic/Select/Priority_Fixed/include/Priority_Fixed.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace generic { |
---|
| 14 | namespace select { |
---|
| 15 | namespace priority_fixed { |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | void Priority_Fixed::allocation (void) |
---|
| 19 | { |
---|
| 20 | string rename; |
---|
| 21 | |
---|
| 22 | log_printf(FUNC,Priority_Fixed,"allocation","Begin"); |
---|
| 23 | |
---|
| 24 | #if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
| 25 | in_CLOCK = new SC_CLOCK ("in_CLOCK"); |
---|
| 26 | #endif |
---|
| 27 | |
---|
| 28 | in_VAL = new SC_IN (Tcontrol_t) * [_param._nb_entity]; |
---|
| 29 | if (_param._encoding_one_hot) |
---|
| 30 | out_ACK = new SC_OUT(Tcontrol_t) * [_param._nb_entity]; |
---|
| 31 | |
---|
| 32 | for (uint32_t i=0; i<_param._nb_entity; i++) |
---|
| 33 | { |
---|
| 34 | rename = " in_VAL_"+toString(i); |
---|
| 35 | in_VAL [i] = new SC_IN (Tcontrol_t) (rename.c_str()); |
---|
| 36 | |
---|
| 37 | if (_param._encoding_one_hot) |
---|
| 38 | { |
---|
| 39 | rename = "out_ACK_"+toString(i); |
---|
| 40 | out_ACK [i] = new SC_OUT(Tcontrol_t) (rename.c_str()); |
---|
| 41 | } |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | if (_param._encoding_compact) |
---|
| 45 | { |
---|
| 46 | out_ENTITY_ACK = new SC_OUT(Tcontrol_t) ("out_entity_ack"); |
---|
| 47 | out_ENTITY = new SC_OUT(Tentity_t) ("out_entity"); |
---|
| 48 | } |
---|
| 49 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 50 | |
---|
| 51 | log_printf(FUNC,Priority_Fixed,"allocation","End"); |
---|
| 52 | }; |
---|
| 53 | |
---|
| 54 | }; // end namespace priority_fixed |
---|
| 55 | }; // end namespace select |
---|
| 56 | }; // end namespace generic |
---|
| 57 | |
---|
| 58 | }; // end namespace behavioural |
---|
| 59 | }; // end namespace morpheo |
---|
| 60 | #endif |
---|