Changeset 124 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
- Timestamp:
- Jun 17, 2009, 2:11:25 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.h
r88 r124 32 32 public : const uint32_t _nb_port_write_by_bank; // Local write port 33 33 public : const Tcrossbar_t _crossbar ; 34 public : const bool _have_init_value; 35 public : const std::string _init_value; 34 36 35 37 public : const uint32_t _size_address ; … … 60 62 uint32_t nb_port_read_by_bank , 61 63 uint32_t nb_port_write_by_bank, 62 Tcrossbar_t crossbar ); 64 Tcrossbar_t crossbar , 65 std::string init_value="" ); 63 66 // public : Parameters (Parameters & param) ; 64 67 public : ~Parameters () ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/Parameters.cpp
r88 r124 23 23 uint32_t nb_port_read_by_bank , 24 24 uint32_t nb_port_write_by_bank, 25 Tcrossbar_t crossbar ): 25 Tcrossbar_t crossbar , 26 std::string init_value 27 ): 26 28 _nb_port_read (nb_port_read ), 27 29 _nb_port_write (nb_port_write ), … … 32 34 _nb_port_write_by_bank (nb_port_write_by_bank), 33 35 _crossbar (crossbar ), 36 _have_init_value (init_value != "" ), 37 _init_value (init_value ), 34 38 _size_address (static_cast<uint32_t>(ceil(log2(_nb_word)))), 35 39 _size_address_by_bank (_size_address - static_cast<uint32_t>(ceil(log2(_nb_bank)))), -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_transition.cpp
r111 r124 25 25 // call function pointer 26 26 // (this->*function_transition) (); 27 28 for (uint32_t i=0; i<_param->_nb_port_write; i++) 27 if (_param->_have_init_value and (PORT_READ(in_NRESET) == 0)) 29 28 { 30 if (internal_WRITE_VAL [i] == 1) 31 { 32 Tdata_t data = PORT_READ(in_WRITE_DATA [i]); 33 34 // Write in registerFile 35 reg_DATA[internal_WRITE_BANK[i]][internal_WRITE_NUM_REG[i]] = data; 36 } 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); 32 } 33 else 34 { 35 for (uint32_t i=0; i<_param->_nb_port_write; i++) 36 { 37 if (internal_WRITE_VAL [i] == 1) 38 { 39 Tdata_t data = PORT_READ(in_WRITE_DATA [i]); 40 41 // Write in registerFile 42 reg_DATA[internal_WRITE_BANK[i]][internal_WRITE_NUM_REG[i]] = data; 43 } 44 } 37 45 } 38 46
Note: See TracChangeset
for help on using the changeset viewer.