Changeset 106 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
- Timestamp:
- Feb 9, 2009, 11:55:26 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_genMealy_read.cpp
r81 r106 15 15 namespace registerfile_monolithic { 16 16 17 #undef FUNCTION 18 #define FUNCTION "RegisterFile_Monolithic::genMealy_read" 17 19 void RegisterFile_Monolithic::genMealy_read (void) 18 20 { 19 log_printf(FUNC,RegisterFile,"genMealy_read","Begin"); 21 log_begin(RegisterFile_Monolithic,FUNCTION); 22 log_function(RegisterFile_Monolithic,FUNCTION,_name.c_str()); 20 23 21 24 for (uint32_t i=0; i<_param->_nb_port_read; i++) … … 31 34 Tdata_t data = reg_DATA[address]; 32 35 33 log_printf(TRACE,RegisterFile, "genMealy_read","[%d] -> %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data));36 log_printf(TRACE,RegisterFile,FUNCTION," * [%d] -> %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data)); 34 37 35 38 // Write in registerFile … … 38 41 else 39 42 { 40 //log_printf(TRACE,RegisterFile, "genMealy_read","Read [%d] : No transaction",i);43 //log_printf(TRACE,RegisterFile,FUNCTION,"Read [%d] : No transaction",i); 41 44 PORT_WRITE(out_READ_DATA[i],0); 42 45 } … … 60 63 data = reg_DATA[address]; 61 64 62 log_printf(TRACE,RegisterFile, "genMealy_read","[%d] -> %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data));65 log_printf(TRACE,RegisterFile,FUNCTION," * [%d] -> %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data)); 63 66 } 64 67 else 65 68 { 66 //log_printf(TRACE,RegisterFile, "genMealy_read","Read [%d] : No transaction",i);69 //log_printf(TRACE,RegisterFile,FUNCTION,"Read [%d] : No transaction",i); 67 70 data = 0; 68 71 } … … 71 74 } 72 75 73 log_printf(FUNC,RegisterFile,"genMealy_read","End"); 74 76 log_end(RegisterFile_Monolithic,FUNCTION); 75 77 }; 76 78 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp
r101 r106 14 14 namespace registerfile { 15 15 namespace registerfile_monolithic { 16 17 #undef FUNCTION 18 #define FUNCTION "RegisterFile_Monolithic::transition" 16 19 void RegisterFile_Monolithic::transition (void) 17 20 { 18 log_printf(FUNC,RegisterFile,"transition","Begin"); 21 log_begin(RegisterFile_Monolithic,FUNCTION); 22 log_function(RegisterFile_Monolithic,FUNCTION,_name.c_str()); 19 23 20 24 if (_param->_have_init_value and (PORT_READ(in_NRESET) == 0)) … … 38 42 Tdata_t data = PORT_READ(in_WRITE_DATA [i]); 39 43 40 log_printf(TRACE,RegisterFile, "transition","[%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data));44 log_printf(TRACE,RegisterFile,FUNCTION," * [%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data)); 41 45 42 46 // Write in registerFile … … 59 63 Tdata_t data = PORT_READ(in_READ_WRITE_WDATA [i]); 60 64 61 log_printf(TRACE,RegisterFile, "transition","[%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data));65 log_printf(TRACE,RegisterFile,FUNCTION," * [%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data)); 62 66 63 67 // Write in registerFile … … 82 86 #endif 83 87 88 #if defined(DEBUG_RegisterFile_Monolithic) and DEBUG_RegisterFile_Monolithic and (DEBUG >= DEBUG_TRACE) 89 { 90 log_printf(TRACE,RegisterFile,FUNCTION," * Dump RegisterFile"); 91 92 uint32_t limit = 4; 93 94 for (uint32_t i=0; i<_param->_nb_word; i+=limit) 95 { 96 std::string str = ""; 97 98 for (uint32_t j=0; j<limit; j++) 99 { 100 uint32_t index = i+j; 101 if (index >= _param->_nb_word) 102 break; 103 else 104 str+=toString("[%.4d] %.8x ",index,reg_DATA[index]); 105 } 106 107 log_printf(TRACE,RegisterFile,FUNCTION," %s",str.c_str()); 108 } 109 } 110 #endif 111 84 112 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 85 113 end_cycle(); 86 114 #endif 87 log_printf(FUNC,RegisterFile,"transition","End"); 115 116 log_end(RegisterFile_Monolithic,FUNCTION); 88 117 }; 89 118 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_full_crossbar_genMealy_read.cpp
r81 r106 17 17 18 18 19 #undef FUNCTION 20 #define FUNCTION "RegisterFile_Multi_Banked::full_crossbar_genMealy_read" 19 21 void RegisterFile_Multi_Banked::full_crossbar_genMealy_read (void) 20 22 { 21 log_printf(FUNC,RegisterFile_Multi_Banked,"full_crossbar_genMealy_read","Begin"); 23 log_begin(RegisterFile_Multi_Banked,FUNCTION); 24 log_function(RegisterFile_Multi_Banked,FUNCTION,_name.c_str()); 22 25 23 26 bool read_port_use [_param->_nb_bank][_param->_nb_port_read_by_bank]; … … 32 35 bool ack = false; 33 36 34 log_printf(TRACE,RegisterFile_Multi_Banked, "full_crossbar_genMealy_read","read[%d] : %d",i,val);37 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * read [%d] : %d",i,val); 35 38 36 39 if (val == true) … … 43 46 address = 0; 44 47 45 log_printf(TRACE,RegisterFile_Multi_Banked, "full_crossbar_genMealy_read","* address : %d",address);48 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * address : %d",address); 46 49 Taddress_t bank = address_bank (address); 47 log_printf(TRACE,RegisterFile_Multi_Banked, "full_crossbar_genMealy_read","* bank : %d",bank );50 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * bank : %d",bank ); 48 51 49 52 // Search loop … … 59 62 Taddress_t num_reg = address_num_reg (address); 60 63 61 log_printf(TRACE,RegisterFile_Multi_Banked, "full_crossbar_genMealy_read","* num_reg : %d",num_reg);62 log_printf(TRACE,RegisterFile_Multi_Banked, "full_crossbar_genMealy_read","* bank_port : %d",j);64 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * num_reg : %d",num_reg); 65 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * bank_port : %d",j); 63 66 64 67 Tdata_t data = reg_DATA[bank][num_reg]; 65 68 66 log_printf(TRACE,RegisterFile_Multi_Banked, "full_crossbar_genMealy_read","* data : %d",data);69 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * data : %d",data); 67 70 68 71 PORT_WRITE(out_READ_DATA [i], data); … … 77 80 } 78 81 79 log_ printf(FUNC,RegisterFile_Multi_Banked,"full_crossbar_genMealy_read","End");82 log_end(RegisterFile_Multi_Banked,FUNCTION); 80 83 }; 81 84 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_full_crossbar_genMealy_write.cpp
r81 r106 17 17 18 18 19 #undef FUNCTION 20 #define FUNCTION "RegisterFile_Multi_Banked::full_crossbar_genMealy_write" 19 21 void RegisterFile_Multi_Banked::full_crossbar_genMealy_write (void) 20 22 { 21 log_printf(FUNC,RegisterFile_Multi_Banked,"full_crossbar_genMealy_write","Begin"); 23 log_begin(RegisterFile_Multi_Banked,FUNCTION); 24 log_function(RegisterFile_Multi_Banked,FUNCTION,_name.c_str()); 22 25 23 26 bool write_port_use [_param->_nb_bank][_param->_nb_port_write_by_bank]; … … 32 35 bool ack = false; 33 36 34 log_printf(TRACE,RegisterFile_Multi_Banked, "full_crossbar_genMealy_write","write[%d] : %d",i,val);37 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * write [%d] : %d",i,val); 35 38 36 39 if (val == true) … … 43 46 else 44 47 address = 0; 45 log_printf(TRACE,RegisterFile_Multi_Banked, "full_crossbar_genMealy_write","* address : %d",address);48 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * address : %d",address); 46 49 Taddress_t bank = address_bank (address); 47 log_printf(TRACE,RegisterFile_Multi_Banked, "full_crossbar_genMealy_write","* bank : %d",bank );50 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * bank : %d",bank ); 48 51 49 52 // Search loop … … 60 63 Taddress_t num_reg = address_num_reg (address); 61 64 62 log_printf(TRACE,RegisterFile_Multi_Banked, "full_crossbar_genMealy_write","* num_reg : %d",num_reg);63 log_printf(TRACE,RegisterFile_Multi_Banked, "full_crossbar_genMealy_write","* bank_port : %d",j );65 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * num_reg : %d",num_reg); 66 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * bank_port : %d",j ); 64 67 65 68 internal_WRITE_NUM_REG [i] = num_reg; … … 77 80 } 78 81 79 log_ printf(FUNC,RegisterFile_Multi_Banked,"full_crossbar_genMealy_write","End");82 log_end(RegisterFile_Multi_Banked,FUNCTION); 80 83 }; 81 84 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_full_crossbar_transition.cpp
r81 r106 17 17 18 18 19 #undef FUNCTION 20 #define FUNCTION "RegisterFile_Multi_Banked::full_crossbar_genMealy_transition" 19 21 void RegisterFile_Multi_Banked::full_crossbar_transition (void) 20 22 { 21 log_printf(FUNC,RegisterFile_Multi_Banked,"full_crossbar_transition","Begin"); 23 log_begin(RegisterFile_Multi_Banked,FUNCTION); 24 log_function(RegisterFile_Multi_Banked,FUNCTION,_name.c_str()); 22 25 23 log_ printf(FUNC,RegisterFile_Multi_Banked,"full_crossbar_transition","End");26 log_end(RegisterFile_Multi_Banked,FUNCTION); 24 27 }; 25 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_genMealy_read.cpp
r81 r106 17 17 18 18 19 #undef FUNCTION 20 #define FUNCTION "RegisterFile_Multi_Banked::genMealy_read" 19 21 void RegisterFile_Multi_Banked::genMealy_read (void) 20 22 { 21 log_printf(FUNC,RegisterFile_Multi_Banked,"genMealy_read","Begin"); 23 log_begin(RegisterFile_Multi_Banked,FUNCTION); 24 log_function(RegisterFile_Multi_Banked,FUNCTION,_name.c_str()); 22 25 23 26 // call function pointer 24 27 (this->*function_genMealy_read) (); 25 28 26 27 log_printf(FUNC,RegisterFile_Multi_Banked,"genMealy_read","End"); 29 log_end(RegisterFile_Multi_Banked,FUNCTION); 28 30 }; 29 31 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_genMealy_write.cpp
r81 r106 17 17 18 18 19 #undef FUNCTION 20 #define FUNCTION "RegisterFile_Multi_Banked::genMealy_write" 19 21 void RegisterFile_Multi_Banked::genMealy_write (void) 20 22 { 21 log_printf(FUNC,RegisterFile_Multi_Banked,"genMealy_write","Begin"); 23 log_begin(RegisterFile_Multi_Banked,FUNCTION); 24 log_function(RegisterFile_Multi_Banked,FUNCTION,_name.c_str()); 22 25 23 26 // call function pointer 24 27 (this->*function_genMealy_write) (); 25 28 26 log_ printf(FUNC,RegisterFile_Multi_Banked,"genMealy_write","End");29 log_end(RegisterFile_Multi_Banked,FUNCTION); 27 30 }; 28 31 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_partial_crossbar_genMealy_read.cpp
r81 r106 17 17 18 18 19 #undef FUNCTION 20 #define FUNCTION "RegisterFile_Multi_Banked::partial_crossbar_genMealy_read" 19 21 void RegisterFile_Multi_Banked::partial_crossbar_genMealy_read (void) 20 22 { 21 log_printf(FUNC,RegisterFile_Multi_Banked,"partial_crossbar_genMealy_read","Begin"); 23 log_begin(RegisterFile_Multi_Banked,FUNCTION); 24 log_function(RegisterFile_Multi_Banked,FUNCTION,_name.c_str()); 22 25 23 26 bool read_port_use [_param->_nb_bank][_param->_nb_port_read_by_bank]; … … 32 35 bool ack = false; 33 36 34 log_printf(TRACE,RegisterFile_Multi_Banked, "full_crossbar_genMealy_read","read[%d] : %d",i,val);37 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * read [%d] : %d",i,val); 35 38 36 39 if (val == true) … … 42 45 else 43 46 address = 0; 44 log_printf(TRACE,RegisterFile_Multi_Banked, "full_crossbar_genMealy_read","* address : %d",address);47 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * address : %d",address); 45 48 Taddress_t bank = address_bank (address); 46 log_printf(TRACE,RegisterFile_Multi_Banked, "full_crossbar_genMealy_read","* bank : %d",bank );49 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * bank : %d",bank ); 47 50 48 51 // // Search loop … … 61 64 Taddress_t num_reg = address_num_reg (address); 62 65 63 log_printf(TRACE,RegisterFile_Multi_Banked, "full_crossbar_genMealy_read","* num_reg : %d",num_reg);64 log_printf(TRACE,RegisterFile_Multi_Banked, "full_crossbar_genMealy_read","* bank_port : %d",j);66 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * num_reg : %d",num_reg); 67 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * bank_port : %d",j); 65 68 66 69 Tdata_t data = reg_DATA[bank][num_reg]; 67 70 68 log_printf(TRACE,RegisterFile_Multi_Banked, "full_crossbar_genMealy_read","* data : %d",data);71 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * data : %d",data); 69 72 70 73 PORT_WRITE(out_READ_DATA [i], data); … … 79 82 } 80 83 81 log_ printf(FUNC,RegisterFile_Multi_Banked,"partial_crossbar_genMealy_read","End");84 log_end(RegisterFile_Multi_Banked,FUNCTION); 82 85 }; 83 86 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_partial_crossbar_genMealy_write.cpp
r81 r106 17 17 18 18 19 #undef FUNCTION 20 #define FUNCTION "RegisterFile_Multi_Banked::partial_crossbar_genMealy_write" 19 21 void RegisterFile_Multi_Banked::partial_crossbar_genMealy_write (void) 20 22 { 21 log_printf(FUNC,RegisterFile_Multi_Banked,"partial_crossbar_genMealy_write","Begin"); 23 log_begin(RegisterFile_Multi_Banked,FUNCTION); 24 log_function(RegisterFile_Multi_Banked,FUNCTION,_name.c_str()); 22 25 23 26 bool write_port_use [_param->_nb_bank][_param->_nb_port_write_by_bank]; … … 31 34 bool ack = false; 32 35 33 log_printf(TRACE,RegisterFile_Multi_Banked, "partial_crossbar_genMealy_write","write[%d] : %d",i,val);36 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * write [%d] : %d",i,val); 34 37 35 38 if (val == true) … … 42 45 else 43 46 address = 0; 44 log_printf(TRACE,RegisterFile_Multi_Banked, "partial_crossbar_genMealy_write","* address : %d",address);47 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * address : %d",address); 45 48 Taddress_t bank = address_bank (address); 46 log_printf(TRACE,RegisterFile_Multi_Banked, "partial_crossbar_genMealy_write","* bank : %d",bank );49 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * bank : %d",bank ); 47 50 48 51 // // Search loop … … 61 64 Taddress_t num_reg = address_num_reg (address); 62 65 63 log_printf(TRACE,RegisterFile_Multi_Banked, "partial_crossbar_genMealy_write","* num_reg : %d",num_reg);64 log_printf(TRACE,RegisterFile_Multi_Banked, "partial_crossbar_genMealy_write","* bank_port : %d",j );66 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * num_reg : %d",num_reg); 67 log_printf(TRACE,RegisterFile_Multi_Banked,FUNCTION," * bank_port : %d",j ); 65 68 66 69 internal_WRITE_NUM_REG [i] = num_reg; … … 79 82 } 80 83 81 log_ printf(FUNC,RegisterFile_Multi_Banked,"partial_crossbar_genMealy_write","End");84 log_end(RegisterFile_Multi_Banked,FUNCTION); 82 85 }; 83 86 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_partial_crossbar_transition.cpp
r81 r106 17 17 18 18 19 #undef FUNCTION 20 #define FUNCTION "RegisterFile_Multi_Banked::partial_crossbar_transition" 19 21 void RegisterFile_Multi_Banked::partial_crossbar_transition (void) 20 22 { 21 log_printf(FUNC,RegisterFile_Multi_Banked,"partial_crossbar_transition","Begin"); 23 log_begin(RegisterFile_Multi_Banked,FUNCTION); 24 log_function(RegisterFile_Multi_Banked,FUNCTION,_name.c_str()); 22 25 23 log_ printf(FUNC,RegisterFile_Multi_Banked,"partial_crossbar_transition","End");26 log_end(RegisterFile_Multi_Banked,FUNCTION); 24 27 }; 25 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_transition.cpp
r81 r106 16 16 namespace registerfile_multi_banked { 17 17 18 18 #undef FUNCTION 19 #define FUNCTION "RegisterFile_Multi_Banked::transition" 19 20 void RegisterFile_Multi_Banked::transition (void) 20 21 { 21 log_printf(FUNC,RegisterFile_Multi_Banked,"transition","Begin"); 22 log_begin(RegisterFile_Multi_Banked,FUNCTION); 23 log_function(RegisterFile_Multi_Banked,FUNCTION,_name.c_str()); 22 24 23 25 // call function pointer … … 35 37 } 36 38 39 #if defined(DEBUG_RegisterFile_Multi_Banked) and DEBUG_RegisterFile_Multi_Banked and (DEBUG >= DEBUG_TRACE) 40 { 41 log_printf(TRACE,RegisterFile,FUNCTION," * Dump RegisterFile"); 42 43 uint32_t limit = 4; 44 45 for (uint32_t i=0; i<_param->_nb_bank; i++) 46 { 47 48 log_printf(TRACE,RegisterFile,FUNCTION," Bank %d",i); 49 50 for (uint32_t j=0; j<_param->_nb_word_by_bank; j+=limit) 51 { 52 std::string str = ""; 53 54 for (uint32_t k=0; k<limit; k++) 55 { 56 uint32_t index = j+k; 57 if (index >= _param->_nb_word) 58 break; 59 else 60 str+=toString("[%.4d] %.8x ",index,reg_DATA[i][index]); 61 } 62 63 log_printf(TRACE,RegisterFile,FUNCTION," %s",str.c_str()); 64 } 65 } 66 } 67 #endif 68 37 69 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 38 70 end_cycle(); 39 71 #endif 40 72 41 log_ printf(FUNC,RegisterFile_Multi_Banked,"transition","End");73 log_end(RegisterFile_Multi_Banked,FUNCTION); 42 74 }; 43 75
Note: See TracChangeset
for help on using the changeset viewer.