Last change
on this file since 5 was
3,
checked in by kane, 18 years ago
|
1) Ajout d'un "printer" XML pour la configuration de paramètres
2) Fin du composant "Two_Level_Branch_Predictor"
validation * systemc
|
File size:
1.3 KB
|
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 | { |
---|
[3] | 29 | Taddress_t address = PORT_READ(in_READ_ADDRESS[i]); |
---|
| 30 | Tdata_t data = REGISTER_READ(reg_DATA[address]); |
---|
| 31 | |
---|
| 32 | log_printf(TRACE,Register_File,"genMealy_read","[%d] -> %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data)); |
---|
| 33 | |
---|
[2] | 34 | #ifdef STATISTICS |
---|
| 35 | _stat_nb_read ++; |
---|
| 36 | #endif |
---|
| 37 | // Write in registerFile |
---|
[3] | 38 | PORT_WRITE(out_READ_DATA[i],data); |
---|
[2] | 39 | } |
---|
| 40 | else |
---|
| 41 | { |
---|
| 42 | //log_printf(TRACE,Register_File,"genMealy_read","Read [%d] : No transaction",i); |
---|
| 43 | PORT_WRITE(out_READ_DATA[i],0); |
---|
| 44 | } |
---|
| 45 | } |
---|
| 46 | log_printf(FUNC,Register_File,"genMealy_read","End"); |
---|
| 47 | |
---|
| 48 | }; |
---|
| 49 | |
---|
| 50 | }; // end namespace registerfile |
---|
| 51 | }; // end namespace generic |
---|
| 52 | }; // end namespace behavioural |
---|
| 53 | }; // end namespace morpheo |
---|
| 54 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.