[10] | 1 | #ifdef SYSTEMC |
---|
| 2 | /* |
---|
| 3 | * $Id$ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
[15] | 9 | #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h" |
---|
[10] | 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace generic { |
---|
[15] | 14 | namespace registerfile{ |
---|
[10] | 15 | namespace registerfile_multi_banked { |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | void RegisterFile_Multi_Banked::allocation (void) |
---|
| 19 | { |
---|
| 20 | string rename; |
---|
| 21 | |
---|
| 22 | log_printf(FUNC,RegisterFile_Multi_Banked,"allocation","Begin"); |
---|
| 23 | |
---|
| 24 | //#if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
| 25 | in_CLOCK = new SC_CLOCK ("in_CLOCK"); |
---|
| 26 | //#endif |
---|
| 27 | in_NRESET = new SC_IN (Tcontrol_t) ("in_NRESET"); |
---|
| 28 | |
---|
| 29 | // ----- Interface Read |
---|
| 30 | in_READ_VAL = new SC_IN (Tcontrol_t) * [_param._nb_port_read]; |
---|
| 31 | out_READ_ACK = new SC_OUT (Tcontrol_t) * [_param._nb_port_read]; |
---|
| 32 | in_READ_ADDRESS = new SC_IN (Taddress_t) * [_param._nb_port_read]; |
---|
| 33 | out_READ_DATA = new SC_OUT (Tdata_t) * [_param._nb_port_read]; |
---|
| 34 | |
---|
| 35 | for (uint32_t i=0; i<_param._nb_port_read; i++) |
---|
| 36 | { |
---|
| 37 | rename = "in_READ_VAL_" +toString(i); |
---|
| 38 | in_READ_VAL [i] = new SC_IN (Tcontrol_t) (rename.c_str()); |
---|
| 39 | |
---|
| 40 | rename = "out_READ_ACK_" +toString(i); |
---|
| 41 | out_READ_ACK [i] = new SC_OUT (Tcontrol_t) (rename.c_str()); |
---|
| 42 | |
---|
| 43 | rename = "in_READ_ADDRESS_"+toString(i); |
---|
| 44 | in_READ_ADDRESS [i] = new SC_IN (Taddress_t) (rename.c_str()); |
---|
| 45 | |
---|
| 46 | rename = "out_READ_DATA_" +toString(i); |
---|
| 47 | out_READ_DATA [i] = new SC_OUT (Tdata_t) (rename.c_str()); |
---|
| 48 | } |
---|
| 49 | |
---|
| 50 | // ----- Interface Write |
---|
| 51 | in_WRITE_VAL = new SC_IN (Tcontrol_t) * [_param._nb_port_write]; |
---|
| 52 | out_WRITE_ACK = new SC_OUT (Tcontrol_t) * [_param._nb_port_write]; |
---|
| 53 | in_WRITE_ADDRESS = new SC_IN (Taddress_t) * [_param._nb_port_write]; |
---|
| 54 | in_WRITE_DATA = new SC_IN (Tdata_t) * [_param._nb_port_write]; |
---|
| 55 | |
---|
| 56 | for (uint32_t i=0; i<_param._nb_port_write; i++) |
---|
| 57 | { |
---|
| 58 | rename = "in_WRITE_VAL_" +toString(i); |
---|
| 59 | in_WRITE_VAL [i] = new SC_IN (Tcontrol_t) (rename.c_str()); |
---|
| 60 | |
---|
| 61 | rename = "out_WRITE_ACK_" +toString(i); |
---|
| 62 | out_WRITE_ACK [i] = new SC_OUT (Tcontrol_t) (rename.c_str()); |
---|
| 63 | |
---|
| 64 | rename = "in_WRITE_ADDRESS_"+toString(i); |
---|
| 65 | in_WRITE_ADDRESS [i] = new SC_IN (Taddress_t) (rename.c_str()); |
---|
| 66 | |
---|
| 67 | rename = "in_WRITE_DATA_" +toString(i); |
---|
| 68 | in_WRITE_DATA [i] = new SC_IN (Tdata_t) (rename.c_str()); |
---|
| 69 | } |
---|
| 70 | |
---|
| 71 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 72 | |
---|
| 73 | log_printf(FUNC,RegisterFile_Multi_Banked,"allocation","End"); |
---|
| 74 | }; |
---|
| 75 | |
---|
| 76 | }; // end namespace registerfile_multi_banked |
---|
[15] | 77 | }; // end namespace registerfile |
---|
[10] | 78 | }; // end namespace generic |
---|
| 79 | |
---|
| 80 | }; // end namespace behavioural |
---|
| 81 | }; // end namespace morpheo |
---|
| 82 | #endif |
---|