[10] | 1 | #ifdef VHDL |
---|
| 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 | #ifdef VHDL_TESTBENCH |
---|
| 18 | # define VHDL_SET_PORT(name,direction,size) vhdl.set_port (name,direction,size); _vhdl_testbench->set_port (name,direction,size); |
---|
| 19 | #else |
---|
| 20 | # define VHDL_SET_PORT(name,direction,size) vhdl.set_port (name,direction,size); |
---|
| 21 | #endif |
---|
| 22 | |
---|
| 23 | void RegisterFile_Multi_Banked::vhdl_port (Vhdl & vhdl) |
---|
| 24 | { |
---|
| 25 | log_printf(FUNC,RegisterFile_Multi_Banked,"vhdl_port","Begin"); |
---|
| 26 | |
---|
| 27 | vhdl.set_port (" in_CLOCK" , IN, 1); |
---|
| 28 | VHDL_SET_PORT (" in_NRESET", IN, 1); |
---|
| 29 | |
---|
| 30 | // ----- Interface Read |
---|
| 31 | for (uint32_t i=0; i<_param._nb_port_read; i++) |
---|
| 32 | { |
---|
| 33 | VHDL_SET_PORT(" in_READ_VAL_"+toString(i)+" ", IN, 1); |
---|
| 34 | VHDL_SET_PORT("out_READ_ACK_"+toString(i)+" ",OUT, 1); |
---|
| 35 | VHDL_SET_PORT(" in_READ_ADDRESS_"+toString(i)+" ", IN, static_cast<uint32_t>(log2(_param._nb_word))); |
---|
| 36 | VHDL_SET_PORT("out_READ_DATA_"+toString(i)+" ",OUT, _param._size_word); |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | // ----- Interface Write |
---|
| 40 | for (uint32_t i=0; i<_param._nb_port_write; i++) |
---|
| 41 | { |
---|
| 42 | VHDL_SET_PORT(" in_WRITE_VAL_"+toString(i)+" ", IN, 1); |
---|
| 43 | VHDL_SET_PORT("out_WRITE_ACK_"+toString(i)+" ",OUT, 1); |
---|
| 44 | VHDL_SET_PORT(" in_WRITE_ADDRESS_"+toString(i)+"", IN, static_cast<uint32_t>(log2(_param._nb_word))); |
---|
| 45 | VHDL_SET_PORT(" in_WRITE_DATA_"+toString(i)+" ", IN, _param._size_word); |
---|
| 46 | } |
---|
| 47 | |
---|
| 48 | log_printf(FUNC,RegisterFile_Multi_Banked,"vhdl_port","End"); |
---|
| 49 | }; |
---|
| 50 | |
---|
| 51 | }; // end namespace registerfile_multi_banked |
---|
[15] | 52 | }; // end namespace registerfile |
---|
[10] | 53 | }; // end namespace generic |
---|
| 54 | |
---|
| 55 | }; // end namespace behavioural |
---|
| 56 | }; // end namespace morpheo |
---|
| 57 | #endif |
---|