- Timestamp:
- Jun 26, 2009, 10:43:23 AM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h
r82 r128 5 5 * $Id$ 6 6 * 7 * [ 7 * [ Description ] 8 8 * 9 9 */ … … 18 18 19 19 // typedef uint32_t Taddress_t; 20 typedef uint32_t Tdata_t;20 typedef Tgeneral_data_t Tdata_t; 21 21 22 22 }; // end namespace registerfile_monolithic -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp
r111 r128 22 22 log_function(RegisterFile_Monolithic,FUNCTION,_name.c_str()); 23 23 24 if ( _param->_have_init_value and (PORT_READ(in_NRESET) == 0))24 if (PORT_READ(in_NRESET) == 0) 25 25 { 26 for (uint32_t i=0; i<_param->_nb_word; ++i) 27 reg_DATA[i] = fromString<Tdata_t>(_param->_init_value); 26 if (_param->_have_init_value) 27 { 28 for (uint32_t i=0; i<_param->_nb_word; ++i) 29 reg_DATA[i] = fromString<Tdata_t>(_param->_init_value); 30 } 31 else 32 { 33 for (uint32_t i=0; i<_param->_nb_word; ++i) 34 reg_DATA[i] = 0; 35 } 28 36 } 29 37 else … … 31 39 for (uint32_t i=0; i<_param->_nb_port_write; i++) 32 40 { 41 log_printf(TRACE,RegisterFile,FUNCTION," * WRITE [%d] : %d",i,PORT_READ(in_WRITE_VAL[i])); 42 33 43 // Have a write? 34 44 if ( PORT_READ(in_WRITE_VAL[i]) == true) … … 38 48 (*_stat_nb_write) ++; 39 49 #endif 40 50 41 51 Taddress_t address = (_param->_have_port_address)?PORT_READ(in_WRITE_ADDRESS[i]):0; 42 52 Tdata_t data = PORT_READ(in_WRITE_DATA [i]); 53 54 log_printf(TRACE,RegisterFile,FUNCTION," * address : %d",address); 55 log_printf(TRACE,RegisterFile,FUNCTION," * gloup"); 56 log_printf(TRACE,RegisterFile,FUNCTION," * data : %d",data); 43 57 44 58 log_printf(TRACE,RegisterFile,FUNCTION," * [%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data)); 59 60 #ifdef DEBUG_TEST 61 if (address >= _param->_nb_word) 62 throw ERRORMORPHEO(FUNCTION,toString(_("Address (%d) is invalid (size : %d).\n"),address,_param->_nb_word)); 63 #endif 45 64 46 65 // Write in registerFile … … 50 69 for (uint32_t i=0; i<_param->_nb_port_read_write; i++) 51 70 { 71 log_printf(TRACE,RegisterFile,FUNCTION," * READ_WRITE [%d] : %d",i,PORT_READ(in_READ_WRITE_VAL[i])); 72 52 73 // Have a read_write? 53 74 if (PORT_READ(in_READ_WRITE_VAL[i]) == true) … … 65 86 log_printf(TRACE,RegisterFile,FUNCTION," * [%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data)); 66 87 88 89 #ifdef DEBUG_TEST 90 if (address >= _param->_nb_word) 91 throw ERRORMORPHEO(FUNCTION,toString(_("Address (%d) is invalid (size : %d).\n"),address,_param->_nb_word)); 92 #endif 93 67 94 // Write in registerFile 68 95 reg_DATA[address] = data; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h
r82 r128 5 5 * $Id$ 6 6 * 7 * [ 7 * [ Description ] 8 8 * 9 9 */ … … 19 19 20 20 //typedef uint32_t Taddress_t; 21 typedef uint32_t Tdata_t;21 typedef Tgeneral_data_t Tdata_t; 22 22 23 23 }; // end namespace registerfile_multi_banked -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_transition.cpp
r124 r128 25 25 // call function pointer 26 26 // (this->*function_transition) (); 27 if ( _param->_have_init_value and (PORT_READ(in_NRESET) == 0))27 if (PORT_READ(in_NRESET) == 0) 28 28 { 29 for (uint32_t i=0; i<_param->_nb_bank; ++i) 30 for (uint32_t j=0; j<_param->_nb_word; ++j) 31 reg_DATA[i][j] = fromString<Tdata_t>(_param->_init_value); 29 if (_param->_have_init_value) 30 { 31 for (uint32_t i=0; i<_param->_nb_bank; ++i) 32 for (uint32_t j=0; j<_param->_nb_word; ++j) 33 reg_DATA[i][j] = fromString<Tdata_t>(_param->_init_value); 34 } 35 else 36 { 37 for (uint32_t i=0; i<_param->_nb_bank; ++i) 38 for (uint32_t j=0; j<_param->_nb_word; ++j) 39 reg_DATA[i][j] = 0; 40 } 32 41 } 33 42 else -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile_deallocation.cpp
r81 r128 22 22 delete in_NRESET; 23 23 // ----- Interface Read 24 for (uint32_t i=0; i<_param->_nb_port_read; i++) 25 { 26 delete in_READ_VAL [i]; 27 delete out_READ_ACK [i]; 28 if (_param->_have_port_address == true) 29 delete in_READ_ADDRESS[i]; 30 delete out_READ_DATA [i]; 31 } 32 24 33 delete [] in_READ_VAL ; 25 34 delete [] out_READ_ACK ; … … 29 38 30 39 // ----- Interface Write 40 for (uint32_t i=0; i<_param->_nb_port_write; i++) 41 { 42 delete in_WRITE_VAL [i]; 43 delete out_WRITE_ACK [i]; 44 if (_param->_have_port_address == true) 45 delete in_WRITE_ADDRESS[i]; 46 delete in_WRITE_DATA [i]; 47 } 48 31 49 delete [] in_WRITE_VAL ; 32 50 delete [] out_WRITE_ACK ;
Note: See TracChangeset
for help on using the changeset viewer.