Rev | Line | |
---|
[2] | 1 | #ifdef SYSTEMC |
---|
| 2 | /* |
---|
| 3 | * $Id$ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Generic/RegisterFile/include/RegisterFile.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace generic { |
---|
| 14 | namespace registerfile { |
---|
| 15 | |
---|
| 16 | void RegisterFile::genMealy_read (void) |
---|
| 17 | { |
---|
| 18 | log_printf(FUNC,Register_File,"genMealy_read","Begin"); |
---|
| 19 | |
---|
| 20 | #ifdef STATISTICS |
---|
| 21 | _stat_nb_read = 0; |
---|
| 22 | #endif |
---|
| 23 | |
---|
| 24 | for (uint32_t i=0; i<_param._nb_port_read; i++) |
---|
| 25 | { |
---|
| 26 | // Have a write? |
---|
| 27 | if ( PORT_READ(in_READ_ENABLE[i]) == 1) |
---|
| 28 | { |
---|
| 29 | log_printf(TRACE,Register_File,"genMealy_read","Read [%d] : Have transaction, Reg[%d] -> %x",i,PORT_READ(in_READ_ADDRESS[i]),REGISTER_READ(reg_DATA[PORT_READ(in_READ_ADDRESS[i])])); |
---|
| 30 | #ifdef STATISTICS |
---|
| 31 | _stat_nb_read ++; |
---|
| 32 | #endif |
---|
| 33 | // Write in registerFile |
---|
| 34 | PORT_WRITE(out_READ_DATA[i],REGISTER_READ(reg_DATA[PORT_READ(in_READ_ADDRESS[i])])); |
---|
| 35 | } |
---|
| 36 | else |
---|
| 37 | { |
---|
| 38 | //log_printf(TRACE,Register_File,"genMealy_read","Read [%d] : No transaction",i); |
---|
| 39 | PORT_WRITE(out_READ_DATA[i],0); |
---|
| 40 | } |
---|
| 41 | } |
---|
| 42 | log_printf(FUNC,Register_File,"genMealy_read","End"); |
---|
| 43 | |
---|
| 44 | }; |
---|
| 45 | |
---|
| 46 | }; // end namespace registerfile |
---|
| 47 | }; // end namespace generic |
---|
| 48 | }; // end namespace behavioural |
---|
| 49 | }; // end namespace morpheo |
---|
| 50 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.