Rev | Line | |
---|
[2] | 1 | #ifdef SYSTEMC |
---|
| 2 | /* |
---|
| 3 | * $Id$ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Generic/Counter/include/Counter.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace generic { |
---|
| 14 | namespace counter { |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | void Counter::allocation (void) |
---|
| 18 | { |
---|
| 19 | string rename; |
---|
| 20 | |
---|
| 21 | log_printf(FUNC,Counter,"allocation","Begin"); |
---|
| 22 | |
---|
| 23 | #if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
| 24 | in_CLOCK = new SC_CLOCK ("in_CLOCK"); |
---|
| 25 | #endif |
---|
| 26 | |
---|
| 27 | in_COUNTER_DATA = new SC_IN (Tdata_t) * [_param._nb_port]; |
---|
| 28 | in_COUNTER_ADDSUB= new SC_IN (Tcontrol_t) * [_param._nb_port]; |
---|
| 29 | out_COUNTER_DATA = new SC_OUT(Tdata_t) * [_param._nb_port]; |
---|
| 30 | |
---|
| 31 | for (uint32_t i=0; i<_param._nb_port; i++) |
---|
| 32 | { |
---|
| 33 | rename = " in_COUNTER_DATA_" +toString(i); |
---|
| 34 | in_COUNTER_DATA [i] = new SC_IN (Tdata_t) (rename.c_str()); |
---|
| 35 | |
---|
| 36 | rename = " in_COUNTER_ADDSUB_"+toString(i); |
---|
| 37 | in_COUNTER_ADDSUB[i] = new SC_IN (Tcontrol_t) (rename.c_str()); |
---|
| 38 | |
---|
| 39 | rename = "out_COUNTER_DATA_" +toString(i); |
---|
| 40 | out_COUNTER_DATA [i] = new SC_OUT(Tdata_t) (rename.c_str()); |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 44 | log_printf(FUNC,Counter,"allocation","End"); |
---|
| 45 | }; |
---|
| 46 | |
---|
| 47 | }; // end namespace counter |
---|
| 48 | }; // end namespace generic |
---|
| 49 | |
---|
| 50 | }; // end namespace behavioural |
---|
| 51 | }; // end namespace morpheo |
---|
| 52 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.