[10] | 1 | #ifdef VHDL |
---|
| 2 | /* |
---|
| 3 | * $Id$ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Generic/RegisterFile_Multi_Banked/RegisterFile_Multi_Banked_Glue/include/RegisterFile_Multi_Banked_Glue.h" |
---|
| 10 | |
---|
| 11 | #ifdef VHDL_TESTBENCH |
---|
| 12 | # define VHDL_SET_PORT(name,direction,size) vhdl.set_port (name,direction,size); _vhdl_testbench->set_port (name,direction,size); |
---|
| 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 registerfile_multi_banked { |
---|
| 21 | namespace registerfile_multi_banked_glue { |
---|
| 22 | |
---|
| 23 | |
---|
| 24 | void RegisterFile_Multi_Banked_Glue::vhdl_port (Vhdl & vhdl) |
---|
| 25 | { |
---|
| 26 | log_printf(FUNC,RegisterFile_Multi_Banked_Glue,"vhdl_port","Begin"); |
---|
| 27 | |
---|
| 28 | for (uint32_t i=0; i<_param._nb_port_read; i++) |
---|
| 29 | { |
---|
| 30 | VHDL_SET_PORT(" in_READ_IN_VAL_"+toString(i)+" ", IN, 1); |
---|
| 31 | VHDL_SET_PORT("out_READ_IN_ACK_"+toString(i)+" ",OUT, 1); |
---|
| 32 | VHDL_SET_PORT(" in_READ_IN_ADDRESS_"+toString(i)+" ", IN, _param._size_address); |
---|
| 33 | VHDL_SET_PORT("out_READ_IN_DATA_"+toString(i)+" ",OUT, _param._size_word ); |
---|
| 34 | VHDL_SET_PORT(" in_READ_SELECT_VAL_"+toString(i)+" ", IN, 1); |
---|
| 35 | VHDL_SET_PORT("out_READ_SELECT_ACK_"+toString(i)+" ",OUT, 1); |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | for (uint32_t i=0; i<_param._nb_bank; i++) |
---|
| 39 | { |
---|
| 40 | for (uint32_t j=0; j<_param._nb_port_read_by_bank; j++) |
---|
| 41 | { |
---|
| 42 | VHDL_SET_PORT("out_READ_OUT_VAL_"+toString(i)+"_"+toString(j)+" ",OUT, 1); |
---|
| 43 | VHDL_SET_PORT(" in_READ_OUT_ACK_"+toString(i)+"_"+toString(j)+" ", IN, 1); |
---|
| 44 | VHDL_SET_PORT("out_READ_OUT_ADDRESS_"+toString(i)+"_"+toString(j)+" ",OUT, _param._size_address); |
---|
| 45 | VHDL_SET_PORT(" in_READ_OUT_DATA_"+toString(i)+"_"+toString(j)+" ", IN, _param._size_word ); |
---|
| 46 | } |
---|
| 47 | } |
---|
| 48 | |
---|
| 49 | for (uint32_t i=0; i<_param._nb_port_write; i++) |
---|
| 50 | { |
---|
| 51 | VHDL_SET_PORT(" in_WRITE_IN_VAL_"+toString(i)+" ", IN, 1); |
---|
| 52 | VHDL_SET_PORT("out_WRITE_IN_ACK_"+toString(i)+" ",OUT, 1); |
---|
| 53 | VHDL_SET_PORT(" in_WRITE_IN_ADDRESS_"+toString(i)+" ", IN, _param._size_address); |
---|
| 54 | VHDL_SET_PORT(" in_WRITE_IN_DATA_"+toString(i)+" ", IN, _param._size_word ); |
---|
| 55 | VHDL_SET_PORT(" in_WRITE_SELECT_VAL_"+toString(i)+" ", IN, 1); |
---|
| 56 | VHDL_SET_PORT("out_WRITE_SELECT_ACK_"+toString(i)+" ",OUT, 1); |
---|
| 57 | } |
---|
| 58 | |
---|
| 59 | for (uint32_t i=0; i<_param._nb_bank; i++) |
---|
| 60 | { |
---|
| 61 | for (uint32_t j=0; j<_param._nb_port_write_by_bank; j++) |
---|
| 62 | { |
---|
| 63 | VHDL_SET_PORT("out_WRITE_OUT_VAL_"+toString(i)+"_"+toString(j)+" ",OUT, 1); |
---|
| 64 | VHDL_SET_PORT(" in_WRITE_OUT_ACK_"+toString(i)+"_"+toString(j)+" ", IN, 1); |
---|
| 65 | VHDL_SET_PORT("out_WRITE_OUT_ADDRESS_"+toString(i)+"_"+toString(j)+" ",OUT, _param._size_address); |
---|
| 66 | VHDL_SET_PORT("out_WRITE_OUT_DATA_"+toString(i)+"_"+toString(j)+" ",OUT, _param._size_word ); |
---|
| 67 | } |
---|
| 68 | } |
---|
| 69 | |
---|
| 70 | log_printf(FUNC,RegisterFile_Multi_Banked_Glue,"vhdl_port","End"); |
---|
| 71 | }; |
---|
| 72 | |
---|
| 73 | }; // end namespace registerfile_multi_banked_glue |
---|
| 74 | }; // end namespace registerfile_multi_banked |
---|
| 75 | }; // end namespace generic |
---|
| 76 | |
---|
| 77 | }; // end namespace behavioural |
---|
| 78 | }; // end namespace morpheo |
---|
| 79 | #endif |
---|