- Timestamp:
- Jan 31, 2008, 6:46:41 PM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo
- Files:
-
- 2 added
- 80 deleted
- 218 edited
- 16 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Functionnal_unit.h
r72 r75 55 55 56 56 #ifdef STATISTICS 57 p rivate: Stat * _stat;57 public : Stat * _stat; 58 58 59 59 private : counter_t * _stat_use_functionnal_unit; … … 162 162 #ifdef STATISTICS 163 163 public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); 164 public : std::string statistics_print (uint32_t depth);165 164 #endif 166 165 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_allocation.cpp
r73 r75 21 21 void Functionnal_unit::allocation (void) 22 22 { 23 string rename;24 25 23 log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin"); 26 24 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_statistics_declaration.cpp
r72 r75 25 25 log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin"); 26 26 27 _stat = new Stat (static_cast<st ring>(_name),27 _stat = new Stat (static_cast<std::string>(_name), 28 28 "Functionnal_unit", 29 29 param_statistics); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/Cache.h
r71 r75 27 27 private : const uint32_t _miss_rate; 28 28 private : const uint32_t _miss_penality; 29 private : list<cache_rsp_t> _list_respons;29 private : std::list<cache_rsp_t> _list_respons; 30 30 31 31 public : Cache_t (uint32_t miss_rate, uint32_t miss_penality): … … 59 59 60 60 // find good place 61 list<cache_rsp_t>::iterator i;61 std::list<cache_rsp_t>::iterator i; 62 62 for(i = _list_respons.begin(); (i != _list_respons.end()) and (i->_cycle<=cycle); i++); 63 63 … … 82 82 public : void end_cycle (void) 83 83 { 84 for( list<cache_rsp_t>::iterator i = _list_respons.begin(); i != _list_respons.end(); i++)84 for(std::list<cache_rsp_t>::iterator i = _list_respons.begin(); i != _list_respons.end(); i++) 85 85 { 86 86 i->_cycle --; … … 90 90 public : void print (void) 91 91 { 92 for( list<cache_rsp_t>::iterator i = _list_respons.begin(); i != _list_respons.end(); i++)92 for(std::list<cache_rsp_t>::iterator i = _list_respons.begin(); i != _list_respons.end(); i++) 93 93 { 94 94 std::cout << "{" << i->_cycle << "}\t" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/Memory.h
r72 r75 53 53 } 54 54 55 cout << "=====[ Memory's information ]" <<endl56 << " * _nb_context : " << _nb_context <<endl57 << " * _nb_word : " << _nb_word <<endl58 << " * _size_word : " << _size_word <<endl59 << " * _shift_addr : " << _shift_addr <<endl60 << " * _mask_addr : " << hex << _mask_addr << dec <<endl;55 std::cout << "=====[ Memory's information ]" << std::endl 56 << " * _nb_context : " << _nb_context << std::endl 57 << " * _nb_word : " << _nb_word << std::endl 58 << " * _size_word : " << _size_word << std::endl 59 << " * _shift_addr : " << _shift_addr << std::endl 60 << " * _mask_addr : " << std::hex << _mask_addr << std::dec << std::endl; 61 61 } 62 62 … … 71 71 morpheo::behavioural::Tdcache_data_t data) 72 72 { 73 cout << "<Memory::access>" <<endl74 << " * context : " << context <<endl75 << " * address : " << hex << address << dec <<endl76 << " * type : " << type <<endl77 << " * wdata : " << hex << data << dec <<endl;73 std::cout << "<Memory::access>" << std::endl 74 << " * context : " << context << std::endl 75 << " * address : " << std::hex << address << std::dec << std::endl 76 << " * type : " << type << std::endl 77 << " * wdata : " << std::hex << data << std::dec << std::endl; 78 78 79 79 morpheo::behavioural::Tdcache_data_t rdata; … … 90 90 rdata = other (context, address, type); 91 91 92 cout << " * rdata : " << hex << rdata << dec <<endl;92 std::cout << " * rdata : " << std::hex << rdata << std::dec << std::endl; 93 93 94 94 return rdata; … … 161 161 morpheo::behavioural::Tdcache_data_t data) 162 162 { 163 cout << " * write" <<endl;163 std::cout << " * write" << std::endl; 164 164 165 165 if (context>_nb_context) … … 172 172 morpheo::behavioural::Tdcache_address_t MSB = address >> _shift_addr; 173 173 174 cout <<hex175 << " * LSB : " << LSB << endl176 << " * MSB : " << MSB << endl177 << dec;174 std::cout << std::hex 175 << " * LSB : " << LSB << std::endl 176 << " * MSB : " << MSB << std::endl 177 << std::dec; 178 178 179 179 morpheo::behavioural::Tdcache_data_t data_old = _data [context][MSB]; … … 193 193 uint32_t index_max = index_min+memory_size; 194 194 195 cout << " * type : " << type <<endl196 << " * memory_size : " << memory_size << endl197 << " * index_min : " << index_min << endl198 << " * index_max : " << index_max << endl;195 std::cout << " * type : " << type << std::endl 196 << " * memory_size : " << memory_size << std::endl 197 << " * index_min : " << index_min << std::endl 198 << " * index_max : " << index_max << std::endl; 199 199 200 200 morpheo::behavioural::Tdcache_data_t data_insert = data<<index_min; // the data is aligned at LSB 201 201 202 // cout << "read :" <<endl203 // << " * context : " << context << endl204 // << hex205 // << " * address : " << address << endl206 // << " * LSB : " << LSB << endl207 // << " * MSB : " << MSB << endl208 // << dec209 // << " * index_min : " << index_min << endl210 // << " * index_max : " << index_max << endl211 // << " * type : " << type << endl;202 // std::cout << "read :" << std::endl 203 // << " * context : " << context << std::endl 204 // << std::hex 205 // << " * address : " << address << std::endl 206 // << " * LSB : " << LSB << std::endl 207 // << " * MSB : " << MSB << std::endl 208 // << std::dec 209 // << " * index_min : " << index_min << std::endl 210 // << " * index_max : " << index_max << std::endl 211 // << " * type : " << type << std::endl; 212 212 213 213 if (index_max > _size_word) … … 218 218 _data [context][MSB] = data_new; 219 219 220 cout <<hex221 << " * data_old : " << data_old <<endl222 << " * data_new : " << data_new <<endl223 <<dec;220 std::cout << std::hex 221 << " * data_old : " << data_old << std::endl 222 << " * data_new : " << data_new << std::endl 223 << std::dec; 224 224 225 225 … … 277 277 } 278 278 std::cout << " - " 279 << hex279 << std::hex 280 280 << i->_address << " : " 281 281 << i->_data_old << " -> " 282 282 << i->_data_new << std::endl 283 << hex;283 << std::hex; 284 284 } 285 285 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/MemoryRequest.h
r71 r75 126 126 { 127 127 return os << "<" << morpheo::toString(x._cycle) << "> : " 128 << "{" << morpheo::toString(static_cast<uint32_t>(x._packet_id)) << "}" << endl129 << "\t * context / front_end / ooo_engine : " << morpheo::toString(static_cast<uint32_t>(x._context_id )) << " - " << morpheo::toString(static_cast<uint32_t>(x._front_end_id )) << " - " << morpheo::toString(static_cast<uint32_t>(x._ooo_engine_id)) << endl130 << "\t * operation / type / write_spec_ko : " << morpheo::toString(static_cast<uint32_t>(x._operation)) << " " << morpheo::toString(static_cast<uint32_t>(x._type)) << " " << morpheo::toString(static_cast<uint32_t>(x._write_spec_ko)) << endl131 << "\t * ptr_write store/load : " << morpheo::toString(static_cast<uint32_t>(x._store_queue_ptr_write)) << " " << morpheo::toString(static_cast<uint32_t>(x._load_queue_ptr_write)) << endl132 << "\t * immediat / data_ra / data_rb : " << morpheo::toString(static_cast<uint32_t>(x._immediat)) << " - " << morpheo::toString(static_cast<uint32_t>(x._data_ra)) << " - " << morpheo::toString(static_cast<uint32_t>(x._data_rb)) << endl133 << "\t * write_rd / num_reg_rd : " << morpheo::toString(static_cast<uint32_t>(x._write_rd)) << " " << morpheo::toString(static_cast<uint32_t>(x._num_reg_rd)) << endl134 << "\t * data_wait : " << morpheo::toString(static_cast<uint32_t>(x._data_wait)) << endl;128 << "{" << morpheo::toString(static_cast<uint32_t>(x._packet_id)) << "}" << std::endl 129 << "\t * context / front_end / ooo_engine : " << morpheo::toString(static_cast<uint32_t>(x._context_id )) << " - " << morpheo::toString(static_cast<uint32_t>(x._front_end_id )) << " - " << morpheo::toString(static_cast<uint32_t>(x._ooo_engine_id)) << std::endl 130 << "\t * operation / type / write_spec_ko : " << morpheo::toString(static_cast<uint32_t>(x._operation)) << " " << morpheo::toString(static_cast<uint32_t>(x._type)) << " " << morpheo::toString(static_cast<uint32_t>(x._write_spec_ko)) << std::endl 131 << "\t * ptr_write store/load : " << morpheo::toString(static_cast<uint32_t>(x._store_queue_ptr_write)) << " " << morpheo::toString(static_cast<uint32_t>(x._load_queue_ptr_write)) << std::endl 132 << "\t * immediat / data_ra / data_rb : " << morpheo::toString(static_cast<uint32_t>(x._immediat)) << " - " << morpheo::toString(static_cast<uint32_t>(x._data_ra)) << " - " << morpheo::toString(static_cast<uint32_t>(x._data_rb)) << std::endl 133 << "\t * write_rd / num_reg_rd : " << morpheo::toString(static_cast<uint32_t>(x._write_rd)) << " " << morpheo::toString(static_cast<uint32_t>(x._num_reg_rd)) << std::endl 134 << "\t * data_wait : " << morpheo::toString(static_cast<uint32_t>(x._data_wait)) << std::endl; 135 135 } 136 136 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Load_store_unit.h
r71 r75 30 30 #include "Behavioural/include/Vhdl.h" 31 31 #endif 32 33 using namespace std;34 using namespace morpheo::behavioural::generic::queue_control;35 32 36 33 namespace morpheo { … … 51 48 // -----[ fields ]---------------------------------------------------- 52 49 // Parameters 53 protected : const st ring _name;50 protected : const std::string _name; 54 51 55 52 protected : const Parameters * _param; … … 194 191 sc_module_name name, 195 192 #else 196 st ringname,193 std::string name, 197 194 #endif 198 195 #ifdef STATISTICS … … 221 218 #ifdef STATISTICS 222 219 public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); 223 public : string statistics_print (uint32_t depth);224 220 #endif 225 221 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_allocation.cpp
r72 r75 24 24 void Load_store_unit::allocation (void) 25 25 { 26 string rename;27 28 26 log_printf(FUNC,Load_store_unit,FUNCTION,"Begin"); 29 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_transition.cpp
r72 r75 660 660 #if DEBUG>=DEBUG_TRACE 661 661 // ***** dump store queue 662 cout << "Dump STORE_QUEUE :" <<endl663 << "ptr_read : " << toString(static_cast<uint32_t>(reg_STORE_QUEUE_PTR_READ)) <<endl;662 std::cout << "Dump STORE_QUEUE :" << std::endl 663 << "ptr_read : " << toString(static_cast<uint32_t>(reg_STORE_QUEUE_PTR_READ)) << std::endl; 664 664 665 665 for (uint32_t i=0; i<_param->_size_store_queue; i++) 666 666 { 667 667 uint32_t j = (reg_STORE_QUEUE_PTR_READ+i)%_param->_size_store_queue; 668 cout << "{" << j << "}" <<endl669 << _store_queue[j] <<endl;668 std::cout << "{" << j << "}" << std::endl 669 << _store_queue[j] << std::endl; 670 670 } 671 671 672 672 // ***** dump speculative_access queue 673 cout << "Dump SPECULATIVE_ACCESS_QUEUE :" <<endl;673 std::cout << "Dump SPECULATIVE_ACCESS_QUEUE :" << std::endl; 674 674 675 675 for (uint32_t i=0; i<_param->_size_speculative_access_queue; i++) 676 676 { 677 677 uint32_t j = (*_speculative_access_queue_control)[i]; 678 cout << "{" << j << "}" <<endl679 << _speculative_access_queue[j] << endl;678 std::cout << "{" << j << "}" << std::endl 679 << _speculative_access_queue[j] << std::endl; 680 680 } 681 681 682 682 // ***** dump load queue 683 cout << "Dump LOAD_QUEUE :" <<endl684 << "ptr_read_check_priority : " << toString(static_cast<uint32_t>(reg_LOAD_QUEUE_CHECK_PRIORITY)) << endl;683 std::cout << "Dump LOAD_QUEUE :" << std::endl 684 << "ptr_read_check_priority : " << toString(static_cast<uint32_t>(reg_LOAD_QUEUE_CHECK_PRIORITY)) << std::endl; 685 685 686 686 for (uint32_t i=0; i<_param->_size_load_queue; i++) 687 687 { 688 688 uint32_t j = i; 689 cout << "{" << j << "}" <<endl690 << _load_queue[j] << endl;689 std::cout << "{" << j << "}" << std::endl 690 << _load_queue[j] << std::endl; 691 691 } 692 692 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Parameters.h
r68 r75 77 77 public : ~Parameters () ; 78 78 79 public : st ringmsg_error (void);79 public : std::string msg_error (void); 80 80 81 public : st ring print (uint32_t depth);82 public : friend ostream& operator<< (ostream& output_stream,83 81 public : std::string print (uint32_t depth); 82 public : friend std::ostream& operator<< (std::ostream& output_stream, 83 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Parameters & x); 84 84 }; 85 85 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Read_queue.h
r66 r75 21 21 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Parameters.h" 22 22 #ifdef STATISTICS 23 #include "Behavioural/ Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Statistics.h"23 #include "Behavioural/include/Stat.h" 24 24 #endif 25 25 #include "Behavioural/include/Component.h" … … 27 27 #include "Behavioural/include/Vhdl.h" 28 28 #endif 29 30 using namespace std;31 29 32 30 namespace morpheo { … … 60 58 public : Tspecial_address_t _num_reg_re ; 61 59 62 friend ostream& operator<< (ostream& output_stream,60 friend std::ostream& operator<< (std::ostream& output_stream, 63 61 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Tread_queue_entry_t & x) 64 62 { 65 output_stream << " * _context_id : " << toString(x._context_id ) << endl66 << " * _front_end_id : " << toString(x._front_end_id ) << endl67 << " * _ooo_engine_id : " << toString(x._ooo_engine_id) << endl68 << " * _rob_id : " << toString(x._rob_id ) << endl69 << " * _operation : " << toString(x._operation ) << endl70 << " * _type : " << toString(x._type ) << endl71 << " * _has_immediat : " << toString(x._has_immediat ) << endl72 << " * _immediat : " << toString(x._immediat ) << endl73 << " * _read_ra : " << toString(x._read_ra ) << endl74 << " * _num_reg_ra : " << toString(x._num_reg_ra ) << endl75 << " * _read_rb : " << toString(x._read_rb ) << endl76 << " * _num_reg_rb : " << toString(x._num_reg_rb ) << endl77 << " * _read_rc : " << toString(x._read_rc ) << endl78 << " * _num_reg_rc : " << toString(x._num_reg_rc ) << endl79 << " * _write_rd : " << toString(x._write_rd ) << endl80 << " * _num_reg_rd : " << toString(x._num_reg_rd ) << endl81 << " * _write_re : " << toString(x._write_re ) << endl82 << " * _num_reg_re : " << toString(x._num_reg_re ) << endl;63 output_stream << " * _context_id : " << toString(x._context_id ) << std::endl 64 << " * _front_end_id : " << toString(x._front_end_id ) << std::endl 65 << " * _ooo_engine_id : " << toString(x._ooo_engine_id) << std::endl 66 << " * _rob_id : " << toString(x._rob_id ) << std::endl 67 << " * _operation : " << toString(x._operation ) << std::endl 68 << " * _type : " << toString(x._type ) << std::endl 69 << " * _has_immediat : " << toString(x._has_immediat ) << std::endl 70 << " * _immediat : " << toString(x._immediat ) << std::endl 71 << " * _read_ra : " << toString(x._read_ra ) << std::endl 72 << " * _num_reg_ra : " << toString(x._num_reg_ra ) << std::endl 73 << " * _read_rb : " << toString(x._read_rb ) << std::endl 74 << " * _num_reg_rb : " << toString(x._num_reg_rb ) << std::endl 75 << " * _read_rc : " << toString(x._read_rc ) << std::endl 76 << " * _num_reg_rc : " << toString(x._num_reg_rc ) << std::endl 77 << " * _write_rd : " << toString(x._write_rd ) << std::endl 78 << " * _num_reg_rd : " << toString(x._num_reg_rd ) << std::endl 79 << " * _write_re : " << toString(x._write_re ) << std::endl 80 << " * _num_reg_re : " << toString(x._num_reg_re ) << std::endl; 83 81 84 82 return output_stream; … … 156 154 } 157 155 158 friend ostream& operator<< (ostream& output_stream,156 friend std::ostream& operator<< (std::ostream& output_stream, 159 157 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Tread_queue_head_entry_t & x) 160 158 { 161 output_stream << " * _context_id : " << x._context_id << endl162 << " * _front_end_id : " << x._front_end_id << endl163 << " * _ooo_engine_id : " << x._ooo_engine_id<< endl164 << " * _rob_id : " << x._rob_id << endl165 << " * _operation : " << x._operation << endl166 << " * _type : " << x._type << endl167 << " * _has_immediat : " << x._has_immediat << endl168 << " * _immediat : " << x._immediat << endl169 << " * _read_ra : " << x._read_ra << endl170 << " * _read_ra_val : " << x._read_ra_val << endl171 << " * _num_reg_ra : " << x._num_reg_ra << endl172 << " * _data_ra_val : " << x._data_ra_val << endl173 << " * _data_ra : " << x._data_ra << endl174 << " * _read_rb : " << x._read_rb << endl175 << " * _read_rb_val : " << x._read_rb_val << endl176 << " * _num_reg_rb : " << x._num_reg_rb << endl177 << " * _data_rb_val : " << x._data_rb_val << endl178 << " * _data_rb : " << x._data_rb << endl179 << " * _read_rc : " << x._read_rc << endl180 << " * _read_rc_val : " << x._read_rc_val << endl181 << " * _num_reg_rc : " << x._num_reg_rc << endl182 << " * _data_rc_val : " << x._data_rc_val << endl183 << " * _data_rc : " << x._data_rc << endl184 << " * _write_rd : " << x._write_rd << endl185 << " * _num_reg_rd : " << x._num_reg_rd << endl186 << " * _write_re : " << x._write_re << endl187 << " * _num_reg_re : " << x._num_reg_re << endl;159 output_stream << " * _context_id : " << x._context_id << std::endl 160 << " * _front_end_id : " << x._front_end_id << std::endl 161 << " * _ooo_engine_id : " << x._ooo_engine_id<< std::endl 162 << " * _rob_id : " << x._rob_id << std::endl 163 << " * _operation : " << x._operation << std::endl 164 << " * _type : " << x._type << std::endl 165 << " * _has_immediat : " << x._has_immediat << std::endl 166 << " * _immediat : " << x._immediat << std::endl 167 << " * _read_ra : " << x._read_ra << std::endl 168 << " * _read_ra_val : " << x._read_ra_val << std::endl 169 << " * _num_reg_ra : " << x._num_reg_ra << std::endl 170 << " * _data_ra_val : " << x._data_ra_val << std::endl 171 << " * _data_ra : " << x._data_ra << std::endl 172 << " * _read_rb : " << x._read_rb << std::endl 173 << " * _read_rb_val : " << x._read_rb_val << std::endl 174 << " * _num_reg_rb : " << x._num_reg_rb << std::endl 175 << " * _data_rb_val : " << x._data_rb_val << std::endl 176 << " * _data_rb : " << x._data_rb << std::endl 177 << " * _read_rc : " << x._read_rc << std::endl 178 << " * _read_rc_val : " << x._read_rc_val << std::endl 179 << " * _num_reg_rc : " << x._num_reg_rc << std::endl 180 << " * _data_rc_val : " << x._data_rc_val << std::endl 181 << " * _data_rc : " << x._data_rc << std::endl 182 << " * _write_rd : " << x._write_rd << std::endl 183 << " * _num_reg_rd : " << x._num_reg_rd << std::endl 184 << " * _write_re : " << x._write_re << std::endl 185 << " * _num_reg_re : " << x._num_reg_re << std::endl; 188 186 189 187 return output_stream; … … 198 196 // -----[ fields ]---------------------------------------------------- 199 197 // Parameters 200 protected : const st ring_name;198 protected : const std::string _name; 201 199 protected : const Parameters * _param; 202 200 203 201 #ifdef STATISTICS 204 p rivate : Statistics* _stat;202 public : Stat * _stat; 205 203 #endif 206 204 … … 302 300 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 303 301 protected : Tread_queue_head_entry_t * _queue_head; 304 protected : queue<Tread_queue_entry_t *> * _queue;302 protected : std::queue<Tread_queue_entry_t *> * _queue; 305 303 306 304 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 328 326 sc_module_name name, 329 327 #else 330 st ringname,328 std::string name, 331 329 #endif 332 330 #ifdef STATISTICS … … 349 347 #endif 350 348 #ifdef STATISTICS 351 public : string statistics (uint32_t depth);349 public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); 352 350 #endif 353 351 … … 357 355 private : void vhdl_body (Vhdl * & vhdl); 358 356 #endif 359 360 #if def VHDL_TESTBENCH361 private : void vhdl_testbench_transition(void);357 358 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 359 private : void end_cycle (void); 362 360 #endif 363 361 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Parameters_msg_error.cpp
r68 r75 8 8 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Parameters.h" 9 9 #include <sstream> 10 using namespace std;11 10 12 11 namespace morpheo { … … 20 19 21 20 22 st ring Parameters::msg_error(void)21 std::string Parameters::msg_error(void) 23 22 { 24 23 log_printf(FUNC,Read_queue,"msg_error","Begin"); 25 24 26 st ring msg = "";25 std::string msg = ""; 27 26 28 27 // if (_size_queue < 2) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Parameters_print.cpp
r66 r75 8 8 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Parameters.h" 9 9 #include "Behavioural/include/XML.h" 10 using namespace std;11 10 12 11 namespace morpheo { … … 20 19 21 20 22 st ring Parameters::print (uint32_t depth)21 std::string Parameters::print (uint32_t depth) 23 22 { 24 23 log_printf(FUNC,Read_queue,"print","Begin"); … … 47 46 }; 48 47 49 ostream& operator<< (ostream& output_stream ,50 48 std::ostream& operator<< (std::ostream& output_stream , 49 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Parameters & x) 51 50 { 52 51 output_stream << x.print(0); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue.cpp
r68 r75 39 39 40 40 #ifdef STATISTICS 41 log_printf(INFO,Read_queue,"Read_queue","Allocation of statistics"); 42 43 // Allocation of statistics 44 _stat = new Statistics (static_cast<string>(_name), 45 param_statistics , 46 param); 41 log_printf(INFO,Read_queue,FUNCTION,"Allocation of statistics"); 42 43 statistics_declaration(param_statistics); 47 44 #endif 48 45 … … 217 214 log_printf(INFO,Read_queue,"~Read_queue","Generate Statistics file"); 218 215 219 _stat->generate_file(statistics(0));220 221 216 delete _stat; 222 217 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_allocation.cpp
r68 r75 21 21 void Read_queue::allocation (void) 22 22 { 23 string rename;24 25 23 log_printf(FUNC,Read_queue,"allocation","Begin"); 26 24 … … 238 236 239 237 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 240 _queue = new queue<Tread_queue_entry_t *>;238 _queue = new std::queue<Tread_queue_entry_t *>; 241 239 _queue_head = new Tread_queue_head_entry_t; 242 240 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_end_cycle.cpp
r59 r75 1 #if def VHDL_TESTBENCH1 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 2 2 /* 3 3 * $Id$ … … 19 19 20 20 21 void Read_queue:: vhdl_testbench_transition()21 void Read_queue::end_cycle () 22 22 { 23 23 log_printf(FUNC,Read_queue,"vhdl_testbench_transition","Begin"); 24 24 25 #ifdef STATISTICS 26 _stat->end_cycle(); 27 #endif 28 29 #ifdef VHDL_TESTBENCH 25 30 // Evaluation before read the ouput signal 26 // sc_start(0); 27 31 // sc_start(0); 28 32 _interfaces->testbench(); 33 #endif 29 34 30 35 log_printf(FUNC,Read_queue,"vhdl_testbench_transition","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_statistics_declaration.cpp
r59 r75 18 18 namespace read_queue { 19 19 20 #undef FUNCTION 21 #define FUNCTION "Read_queue::statistics_declaration" 22 void Read_queue::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics) 23 { 24 log_printf(FUNC,Read_queue,FUNCTION,"Begin"); 20 25 21 string Read_queue::statistics (uint32_t depth) 22 { 23 log_printf(FUNC,Read_queue,"statistics","Begin"); 24 25 string txt = _stat->print(depth); 26 _stat = new Stat (static_cast<std::string>(_name), 27 "Read_queue", 28 param_statistics); 26 29 27 log_printf(FUNC,Read_queue,"statistics","End"); 28 29 return txt; 30 log_printf(FUNC,Read_queue,FUNCTION,"End"); 30 31 }; 31 32 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_transition.cpp
r68 r75 138 138 } 139 139 140 #ifdef STATISTICS 141 _stat->add(); 142 #endif 143 144 #ifdef VHDL_TESTBENCH 145 vhdl_testbench_transition (); 140 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 141 end_cycle (); 146 142 #endif 147 143 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_vhdl.cpp
r68 r75 35 35 ); 36 36 37 st ring queue_name = _name + "_queue";37 std::string queue_name = _name + "_queue"; 38 38 queue = new morpheo::behavioural::generic::queue::Queue 39 39 (queue_name.c_str() -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_vhdl_body.cpp
r68 r75 208 208 for (int32_t i=_param->_nb_gpr_write-1; i>=0 ; i--) 209 209 { 210 st ring cmp;210 std::string cmp; 211 211 212 212 if (_param->_have_port_ooo_engine_id) … … 228 228 for (int32_t i=_param->_nb_gpr_write-1; i>=0 ; i--) 229 229 { 230 st ring cmp;230 std::string cmp; 231 231 232 232 if (_param->_have_port_ooo_engine_id) … … 248 248 for (int32_t i=_param->_nb_spr_write-1; i>=0 ; i--) 249 249 { 250 st ring cmp;250 std::string cmp; 251 251 252 252 if (_param->_have_port_ooo_engine_id) … … 278 278 for (int32_t i=_param->_nb_gpr_write-1; i>=0 ; i--) 279 279 { 280 st ring cmp;280 std::string cmp; 281 281 282 282 if (_param->_have_port_ooo_engine_id) … … 298 298 for (int32_t i=_param->_nb_gpr_write-1; i>=0 ; i--) 299 299 { 300 st ring cmp;300 std::string cmp; 301 301 302 302 if (_param->_have_port_ooo_engine_id) … … 318 318 for (int32_t i=_param->_nb_spr_write-1; i>=0 ; i--) 319 319 { 320 st ring cmp;320 std::string cmp; 321 321 322 322 if (_param->_have_port_ooo_engine_id) … … 343 343 for (int32_t i=_param->_nb_gpr_write-1; i>=0 ; i--) 344 344 { 345 st ring cmp;345 std::string cmp; 346 346 347 347 if (_param->_have_port_ooo_engine_id) … … 365 365 for (int32_t i=_param->_nb_gpr_write-1; i>=0 ; i--) 366 366 { 367 st ring cmp;367 std::string cmp; 368 368 369 369 if (_param->_have_port_ooo_engine_id) … … 387 387 for (int32_t i=_param->_nb_spr_write-1; i>=0 ; i--) 388 388 { 389 st ring cmp;389 std::string cmp; 390 390 391 391 if (_param->_have_port_ooo_engine_id) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/configuration_multi_port_bypass_memory.cfg
r71 r75 8 8 32 32 +1 # size_general_data 9 9 2 2 +1 # size_special_data 10 256 256*2 # nb_general_register11 32 32+1 # nb_special_register10 16 16 *2 # nb_general_register 11 8 8 +1 # nb_special_register 12 12 8 8 +1 # nb_operation 13 13 4 4 +1 # nb_type -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/configuration_multi_port_bypass_write.cfg
r71 r75 8 8 32 32 +1 # size_general_data 9 9 2 2 +1 # size_special_data 10 256 256*2 # nb_general_register11 32 32+1 # nb_special_register10 16 16 *2 # nb_general_register 11 8 8 +1 # nb_special_register 12 12 8 8 +1 # nb_operation 13 13 4 4 +1 # nb_type -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/configuration_multi_port_retire2.cfg
r71 r75 8 8 32 32 +1 # size_general_data 9 9 2 2 +1 # size_special_data 10 256 256*2 # nb_general_register11 32 32+1 # nb_special_register10 18 16 *2 # nb_general_register 11 8 8 +1 # nb_special_register 12 12 8 8 +1 # nb_operation 13 13 4 4 +1 # nb_type -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/configuration_multi_port_retire4.cfg
r71 r75 8 8 32 32 +1 # size_general_data 9 9 2 2 +1 # size_special_data 10 256 256 *2 # nb_general_register11 32 32+1 # nb_special_register10 16 16 *2 # nb_general_register 11 8 8 +1 # nb_special_register 12 12 8 8 +1 # nb_operation 13 13 4 4 +1 # nb_type -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/configuration_multi_port_write.cfg
r71 r75 8 8 32 32 +1 # size_general_data 9 9 2 2 +1 # size_special_data 10 256 256*2 # nb_general_register11 32 32+1 # nb_special_register10 16 16 *2 # nb_general_register 11 8 8 +1 # nb_special_register 12 12 8 8 +1 # nb_operation 13 13 4 4 +1 # nb_type -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/src/test.cpp
r69 r75 9 9 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/include/test.h" 10 10 #include "Common/include/Test.h" 11 #include "Common/include/BitManipulation.h" 11 12 12 13 #define NB_ITERATION 2 … … 368 369 { 369 370 _gpr_val [i][j] = ((rand()%100) < percent_registerfile_valid); 370 _gpr [i][j] = ran d()%((1<<_param->_size_general_data)-1);371 _gpr [i][j] = range<Tgeneral_data_t>(rand(),_param->_size_general_data); 371 372 } 372 373 for (uint32_t i=0; i<_param->_nb_special_register; i++) 373 374 { 374 375 _spr_val [i][j] = ((rand()%100) < percent_registerfile_valid); 375 _spr [i][j] = ran d()%(1<<_param->_size_special_data);376 _spr [i][j] = range<Tspecial_data_t>(rand(),_param->_size_special_data); 376 377 } 377 378 } … … 479 480 Tcontext_t ooo_engine = rand()% _param->_nb_ooo_engine; 480 481 Tcontrol_t val = (_gpr_val [num_reg][ooo_engine]== 0)?((rand()%100) < percent_transaction_registerfile):0; 481 Tgeneral_data_t data = ran d()%((1<<_param->_size_general_data)-1);482 Tgeneral_data_t data = range<Tgeneral_data_t>(rand(),_param->_size_general_data); 482 483 483 484 val = (val and can_gpr_use [ooo_engine][num_reg] and need_gpr [ooo_engine][num_reg]); … … 505 506 Tcontext_t ooo_engine = rand()% _param->_nb_ooo_engine; 506 507 Tcontrol_t val = (_spr_val [num_reg][ooo_engine]== 0)?((rand()%100) < percent_transaction_registerfile):0; 507 Tspecial_data_t data = ran d()%(1<<_param->_size_special_data);508 Tspecial_data_t data = range<Tspecial_data_t>(rand(),_param->_size_special_data); 508 509 509 510 val = (val and can_spr_use [ooo_engine][num_reg] and need_spr[ooo_engine][num_reg]); … … 534 535 Tgeneral_address_t gpr_num_reg = rand()% _param->_nb_general_register; 535 536 Tcontrol_t gpr_val = (_gpr_val [gpr_num_reg][ooo_engine]== 0)?((rand()%100) < percent_transaction_bypass):0; 536 Tgeneral_data_t gpr_data = ran d()%((1<<_param->_size_general_data)-1);537 Tgeneral_data_t gpr_data = range<Tgeneral_data_t>(rand(),_param->_size_general_data); 537 538 538 539 gpr_val = (gpr_val and can_gpr_use [ooo_engine][gpr_num_reg] and need_gpr[ooo_engine][gpr_num_reg]); … … 554 555 Tspecial_address_t spr_num_reg = rand()% _param->_nb_special_register; 555 556 Tcontrol_t spr_val = (_spr_val [spr_num_reg][ooo_engine]== 0)?((rand()%100) < percent_transaction_bypass):0; 556 Tspecial_data_t spr_data = ran d()%(1<<_param->_size_special_data);557 Tspecial_data_t spr_data = range<Tspecial_data_t>(rand(),_param->_size_special_data); 557 558 558 559 spr_val = (spr_val and can_spr_use [ooo_engine][spr_num_reg] and need_spr[ooo_engine][spr_num_reg]); … … 582 583 Tgeneral_address_t num_reg = rand()% _param->_nb_general_register; 583 584 Tcontrol_t val = (_gpr_val [num_reg][ooo_engine]== 0)?((rand()%100) < percent_transaction_bypass):0; 584 Tgeneral_data_t data = ran d()%((1<<_param->_size_general_data)-1);585 Tgeneral_data_t data = range<Tgeneral_data_t>(rand(),_param->_size_general_data); 585 586 586 587 val = (val and can_gpr_use [ooo_engine][num_reg] and need_gpr [ooo_engine][num_reg]); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Parameters.h
r69 r75 85 85 public : ~Parameters () ; 86 86 87 public : string msg_error(void);87 public : std::string msg_error (void); 88 88 89 public : st ring print (uint32_t depth);90 public : friend ostream& operator<< (ostream& output_stream,91 89 public : std::string print (uint32_t depth); 90 public : friend std::ostream& operator<< (std::ostream& output_stream, 91 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Parameters & x); 92 92 }; 93 93 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Reservation_station.h
r69 r75 23 23 #include "Behavioural/include/Types.h" 24 24 #ifdef STATISTICS 25 #include "Behavioural/ Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Statistics.h"25 #include "Behavioural/include/Stat.h" 26 26 #endif 27 27 #include "Behavioural/include/Component.h" … … 29 29 #include "Behavioural/include/Vhdl.h" 30 30 #endif 31 32 using namespace std;33 using namespace morpheo::behavioural::generic::queue_control;34 31 35 32 namespace morpheo { … … 69 66 public : Tspecial_address_t _num_reg_re ; 70 67 71 friend ostream& operator<< (ostream& output_stream,68 friend std::ostream& operator<< (std::ostream& output_stream, 72 69 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Treservation_station_entry_t & x) 73 70 { 74 output_stream << " * _context_id : " << toString(x._context_id ) << endl75 << " * _front_end_id : " << toString(x._front_end_id ) << endl76 << " * _ooo_engine_id : " << toString(x._ooo_engine_id ) << endl77 << " * _rob_id : " << toString(x._rob_id ) << endl78 << " * _operation : " << toString(x._operation ) << endl79 << " * _type : " << toString(x._type ) << endl80 << " * _has_immediat : " << toString(x._has_immediat ) << endl81 << " * _immediat : " << toString(x._immediat ) << endl82 // << " * _read_ra : " << toString(x._read_ra ) << endl83 << " * _num_reg_ra : " << toString(x._num_reg_ra ) << endl84 << " * _data_ra_val : " << toString(x._data_ra_val ) << endl85 << " * _data_ra : " << toString(x._data_ra ) << endl86 // << " * _read_rb : " << toString(x._read_rb ) << endl87 << " * _num_reg_rb : " << toString(x._num_reg_rb ) << endl88 << " * _data_rb_val : " << toString(x._data_rb_val ) << endl89 << " * _data_rb : " << toString(x._data_rb ) << endl90 // << " * _read_rc : " << toString(x._read_rc ) << endl91 << " * _num_reg_rc : " << toString(x._num_reg_rc ) << endl92 << " * _data_rc_val : " << toString(x._data_rc_val ) << endl93 << " * _data_rc : " << toString(x._data_rc ) << endl94 << " * _write_rd : " << toString(x._write_rd ) << endl95 << " * _num_reg_rd : " << toString(x._num_reg_rd ) << endl96 << " * _write_re : " << toString(x._write_re ) << endl97 << " * _num_reg_re : " << toString(x._num_reg_re ) << endl;71 output_stream << " * _context_id : " << toString(x._context_id ) << std::endl 72 << " * _front_end_id : " << toString(x._front_end_id ) << std::endl 73 << " * _ooo_engine_id : " << toString(x._ooo_engine_id ) << std::endl 74 << " * _rob_id : " << toString(x._rob_id ) << std::endl 75 << " * _operation : " << toString(x._operation ) << std::endl 76 << " * _type : " << toString(x._type ) << std::endl 77 << " * _has_immediat : " << toString(x._has_immediat ) << std::endl 78 << " * _immediat : " << toString(x._immediat ) << std::endl 79 // << " * _read_ra : " << toString(x._read_ra ) << std::endl 80 << " * _num_reg_ra : " << toString(x._num_reg_ra ) << std::endl 81 << " * _data_ra_val : " << toString(x._data_ra_val ) << std::endl 82 << " * _data_ra : " << toString(x._data_ra ) << std::endl 83 // << " * _read_rb : " << toString(x._read_rb ) << std::endl 84 << " * _num_reg_rb : " << toString(x._num_reg_rb ) << std::endl 85 << " * _data_rb_val : " << toString(x._data_rb_val ) << std::endl 86 << " * _data_rb : " << toString(x._data_rb ) << std::endl 87 // << " * _read_rc : " << toString(x._read_rc ) << std::endl 88 << " * _num_reg_rc : " << toString(x._num_reg_rc ) << std::endl 89 << " * _data_rc_val : " << toString(x._data_rc_val ) << std::endl 90 << " * _data_rc : " << toString(x._data_rc ) << std::endl 91 << " * _write_rd : " << toString(x._write_rd ) << std::endl 92 << " * _num_reg_rd : " << toString(x._num_reg_rd ) << std::endl 93 << " * _write_re : " << toString(x._write_re ) << std::endl 94 << " * _num_reg_re : " << toString(x._num_reg_re ) << std::endl; 98 95 99 96 return output_stream; … … 109 106 // -----[ fields ]---------------------------------------------------- 110 107 // Parameters 111 protected : const st ring _name;108 protected : const std::string _name; 112 109 113 110 protected : const Parameters * _param; 114 //#ifdef STATISTICS 115 // protected : const morpheo::behavioural::Parameters_Statistics * _param_statistics; 116 //#endif 117 118 #ifdef STATISTICS 119 private : Statistics * _stat; 111 112 #ifdef STATISTICS 113 public : Stat * _stat; 120 114 #endif 121 115 … … 233 227 public : Reservation_station ( 234 228 #ifdef SYSTEMC 235 sc_module_name name,229 sc_module_name name, 236 230 #else 237 string name,231 string name, 238 232 #endif 239 233 #ifdef STATISTICS 240 morpheo::behavioural::Parameters_Statistics * param_statistics,241 #endif 242 Parameters * param );234 morpheo::behavioural::Parameters_Statistics * param_statistics, 235 #endif 236 Parameters * param ); 243 237 public : ~Reservation_station (void); 244 238 … … 250 244 public : void genMoore (void); 251 245 #endif 252 #ifdef STATISTICS 253 public : string statistics (uint32_t depth); 246 247 #ifdef STATISTICS 248 public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); 254 249 #endif 255 250 … … 260 255 #endif 261 256 257 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 262 258 private : void end_cycle (void); 259 #endif 263 260 }; 264 261 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Parameters_msg_error.cpp
r69 r75 8 8 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Parameters.h" 9 9 #include <sstream> 10 using namespace std;11 10 12 11 namespace morpheo { … … 22 21 #undef FUNCTION 23 22 #define FUNCTION "Reservation_station::msg_error" 24 st ring Parameters::msg_error(void)23 std::string Parameters::msg_error(void) 25 24 { 26 25 log_printf(FUNC,Reservation_station,FUNCTION,"Begin"); 27 26 28 st ring msg = "";27 std::string msg = ""; 29 28 30 29 // if (_size_queue < 2) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Parameters_print.cpp
r69 r75 8 8 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Parameters.h" 9 9 #include "Behavioural/include/XML.h" 10 using namespace std;11 10 12 11 namespace morpheo { … … 22 21 #undef FUNCTION 23 22 #define FUNCTION "Reservation_station::print" 24 st ring Parameters::print (uint32_t depth)23 std::string Parameters::print (uint32_t depth) 25 24 { 26 25 log_printf(FUNC,Reservation_station,FUNCTION,"Begin"); … … 54 53 #undef FUNCTION 55 54 #define FUNCTION "Reservation_station::operator<<" 56 ostream& operator<< (ostream& output_stream ,57 55 std::ostream& operator<< (std::ostream& output_stream , 56 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Parameters & x) 58 57 { 59 58 log_printf(FUNC,Reservation_station,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station.cpp
r55 r75 31 31 _name (name) 32 32 ,_param (param) 33 // #ifdef STATISTICS34 // ,_param_statistics (param_statistics)35 // #endif36 33 { 37 34 log_printf(FUNC,Reservation_station,FUNCTION,"Begin"); … … 46 43 log_printf(INFO,Reservation_station,FUNCTION,"Allocation of statistics"); 47 44 48 // Allocation of statistics 49 _stat = new Statistics (static_cast<string>(_name), 50 param_statistics , 51 param); 45 statistics_declaration(param_statistics); 52 46 #endif 53 47 … … 95 89 log_printf(INFO,Reservation_station,FUNCTION,"Generate Statistics file"); 96 90 97 _stat->generate_file(statistics(0));98 99 91 delete _stat; 100 92 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_allocation.cpp
r69 r75 24 24 void Reservation_station::allocation (void) 25 25 { 26 string rename;27 28 26 log_printf(FUNC,Reservation_station,FUNCTION,"Begin"); 29 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_end_cycle.cpp
r69 r75 1 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 1 2 /* 2 3 * $Id$ … … 25 26 26 27 #ifdef STATISTICS 27 _stat-> add();28 _stat->end_cycle(); 28 29 #endif 29 30 … … 45 46 }; // end namespace behavioural 46 47 }; // end namespace morpheo 48 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_statistics_declaration.cpp
r59 r75 18 18 namespace reservation_station { 19 19 20 21 20 #undef FUNCTION 22 #define FUNCTION "Reservation_station::statistics "23 string Reservation_station::statistics (uint32_t depth)21 #define FUNCTION "Reservation_station::statistics_declaration" 22 void Reservation_station::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics) 24 23 { 25 24 log_printf(FUNC,Reservation_station,FUNCTION,"Begin"); 26 25 27 string txt = _stat->print(depth); 26 _stat = new Stat (static_cast<std::string>(_name), 27 "Reservation_station", 28 param_statistics); 28 29 29 30 log_printf(FUNC,Reservation_station,FUNCTION,"End"); 30 31 return txt;32 31 }; 33 32 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_vhdl_body.cpp
r70 r75 22 22 void Reservation_station::vhdl_body (Vhdl * & vhdl) 23 23 { 24 st ring range_retire, range_insert;24 std::string range_retire, range_insert; 25 25 26 26 if (_param->_size_queue == 1) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h
r74 r75 137 137 138 138 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 139 private : queue<execute_queue_entry_t *> * _queue;139 private : std::queue<execute_queue_entry_t *> * _queue; 140 140 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 141 141 private : Tcontrol_t internal_EXECUTE_QUEUE_IN_ACK ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_allocation.cpp
r73 r75 24 24 void Execute_queue::allocation (void) 25 25 { 26 string rename;27 28 26 log_printf(FUNC,Execute_queue,FUNCTION,"Begin"); 29 27 … … 98 96 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 99 97 100 _queue = new queue<execute_queue_entry_t *>;98 _queue = new std::queue<execute_queue_entry_t *>; 101 99 102 100 #ifdef POSITION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_statistics_declaration.cpp
r73 r75 25 25 log_printf(FUNC,Execute_queue,FUNCTION,"Begin"); 26 26 27 _stat = new Stat (static_cast<st ring>(_name),27 _stat = new Stat (static_cast<std::string>(_name), 28 28 "Execute_queue", 29 29 param_statistics); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h
r74 r75 179 179 180 180 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 181 protected : list<write_queue_entry_t *> * _queue;181 protected : std::list<write_queue_entry_t *> * _queue; 182 182 183 183 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_allocation.cpp
r74 r75 23 23 void Write_queue::allocation (void) 24 24 { 25 string rename;26 27 25 log_printf(FUNC,Write_queue,FUNCTION,"Begin"); 28 26 … … 139 137 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 140 138 141 _queue = newlist<write_queue_entry_t *>;139 _queue = new std::list<write_queue_entry_t *>; 142 140 143 141 #ifdef POSITION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_genMoore.cpp
r73 r75 86 86 // -----[ Interface "bypass_write" ]---------------------------------- 87 87 { 88 list<write_queue_entry_t *>::iterator it = _queue->begin();88 std::list<write_queue_entry_t *>::iterator it = _queue->begin(); 89 89 for (uint32_t i=0; i<_param->_nb_bypass_write; i++) 90 90 { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_statistics_declaration.cpp
r73 r75 25 25 log_printf(FUNC,Write_queue,FUNCTION,"Begin"); 26 26 27 _stat = new Stat (static_cast<st ring>(_name),27 _stat = new Stat (static_cast<std::string>(_name), 28 28 "Write_queue", 29 29 param_statistics); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit_allocation.cpp
r74 r75 145 145 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 146 146 147 st ring name;147 std::string name; 148 148 149 149 { … … 184 184 { 185 185 name = _name+"_write_queue"; 186 cout << "Instance : " << name <<endl;186 std::cout << "Instance : " << name << std::endl; 187 187 188 188 #ifdef POSITION … … 196 196 197 197 #ifdef POSITION 198 _component->interface_map (name ," WRITE_QUEUE_IN",199 _name," WRITE_UNIT_IN");198 _component->interface_map (name ,"write_queue_in", 199 _name,"write_unit_in"); 200 200 #endif 201 201 … … 226 226 { 227 227 #ifdef POSITION 228 _component->interface_map (name ," WRITE_QUEUE_OUT",229 _name+"_execute_queue", " EXECUTE_QUEUE_IN");228 _component->interface_map (name ,"write_queue_out", 229 _name+"_execute_queue", "execute_queue_in"); 230 230 #endif 231 231 … … 250 250 { 251 251 #ifdef POSITION 252 _component->interface_map (name ," WRITE_QUEUE_OUT",253 _name," WRITE_UNIT_OUT");252 _component->interface_map (name ,"write_queue_out", 253 _name,"write_unit_out"); 254 254 #endif 255 255 … … 275 275 { 276 276 #ifdef POSITION 277 _component->interface_map (name ," GPR_WRITE_"+toString(i),278 _name," GPR_WRITE_"+toString(i));277 _component->interface_map (name ,"gpr_write_"+toString(i), 278 _name,"gpr_write_"+toString(i)); 279 279 #endif 280 280 … … 290 290 { 291 291 #ifdef POSITION 292 _component->interface_map (name ," SPR_WRITE_"+toString(i),293 _name," SPR_WRITE_"+toString(i));292 _component->interface_map (name ,"spr_write_"+toString(i), 293 _name,"spr_write_"+toString(i)); 294 294 #endif 295 295 … … 306 306 { 307 307 #ifdef POSITION 308 _component->interface_map (name ," BYPASS_WRITE_"+toString(i),309 _name," BYPASS_WRITE_"+toString(i));308 _component->interface_map (name ,"bypass_write_"+toString(i), 309 _name,"bypass_write_"+toString(i)); 310 310 #endif 311 311 … … 324 324 { 325 325 name = _name+"_execute_queue"; 326 cout << "Instance : " << name <<endl;326 std::cout << "Instance : " << name << std::endl; 327 327 328 328 #ifdef POSITION … … 336 336 337 337 #ifdef POSITION 338 _component->interface_map (name ," WRITE_QUEUE_IN",339 _name+"_write_queue"," WRITE_UNIT_IN");338 _component->interface_map (name ,"execute_queue_in", 339 _name+"_write_queue","write_queue_in"); 340 340 #endif 341 341 … … 358 358 359 359 #ifdef POSITION 360 _component->interface_map (name ," EXECUTE_QUEUE_OUT",361 _name," WRITE_UNIT_OUT_");360 _component->interface_map (name ,"execute_queue_out", 361 _name,"write_unit_out"); 362 362 #endif 363 363 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit_statistics_declaration.cpp
r74 r75 24 24 log_printf(FUNC,Write_unit,FUNCTION,"Begin"); 25 25 26 _stat = new Stat (static_cast<st ring>(_name),26 _stat = new Stat (static_cast<std::string>(_name), 27 27 "Write_unit", 28 28 param_statistics); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Makefile.deps
r74 r75 42 42 #-----[ Rules ]-------------------------------------------- 43 43 44 #.NOTPARALLEL : Register_unit_library Register_unit_library_clean44 .NOTPARALLEL : Register_unit_library Register_unit_library_clean 45 45 46 46 Register_unit_library : $(Register_unit_DEPENDENCIES) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Parameters.h
r60 r75 50 50 public : ~Parameters () ; 51 51 52 public : string msg_error(void);52 public : std::string msg_error (void); 53 53 54 public : st ring print (uint32_t depth);55 public : friend ostream& operator<< (ostream& output_stream,56 54 public : std::string print (uint32_t depth); 55 public : friend std::ostream& operator<< (std::ostream& output_stream, 56 morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Parameters & x); 57 57 }; 58 58 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h
r61 r75 20 20 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Parameters.h" 21 21 #ifdef STATISTICS 22 #include "Behavioural/ Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Statistics.h"22 #include "Behavioural/include/Stat.h" 23 23 #endif 24 24 #include "Behavioural/include/Component.h" … … 27 27 #endif 28 28 #include "Behavioural/include/Usage.h" 29 30 using namespace std;31 29 32 30 namespace morpheo { … … 47 45 // -----[ fields ]---------------------------------------------------- 48 46 // Parameters 49 protected : const st ring _name;47 protected : const std::string _name; 50 48 protected : const Parameters * _param; 51 49 private : const Tusage_t _usage; 52 50 53 //#ifdef STATISTICS 54 // protected : const morpheo::behavioural::Parameters_Statistics * _param_statistics; 55 //#endif 56 57 #ifdef STATISTICS 58 private : Statistics * _stat; 51 #ifdef STATISTICS 52 public : Stat * _stat; 59 53 #endif 60 54 … … 169 163 sc_module_name name, 170 164 #else 171 st ring name,165 std::string name, 172 166 #endif 173 167 #ifdef STATISTICS … … 183 177 184 178 #ifdef SYSTEMC 185 //#if defined(STATISTICS) or defined(VHDL_TESTBENCH)186 179 public : void transition (void); 187 180 public : void genMealy_gpr_read (void); … … 199 192 public : void genMealy_insert (void); 200 193 public : void genMealy_retire (void); 201 202 //#endif203 194 #endif 204 #ifdef STATISTICS 205 public : string statistics (uint32_t depth); 195 196 #ifdef STATISTICS 197 public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); 206 198 #endif 207 199 … … 212 204 #endif 213 205 214 #if def VHDL_TESTBENCH215 private : void vhdl_testbench_transition(void);206 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 207 private : void end_cycle (void); 216 208 #endif 217 209 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Parameters_msg_error.cpp
r60 r75 9 9 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Parameters.h" 10 10 #include <sstream> 11 using namespace std;12 11 13 12 namespace morpheo { … … 22 21 #undef FUNCTION 23 22 #define FUNCTION "Register_unit_Glue::msg_error" 24 st ring Parameters::msg_error(void)23 std::string Parameters::msg_error(void) 25 24 { 26 25 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 27 26 28 st ring msg = "";27 std::string msg = ""; 29 28 30 29 return msg; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Parameters_print.cpp
r60 r75 8 8 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Parameters.h" 9 9 #include "Behavioural/include/XML.h" 10 using namespace std;11 10 12 11 namespace morpheo { … … 21 20 #undef FUNCTION 22 21 #define FUNCTION "Register_unit_Glue::print" 23 st ring Parameters::print (uint32_t depth)22 std::string Parameters::print (uint32_t depth) 24 23 { 25 24 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); … … 56 55 #undef FUNCTION 57 56 #define FUNCTION "Register_unit_Glue::operator<<" 58 ostream& operator<< (ostream& output_stream ,59 57 std::ostream& operator<< (std::ostream& output_stream , 58 morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Parameters & x) 60 59 { 61 60 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue.cpp
r61 r75 24 24 sc_module_name name, 25 25 #else 26 st ring name,26 std::string name, 27 27 #endif 28 28 #ifdef STATISTICS … … 35 35 ,_param (param) 36 36 ,_usage (usage) 37 // #ifdef STATISTICS38 // ,_param_statistics (param_statistics)39 // #endif40 37 { 41 38 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); … … 48 45 49 46 // Allocation of statistics 50 _stat = new Statistics (static_cast<string>(_name), 51 param_statistics , 52 param); 47 statistics_declaration(param_statistics); 53 48 #endif 54 49 … … 549 544 log_printf(INFO,Register_unit_Glue,FUNCTION,"Generate Statistics file"); 550 545 551 _stat->generate_file(statistics(0));552 546 delete _stat; 553 547 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_allocation.cpp
r60 r75 22 22 void Register_unit_Glue::allocation (void) 23 23 { 24 string rename;25 26 24 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 27 25 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_end_cycle.cpp
r60 r75 1 #if def VHDL_TESTBENCH1 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 2 2 /* 3 3 * $Id$ … … 17 17 namespace register_unit_glue { 18 18 19 20 19 #undef FUNCTION 21 #define FUNCTION "Register_unit_Glue:: vhdl_testbench_transition"22 void Register_unit_Glue::vhdl_testbench_transition()20 #define FUNCTION "Register_unit_Glue::end_cycle" 21 void Register_unit_Glue::end_cycle () 23 22 { 24 23 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 25 24 25 #ifdef STATISTICS 26 _stat->end_cycle(); 27 #endif 28 29 #ifdef VHDL_TESTBENCH 26 30 // Evaluation before read the ouput signal 27 // sc_start(0); 28 31 // sc_start(0); 29 32 _interfaces->testbench(); 33 #endif 30 34 31 35 log_printf(FUNC,Register_unit_Glue,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_statistics_declaration.cpp
r60 r75 17 17 namespace register_unit_glue { 18 18 19 20 19 #undef FUNCTION 21 #define FUNCTION "Register_unit_Glue::statistics "22 string Register_unit_Glue::statistics (uint32_t depth)20 #define FUNCTION "Register_unit_Glue::statistics_declaration" 21 void Register_unit_Glue::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics) 23 22 { 24 23 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 25 24 26 string txt = _stat->print(depth); 25 _stat = new Stat (static_cast<std::string>(_name), 26 "Register_unit_Glue", 27 param_statistics); 27 28 28 29 log_printf(FUNC,Register_unit_Glue,FUNCTION,"End"); 29 30 return txt;31 30 }; 32 31 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_transition.cpp
r60 r75 1 1 #ifdef SYSTEMC 2 //#if defined(STATISTICS) or defined(VHDL_TESTBENCH)3 2 /* 4 3 * $Id$ … … 25 24 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 26 25 27 #ifdef STATISTICS 28 _stat->add(); 29 #endif 30 31 #ifdef VHDL_TESTBENCH 32 vhdl_testbench_transition (); 26 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 27 end_cycle(); 33 28 #endif 34 29 … … 45 40 }; // end namespace morpheo 46 41 #endif 47 //#endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Parameters.h
r60 r75 79 79 public : ~Parameters () ; 80 80 81 public : string msg_error (void); 82 83 public : string print (uint32_t depth); 84 public : friend ostream& operator<< (ostream& output_stream, 85 morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::Parameters & x); 81 public : std::string msg_error (void); 82 public : std::string print (uint32_t depth); 83 public : friend std::ostream& operator<< (std::ostream& output_stream, 84 morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::Parameters & x); 86 85 }; 87 86 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Register_unit.h
r60 r75 24 24 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Parameters.h" 25 25 #ifdef STATISTICS 26 #include "Behavioural/ Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Statistics.h"26 #include "Behavioural/include/Stat.h" 27 27 #endif 28 28 #include "Behavioural/include/Component.h" … … 32 32 #include "Behavioural/include/Usage.h" 33 33 34 using namespace std;35 36 34 namespace morpheo { 37 35 namespace behavioural { 38 39 36 namespace core { 40 37 namespace multi_execute_loop { … … 50 47 // -----[ fields ]---------------------------------------------------- 51 48 // Parameters 52 protected : const st ring _name;49 protected : const std::string _name; 53 50 protected : const Parameters * _param; 54 51 private : const Tusage_t _usage; 55 52 56 53 #ifdef STATISTICS 57 protected : morpheo::behavioural::Parameters_Statistics * _param_statistics; 58 #endif 59 60 #ifdef STATISTICS 61 private : Statistics * _stat; 54 public : Stat * _stat; 62 55 #endif 63 56 … … 143 136 sc_module_name name, 144 137 #else 145 st ring name,138 std::string name, 146 139 #endif 147 140 #ifdef STATISTICS … … 153 146 public : ~Register_unit (void); 154 147 155 private : void allocation (void); 148 private : void allocation ( 149 #ifdef STATISTICS 150 morpheo::behavioural::Parameters_Statistics * param_statistics 151 #else 152 void 153 #endif 154 ); 156 155 private : void deallocation (void); 157 156 … … 161 160 //#endif 162 161 #endif 163 #ifdef STATISTICS164 public : string statistics (uint32_t depth);165 #endif166 162 167 163 #if VHDL … … 171 167 #endif 172 168 173 #ifdef VHDL_TESTBENCH 174 private : void vhdl_testbench_transition (void); 169 #ifdef STATISTICS 170 public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); 171 #endif 172 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 173 private : void end_cycle (void); 175 174 #endif 176 175 }; 176 177 177 178 178 }; // end namespace register_unit -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Parameters_msg_error.cpp
r60 r75 6 6 */ 7 7 8 #include "Behavioural/include/Types.h"9 8 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Parameters.h" 10 #include <sstream>11 using namespace std;12 9 13 10 namespace morpheo { … … 21 18 #undef FUNCTION 22 19 #define FUNCTION "Register_unit::msg_error" 23 st ring Parameters::msg_error(void)20 std::string Parameters::msg_error(void) 24 21 { 25 22 log_printf(FUNC,Register_unit,FUNCTION,"Begin"); 26 23 27 st ring msg = "";24 std::string msg = ""; 28 25 29 26 return msg; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Parameters_print.cpp
r60 r75 8 8 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Parameters.h" 9 9 #include "Behavioural/include/XML.h" 10 using namespace std;11 10 12 11 namespace morpheo { … … 20 19 #undef FUNCTION 21 20 #define FUNCTION "Register_unit::print" 22 st ring Parameters::print (uint32_t depth)21 std::string Parameters::print (uint32_t depth) 23 22 { 24 23 log_printf(FUNC,Register_unit,FUNCTION,"Begin"); … … 73 72 #undef FUNCTION 74 73 #define FUNCTION "Register_unit::operator<<" 75 ostream& operator<< (ostream& output_stream ,76 74 std::ostream& operator<< (std::ostream& output_stream , 75 morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::Parameters & x) 77 76 { 78 77 log_printf(FUNC,Register_unit,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit.cpp
r60 r75 34 34 ,_param (param) 35 35 ,_usage (usage) 36 #ifdef STATISTICS37 ,_param_statistics (param_statistics)38 #endif39 36 { 40 37 log_printf(FUNC,Register_unit,FUNCTION,"Begin"); 41 38 42 39 log_printf(INFO,Register_unit,FUNCTION,"Allocation"); 43 allocation (); 40 allocation ( 41 #ifdef STATISTICS 42 param_statistics 43 #endif 44 ); 44 45 45 46 #ifdef STATISTICS … … 47 48 48 49 // Allocation of statistics 49 _stat = new Statistics (static_cast<string>(_name), 50 param_statistics , 51 param); 50 statistics_declaration(param_statistics); 52 51 #endif 53 52 … … 84 83 #ifdef STATISTICS 85 84 log_printf(INFO,Register_unit,FUNCTION,"Generate Statistics file"); 86 87 _stat->generate_file(statistics(0));88 85 delete _stat; 89 86 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_allocation.cpp
r65 r75 19 19 #undef FUNCTION 20 20 #define FUNCTION "Register_unit::allocation" 21 void Register_unit::allocation (void) 21 void Register_unit::allocation ( 22 #ifdef STATISTICS 23 morpheo::behavioural::Parameters_Statistics * param_statistics 24 #else 25 void 26 #endif 27 ) 22 28 { 23 string rename, name_component;24 25 29 log_printf(FUNC,Register_unit,FUNCTION,"Begin"); 26 30 … … 249 253 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 250 254 251 st ring name;255 std::string name; 252 256 253 257 component_gpr = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine]; … … 263 267 (name.c_str() 264 268 #ifdef STATISTICS 265 , _param_statistics269 ,param_statistics 266 270 #endif 267 271 ,_param->_param_gpr [i] … … 283 287 (name.c_str() 284 288 #ifdef STATISTICS 285 , _param_statistics289 ,param_statistics 286 290 #endif 287 291 ,_param->_param_gpr_status [i] … … 303 307 (name.c_str() 304 308 #ifdef STATISTICS 305 , _param_statistics309 ,param_statistics 306 310 #endif 307 311 ,_param->_param_spr [i] … … 322 326 (name.c_str() 323 327 #ifdef STATISTICS 324 , _param_statistics328 ,param_statistics 325 329 #endif 326 330 ,_param->_param_spr_status [i] … … 343 347 (name.c_str() 344 348 #ifdef STATISTICS 345 , _param_statistics349 ,param_statistics 346 350 #endif 347 351 ,_param->_param_glue … … 358 362 359 363 // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 360 364 std::string name_component; 365 361 366 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 362 367 { 363 368 name_component = _name+"_gpr_"+toString(i); 364 369 365 cout << "Instance : " << name_component <<endl;370 std::cout << "Instance : " << name_component << std::endl; 366 371 367 372 #ifdef POSITION … … 420 425 name_component = _name+"_gpr_status_"+toString(i); 421 426 422 cout << "Instance : " << name_component <<endl;427 std::cout << "Instance : " << name_component << std::endl; 423 428 424 429 #ifdef POSITION … … 544 549 name_component = _name+"_spr_"+toString(i); 545 550 546 cout << "Instance : " << name_component <<endl;551 std::cout << "Instance : " << name_component << std::endl; 547 552 548 553 #ifdef POSITION … … 601 606 name_component = _name+"_spr_status_"+toString(i); 602 607 603 cout << "Instance : " << name_component <<endl;608 std::cout << "Instance : " << name_component << std::endl; 604 609 605 610 #ifdef POSITION … … 724 729 name_component = _name+"_glue"; 725 730 726 cout << "Instance : " << name_component <<endl;731 std::cout << "Instance : " << name_component << std::endl; 727 732 728 733 #ifdef POSITION … … 1034 1039 #endif 1035 1040 1036 // cout << *_component <<endl;1041 // std::cout << *_component << std::endl; 1037 1042 1038 1043 log_printf(FUNC,Register_unit,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_end_cycle.cpp
r60 r75 1 #if def VHDL_TESTBENCH1 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 2 2 /* 3 3 * $Id$ … … 16 16 namespace register_unit { 17 17 18 19 18 #undef FUNCTION 20 #define FUNCTION "Register_unit:: vhdl_testbench_transition"21 void Register_unit::vhdl_testbench_transition()19 #define FUNCTION "Register_unit::end_cycle" 20 void Register_unit::end_cycle () 22 21 { 23 22 log_printf(FUNC,Register_unit,FUNCTION,"Begin"); 24 23 24 #ifdef STATISTICS 25 _stat->end_cycle(); 26 #endif 27 28 #ifdef VHDL_TESTBENCH 25 29 // Evaluation before read the ouput signal 26 // sc_start(0); 27 30 // sc_start(0); 28 31 _interfaces->testbench(); 32 #endif 29 33 30 34 log_printf(FUNC,Register_unit,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_statistics_declaration.cpp
r60 r75 16 16 namespace register_unit { 17 17 18 19 18 #undef FUNCTION 20 #define FUNCTION "Register_unit::statistics "21 string Register_unit::statistics (uint32_t depth)19 #define FUNCTION "Register_unit::statistics_declaration" 20 void Register_unit::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics) 22 21 { 23 22 log_printf(FUNC,Register_unit,FUNCTION,"Begin"); 24 23 25 string txt = _stat->print(depth); 26 24 _stat = new Stat (static_cast<std::string>(_name), 25 "Register_unit", 26 param_statistics); 27 28 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 29 { 30 _stat->add_stat(component_gpr [i]->_stat); 31 _stat->add_stat(component_gpr_status[i]->_stat); 32 _stat->add_stat(component_spr [i]->_stat); 33 _stat->add_stat(component_spr_status[i]->_stat); 34 } 35 _stat->add_stat(component_glue->_stat); 36 27 37 log_printf(FUNC,Register_unit,FUNCTION,"End"); 28 29 return txt;30 38 }; 31 39 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_transition.cpp
r60 r75 24 24 log_printf(FUNC,Register_unit,FUNCTION,"Begin"); 25 25 26 #ifdef STATISTICS 27 _stat->add(); 28 #endif 29 30 #ifdef VHDL_TESTBENCH 31 vhdl_testbench_transition (); 26 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 27 end_cycle(); 32 28 #endif 33 29 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h
r71 r75 27 27 #include "Behavioural/include/Component.h" 28 28 29 using namespace std;30 31 29 namespace morpheo { 32 30 namespace behavioural { … … 41 39 // -----[ fields ]---------------------------------------------------- 42 40 // Parameters 43 protected : const st ring _name;41 protected : const std::string _name; 44 42 45 43 protected : const Parameters _param; 46 44 47 45 #ifdef STATISTICS 48 p rivate: Stat * _stat;46 public : Stat * _stat; 49 47 #endif 50 48 … … 75 73 public : Counter (sc_module_name name, 76 74 #else 77 public : Counter (st ringname,75 public : Counter (std::string name, 78 76 #endif 79 77 #ifdef STATISTICS … … 96 94 #ifdef STATISTICS 97 95 public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); 98 public : string statistics_print (uint32_t depth);99 96 #endif 100 97 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Parameters.h
r44 r75 32 32 public : ~Parameters () ; 33 33 34 public : string msg_error (void); 35 36 public : string print (uint32_t depth); 37 public : friend ostream& operator<< (ostream& output_stream, 38 morpheo::behavioural::generic::counter::Parameters & x); 34 public : std::string msg_error (void); 35 public : std::string print (uint32_t depth); 36 public : friend std::ostream& operator<< (std::ostream& output_stream, 37 morpheo::behavioural::generic::counter::Parameters & x); 39 38 }; 40 39 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp
r42 r75 17 17 void Counter::allocation (void) 18 18 { 19 string rename;20 21 19 log_printf(FUNC,Counter,"allocation","Begin"); 22 20 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_statistics_declaration.cpp
r71 r75 20 20 log_printf(FUNC,Counter,FUNCTION,"Begin"); 21 21 22 _stat = new Stat (static_cast<st ring>(_name),22 _stat = new Stat (static_cast<std::string>(_name), 23 23 "Counter", 24 24 param_statistics); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_body.cpp
r42 r75 21 21 for (uint32_t i=0; i<_param._nb_port; i++) 22 22 { 23 st ring counter_inc, counter_dec;23 std::string counter_inc, counter_dec; 24 24 25 25 if (_param._size_data > 1) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Parameters_msg_error.cpp
r2 r75 9 9 #include "Behavioural/Generic/Counter/include/Types.h" 10 10 #include <sstream> 11 using namespace std;12 11 13 12 namespace morpheo { … … 17 16 18 17 19 st ring Parameters::msg_error(void)18 std::string Parameters::msg_error(void) 20 19 { 21 20 log_printf(FUNC,Counter,"msg_error","Begin"); 22 21 23 st ring msg = "";22 std::string msg = ""; 24 23 25 24 if (_size_data < 1) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Parameters_print.cpp
r3 r75 8 8 #include "Behavioural/Generic/Counter/include/Parameters.h" 9 9 #include "Behavioural/include/XML.h" 10 using namespace std;11 10 12 11 namespace morpheo { … … 16 15 17 16 18 st ring Parameters::print (uint32_t depth)17 std::string Parameters::print (uint32_t depth) 19 18 { 20 19 log_printf(FUNC,Counter,"print","Begin"); … … 36 35 }; 37 36 38 ostream& operator<< (ostream& output_stream ,39 37 std::ostream& operator<< (std::ostream& output_stream , 38 morpheo::behavioural::generic::counter::Parameters & x) 40 39 { 41 40 output_stream << x.print(0); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/include/Parameters.h
r67 r75 32 32 public : ~Parameters () ; 33 33 34 public : string msg_error(void);34 public : std::string msg_error (void); 35 35 36 public : st ring print (uint32_t depth);37 public : friend ostream& operator<< (ostream& output_stream,38 36 public : std::string print (uint32_t depth); 37 public : friend std::ostream& operator<< (std::ostream& output_stream, 38 morpheo::behavioural::generic::queue::Parameters & x); 39 39 }; 40 40 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/include/Queue.h
r67 r75 22 22 #include "Behavioural/Generic/Queue/include/Parameters.h" 23 23 #ifdef STATISTICS 24 #include "Behavioural/ Generic/Queue/include/Statistics.h"24 #include "Behavioural/include/Stat.h" 25 25 #endif 26 26 #include "Behavioural/include/Component.h" … … 29 29 #endif 30 30 #include "Behavioural/include/Usage.h" 31 32 using namespace std;33 using namespace morpheo::behavioural::generic::queue_control;34 31 35 32 namespace morpheo { … … 46 43 // -----[ fields ]---------------------------------------------------- 47 44 // Parameters 48 protected : const st ring _name;45 protected : const std::string _name; 49 46 protected : const Parameters * _param; 50 47 private : const Tusage_t _usage; … … 55 52 56 53 #ifdef STATISTICS 57 p rivate : Statistics* _stat;54 public : Stat * _stat; 58 55 #endif 59 56 … … 99 96 sc_module_name name, 100 97 #else 101 st ringname,98 std::string name, 102 99 #endif 103 100 #ifdef STATISTICS … … 116 113 public : void genMoore (void); 117 114 #endif 115 118 116 #ifdef STATISTICS 119 public : string statistics (uint32_t depth);117 public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); 120 118 #endif 121 119 … … 125 123 private : void vhdl_body (Vhdl * & vhdl); 126 124 #endif 127 128 #if def VHDL_TESTBENCH129 private : void vhdl_testbench_transition(void);125 126 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 127 private : void end_cycle (void); 130 128 #endif 131 129 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Parameters_msg_error.cpp
r67 r75 9 9 #include "Behavioural/Generic/Queue/include/Parameters.h" 10 10 #include <sstream> 11 using namespace std;12 13 11 namespace morpheo { 14 12 namespace behavioural { … … 19 17 #undef FUNCTION 20 18 #define FUNCTION "Queue::msg_error" 21 st ring Parameters::msg_error(void)19 std::string Parameters::msg_error(void) 22 20 { 23 21 log_printf(FUNC,Queue,FUNCTION,"Begin"); 24 22 25 st ring msg = "";23 std::string msg = ""; 26 24 27 25 return msg; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Parameters_print.cpp
r67 r75 8 8 #include "Behavioural/Generic/Queue/include/Parameters.h" 9 9 #include "Behavioural/include/XML.h" 10 using namespace std;11 10 12 11 namespace morpheo { … … 18 17 #undef FUNCTION 19 18 #define FUNCTION "Queue::print" 20 st ring Parameters::print (uint32_t depth)19 std::string Parameters::print (uint32_t depth) 21 20 { 22 21 log_printf(FUNC,Queue,FUNCTION,"Begin"); … … 36 35 #undef FUNCTION 37 36 #define FUNCTION "Queue::operator<<" 38 ostream& operator<< (ostream& output_stream ,39 37 std::ostream& operator<< (std::ostream& output_stream , 38 morpheo::behavioural::generic::queue::Parameters & x) 40 39 { 41 40 log_printf(FUNC,Queue,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue.cpp
r68 r75 32 32 ,_param (param) 33 33 ,_usage (usage) 34 // #ifdef STATISTICS35 // ,_param_statistics (param_statistics)36 // #endif37 34 { 38 35 log_printf(FUNC,Queue,FUNCTION,"Begin"); … … 46 43 log_printf(INFO,Queue,FUNCTION,"Allocation of statistics"); 47 44 48 // Allocation of statistics 49 _stat = new Statistics (static_cast<string>(_name), 50 param_statistics , 51 param); 45 statistics_declaration(param_statistics); 52 46 } 53 47 #endif … … 102 96 log_printf(INFO,Queue,FUNCTION,"Generate Statistics file"); 103 97 104 _stat->generate_file(statistics(0));105 98 delete _stat; 106 99 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_allocation.cpp
r68 r75 19 19 void Queue::allocation (void) 20 20 { 21 string rename;22 23 21 log_printf(FUNC,Queue,FUNCTION,"Begin"); 24 22 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_statistics_declaration.cpp
r67 r75 14 14 namespace queue { 15 15 16 17 16 #undef FUNCTION 18 #define FUNCTION "Queue::statistics "19 string Queue::statistics (uint32_t depth)17 #define FUNCTION "Queue::statistics_declaration" 18 void Queue::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics) 20 19 { 21 20 log_printf(FUNC,Queue,FUNCTION,"Begin"); 22 21 23 string txt = _stat->print(depth); 22 _stat = new Stat (static_cast<std::string>(_name), 23 "Queue", 24 param_statistics); 24 25 25 26 log_printf(FUNC,Queue,FUNCTION,"End"); 26 27 return txt;28 27 }; 29 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_transition.cpp
r67 r75 53 53 } 54 54 55 #ifdef STATISTICS 56 _stat->add(); 57 #endif 58 59 #ifdef VHDL_TESTBENCH 60 vhdl_testbench_transition (); 55 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 56 end_cycle (); 61 57 #endif 62 58 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue_Control/include/Queue_Control.h
r56 r75 16 16 #include "Common/include/Debug.h" 17 17 18 using namespace std;19 20 18 namespace morpheo { 21 19 namespace behavioural { … … 27 25 private : const uint32_t _nb_elt_max; 28 26 private : uint32_t _nb_elt; 29 private : vector<uint32_t> * _tab;27 private : std::vector<uint32_t> * _tab; 30 28 31 29 public : Queue_Control (uint32_t nb_elt_max); … … 45 43 46 44 public : uint32_t operator[] (uint32_t); 47 public : ostream& operator<< (ostream& output_stream);45 public : std::ostream& operator<< (std::ostream& output_stream); 48 46 }; 49 47 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue_Control/src/Queue_Control.cpp
r56 r75 13 13 log_printf(FUNC,Queue_Control,FUNCTION,"Begin"); 14 14 15 _tab = new vector<uint32_t>;15 _tab = new std::vector<uint32_t>; 16 16 17 17 log_printf(FUNC,Queue_Control,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue_Control/src/Queue_Control_operator.cpp
r56 r75 8 8 #undef FUNCTION 9 9 #define FUNCTION "Queue_Control::operator<<" 10 ostream& Queue_Control::operator<< (ostream& output_stream)10 std::ostream& Queue_Control::operator<< (std::ostream& output_stream) 11 11 { 12 12 log_printf(FUNC,Queue_Control,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h
r62 r75 37 37 public : ~Parameters () ; 38 38 39 public : string msg_error (void); 40 41 public : string print (uint32_t depth); 42 public : friend ostream& operator<< (ostream& output_stream, 43 morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters & x); 39 public : std::string msg_error (void); 40 public : std::string print (uint32_t depth); 41 public : friend std::ostream& operator<< (std::ostream& output_stream, 42 morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters & x); 44 43 }; 45 44 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h
r71 r75 16 16 #include "Common/include/ToString.h" 17 17 #include <iostream> 18 using namespace std;19 18 20 19 #include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h" … … 28 27 #endif 29 28 #include "Behavioural/include/Usage.h" 30 31 using namespace std;32 29 33 30 namespace morpheo { … … 46 43 // -----[ fields ]---------------------------------------------------- 47 44 // Parameters 48 protected : const st ring _name;45 protected : const std::string _name; 49 46 protected : const Parameters * _param; 50 47 private : const Tusage_t _usage; 51 48 52 49 #ifdef STATISTICS 53 p rivate: Stat * _stat;50 public : Stat * _stat; 54 51 55 52 private : counter_t * _stat_nb_read; … … 106 103 sc_module_name name 107 104 #else 108 st ring name105 std::string name 109 106 #endif 110 107 #ifdef STATISTICS … … 128 125 #ifdef STATISTICS 129 126 public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); 130 public : string statistics_print (uint32_t depth);131 127 #endif 132 128 … … 137 133 #endif 138 134 135 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 139 136 private : void end_cycle (void); 140 137 #endif 141 138 }; 142 139 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/Parameters_msg_error.cpp
r62 r75 10 10 #include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h" 11 11 #include <sstream> 12 using namespace std;13 12 14 13 namespace morpheo { … … 18 17 namespace registerfile_monolithic { 19 18 20 st ring Parameters::msg_error(void)19 std::string Parameters::msg_error(void) 21 20 { 22 st ring msg = "";21 std::string msg = ""; 23 22 24 23 if ((8*sizeof(Tdata_t)) < _size_word) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/Parameters_print.cpp
r55 r75 8 8 #include <stdint.h> 9 9 #include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h" 10 #include <sstream> 11 using namespace std; 10 #include "Behavioural/include/XML.h" 12 11 13 12 namespace morpheo { … … 17 16 namespace registerfile_monolithic { 18 17 19 st ring Parameters::print (uint32_t depth)18 std::string Parameters::print (uint32_t depth) 20 19 { 21 string tab = string(depth,'\t');22 ostringstream msg; 23 msg << tab << "<registerfile_monolithic>" << endl24 << tab << "\t<nb_port_read value=\"" << _nb_port_read << "\" />" << endl 25 << tab << "\t<nb_port_write value=\"" << _nb_port_write << "\" />" << endl 26 << tab << "\t<nb_port_read_write value=\"" << _nb_port_read_write << "\" />" << endl 27 << tab << "\t<nb_word value=\"" << _nb_word << "\" />" << endl 28 << tab << "\t<size_word value=\"" << _size_word << "\" />" << endl 29 << tab << "</registerfile_monolithic>" << endl;30 31 return msg.str();20 XML xml ("registerfile_monolithic"); 21 22 xml.balise_open("registerfile_monolithic"); 23 xml.singleton_begin("nb_port_read "); xml.attribut("value",toString(_nb_port_read )); xml.singleton_end(); 24 xml.singleton_begin("nb_port_write "); xml.attribut("value",toString(_nb_port_write )); xml.singleton_end(); 25 xml.singleton_begin("nb_port_read_write"); xml.attribut("value",toString(_nb_port_read_write)); xml.singleton_end(); 26 xml.singleton_begin("nb_word "); xml.attribut("value",toString(_nb_word )); xml.singleton_end(); 27 xml.singleton_begin("size_word "); xml.attribut("value",toString(_size_word )); xml.singleton_end(); 28 xml.balise_close(); 29 30 return xml.get_body(depth); 32 31 }; 33 32 34 ostream& operator<< (ostream& output_stream ,35 33 std::ostream& operator<< (std::ostream& output_stream , 34 morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters & x) 36 35 { 37 36 output_stream << x.print(0); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic.cpp
r71 r75 19 19 sc_module_name name, 20 20 #else 21 st ring name ,21 std::string name , 22 22 #endif 23 23 #ifdef STATISTICS … … 37 37 38 38 #ifdef STATISTICS 39 statistics_declaration(param_statistics); 39 if (_usage & USE_STATISTICS) 40 statistics_declaration(param_statistics); 40 41 #endif 41 42 … … 102 103 #ifdef STATISTICS 103 104 if (_usage & USE_STATISTICS) 104 { 105 delete _stat; 106 } 105 delete _stat; 107 106 #endif 108 107 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_allocation.cpp
r62 r75 124 124 for (uint32_t i=0; i<_param->_nb_word; i++) 125 125 { 126 st ring rename = "reg_DATA[" + toString(i) + "]";126 std::string rename = "reg_DATA[" + toString(i) + "]"; 127 127 reg_DATA [i] = new SC_REGISTER (Tdata_t) (rename.c_str()); 128 128 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_end_cycle.cpp
r71 r75 1 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 1 2 /* 2 3 * $Id$ … … 37 38 }; // end namespace behavioural 38 39 }; // end namespace morpheo 40 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_statistics_declaration.cpp
r71 r75 17 17 void RegisterFile_Monolithic::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics) 18 18 { 19 _stat = new Stat (static_cast<st ring>(_name),19 _stat = new Stat (static_cast<std::string>(_name), 20 20 "RegisterFile_Monolithic", 21 21 param_statistics); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp
r71 r75 79 79 #endif 80 80 81 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 81 82 end_cycle(); 82 83 #endif 83 84 log_printf(FUNC,RegisterFile,"transition","End"); 84 85 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_body.cpp
r62 r75 38 38 for (uint32_t i = 0; i < _param->_nb_port_read; i++) 39 39 { 40 st ring str_address;40 std::string str_address; 41 41 if (_param->_have_port_address) 42 42 str_address = "conv_integer(in_READ_"+toString(i)+"_ADDRESS)"; … … 48 48 for (uint32_t i = 0; i < _param->_nb_port_read_write; i++) 49 49 { 50 st ring str_address;50 std::string str_address; 51 51 if (_param->_have_port_address) 52 52 str_address = "conv_integer(in_READ_WRITE_"+toString(i)+"_ADDRESS)"; … … 68 68 for (uint32_t i = 0; i < _param->_nb_port_write; i++) 69 69 { 70 st ring str_address;70 std::string str_address; 71 71 if (_param->_have_port_address) 72 72 str_address = "conv_integer(in_WRITE_"+toString(i)+"_ADDRESS)"; … … 80 80 for (uint32_t i = 0; i < _param->_nb_port_read_write; i++) 81 81 { 82 st ring str_address;82 std::string str_address; 83 83 if (_param->_have_port_address) 84 84 str_address = "conv_integer(in_READ_WRITE_"+toString(i)+"_ADDRESS)"; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.h
r62 r75 10 10 11 11 #include "Common/include/Debug.h" 12 #include "Common/include/FromString.h"13 12 #include "Behavioural/include/Parameters.h" 14 13 #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h" … … 16 15 17 16 namespace morpheo { 18 typedef enum {PARTIAL_CROSSBAR,19 FULL_CROSSBAR } Tcrossbar_t;20 21 template<> inline Tcrossbar_t fromString<Tcrossbar_t> (const std::string& x)22 {23 if ( (x.compare("0") == 0) or24 (x.compare("PARTIAL_CROSSBAR") == 0))25 return PARTIAL_CROSSBAR;26 if ( (x.compare("1") == 0) or27 (x.compare("FULL_CROSSBAR" ) == 0))28 return FULL_CROSSBAR;29 30 throw (ErrorMorpheo ("<fromString> : Unknow string : \""+x+"\""));31 };32 33 template<> inline std::string toString<Tcrossbar_t> (const Tcrossbar_t& x)34 {35 ostringstream out;36 37 if (x == PARTIAL_CROSSBAR)38 out << "PARTIAL_CROSSBAR";39 if (x == FULL_CROSSBAR)40 out << "FULL_CROSSBAR";41 42 return out.str();43 };44 45 17 namespace behavioural { 46 18 namespace generic { … … 92 64 public : ~Parameters () ; 93 65 94 public : string msg_error (void); 95 96 public : string print (uint32_t depth); 97 public : friend ostream& operator<< (ostream& output_stream, 98 morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters & x); 66 public : std::string msg_error (void); 67 public : std::string print (uint32_t depth); 68 public : friend std::ostream& operator<< (std::ostream& output_stream, 69 morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters & x); 99 70 }; 100 71 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h
r57 r75 20 20 #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h" 21 21 #ifdef STATISTICS 22 #include "Behavioural/ Generic/RegisterFile/RegisterFile_Multi_Banked/include/Statistics.h"22 #include "Behavioural/include/Stat.h" 23 23 #endif 24 24 #include "Behavioural/include/Component.h" … … 26 26 #include "Behavioural/include/Vhdl.h" 27 27 #endif 28 29 using namespace std;30 28 31 29 namespace morpheo { … … 43 41 // -----[ fields ]---------------------------------------------------- 44 42 // Parameters 45 protected : const st ring _name;43 protected : const std::string _name; 46 44 47 45 protected : const Parameters * _param; 48 //#ifdef STATISTICS49 // protected : const morpheo::behavioural::Parameters_Statistics _param_statistics;50 //#endif51 46 52 47 #ifdef STATISTICS 53 p rivate : Statistics* _stat;48 public : Stat * _stat; 54 49 #endif 55 50 … … 100 95 sc_module_name name, 101 96 #else 102 st ringname,97 std::string name, 103 98 #endif 104 99 #ifdef STATISTICS … … 113 108 private : void deallocation (void); 114 109 115 //#if defined(STATISTICS) or defined(VHDL_TESTBENCH)116 117 110 private : Taddress_t address_bank (Taddress_t address); 118 111 private : Taddress_t address_num_reg (Taddress_t address); … … 129 122 public : void partial_crossbar_genMealy_read (void); 130 123 public : void partial_crossbar_genMealy_write(void); 131 132 //#endif133 124 #endif 134 #ifdef STATISTICS135 public : string statistics (uint32_t depth);136 #endif137 125 138 126 #if VHDL … … 142 130 #endif 143 131 144 #ifdef VHDL_TESTBENCH 145 private : void vhdl_testbench_transition (void); 132 #ifdef STATISTICS 133 public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); 134 #endif 135 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 136 private : void end_cycle (void); 146 137 #endif 147 138 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h
r57 r75 10 10 11 11 #include "Behavioural/include/Types.h" 12 12 #include "Common/include/ToString.h" 13 #include "Common/include/FromString.h" 13 14 namespace morpheo { 14 15 namespace behavioural { … … 23 24 }; // end namespace registerfile 24 25 }; // end namespace generic 26 }; // end namespace behavioural 25 27 26 }; // end namespace behavioural 28 typedef enum {PARTIAL_CROSSBAR, 29 FULL_CROSSBAR } Tcrossbar_t; 30 31 template<> inline Tcrossbar_t fromString<Tcrossbar_t> (const std::string& x) 32 { 33 if ( (x.compare("0") == 0) or 34 (x.compare("PARTIAL_CROSSBAR") == 0)) 35 return PARTIAL_CROSSBAR; 36 if ( (x.compare("1") == 0) or 37 (x.compare("FULL_CROSSBAR" ) == 0)) 38 return FULL_CROSSBAR; 39 40 throw (ErrorMorpheo ("<fromString> : Unknow string : \""+x+"\"")); 41 }; 42 43 template<> inline std::string toString<Tcrossbar_t> (const Tcrossbar_t& x) 44 { 45 std::ostringstream out; 46 47 if (x == PARTIAL_CROSSBAR) 48 out << "PARTIAL_CROSSBAR"; 49 if (x == FULL_CROSSBAR) 50 out << "FULL_CROSSBAR"; 51 52 return out.str(); 53 }; 54 55 27 56 }; // end namespace morpheo 28 57 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/Parameters_msg_error.cpp
r53 r75 7 7 8 8 #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.h" 9 #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h"10 #include <sstream>11 using namespace std;12 9 13 10 namespace morpheo { … … 18 15 19 16 20 st ring Parameters::msg_error(void)17 std::string Parameters::msg_error(void) 21 18 { 22 19 log_printf(FUNC,RegisterFile_Multi_Banked,"msg_error","Begin"); 23 20 24 st ring msg = "";21 std::string msg = ""; 25 22 26 23 if (_nb_port_read < _nb_port_read_by_bank) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/Parameters_print.cpp
r53 r75 8 8 #include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.h" 9 9 #include "Behavioural/include/XML.h" 10 using namespace std;11 10 12 11 namespace morpheo { … … 17 16 18 17 19 st ring Parameters::print (uint32_t depth)18 std::string Parameters::print (uint32_t depth) 20 19 { 21 20 log_printf(FUNC,RegisterFile_Multi_Banked,"print","Begin"); … … 46 45 }; 47 46 48 ostream& operator<< (ostream& output_stream ,49 47 std::ostream& operator<< (std::ostream& output_stream , 48 morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters & x) 50 49 { 51 50 output_stream << x.print(0); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked.cpp
r67 r75 26 26 _name (name) 27 27 ,_param (param) 28 // #ifdef STATISTICS29 // ,_param_statistics (param_statistics)30 // #endif31 28 { 32 29 log_printf(FUNC,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Begin"); … … 42 39 43 40 // Allocation of statistics 44 _stat = new Statistics (static_cast<string>(_name), 45 param_statistics , 46 param); 41 statistics_declaration(param_statistics); 47 42 #endif 48 43 … … 142 137 #ifdef STATISTICS 143 138 log_printf(INFO,RegisterFile_Multi_Banked,"~RegisterFile_Multi_Banked","Generate Statistics file"); 144 145 _stat->generate_file(statistics(0));146 139 147 140 delete _stat; … … 160 153 }; // end namespace registerfile 161 154 }; // end namespace generic 162 163 155 }; // end namespace behavioural 164 156 }; // end namespace morpheo -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_allocation.cpp
r62 r75 18 18 void RegisterFile_Multi_Banked::allocation (void) 19 19 { 20 string rename;21 22 20 log_printf(FUNC,RegisterFile_Multi_Banked,"allocation","Begin"); 23 21 … … 27 25 ,"RegisterFile_Multi_Banked" 28 26 #ifdef POSITION 29 ,R egister27 ,REGISTER 30 28 #endif 31 29 ); … … 106 104 for (uint32_t j=0; j<_param->_nb_word; j++) 107 105 { 108 st ring rename = "reg_DATA_" + toString(i) + "_" + toString(j);106 std::string rename = "reg_DATA_" + toString(i) + "_" + toString(j); 109 107 reg_DATA [i][j] = new SC_REGISTER (Tdata_t) (rename.c_str()); 110 108 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_end_cycle.cpp
r59 r75 1 #ifdef VHDL_TESTBENCH 1 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 2 2 3 /* 3 4 * $Id$ … … 15 16 namespace registerfile_multi_banked { 16 17 18 #undef FUNCTION 19 #define FUNCTION "RegisterFile_Multi_Banked::end_cycle" 20 void RegisterFile_Multi_Banked::end_cycle () 21 { 22 log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"Begin"); 17 23 18 void RegisterFile_Multi_Banked::vhdl_testbench_transition () 19 {20 log_printf(FUNC,RegisterFile_Multi_Banked,"vhdl_testbench_transition","Begin"); 24 #ifdef STATISTICS 25 _stat->end_cycle(); 26 #endif 21 27 28 #ifdef VHDL_TESTBENCH 22 29 // Evaluation before read the ouput signal 23 // sc_start(0); 30 // sc_start(0); 31 _interfaces->testbench(); 32 #endif 24 33 25 _interfaces->testbench(); 26 27 log_printf(FUNC,RegisterFile_Multi_Banked,"vhdl_testbench_transition","End"); 34 log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"End"); 28 35 }; 29 36 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_statistics_declaration.cpp
r59 r75 15 15 namespace registerfile_multi_banked { 16 16 17 #undef FUNCTION 18 #define FUNCTION "RegisterFile_Multi_Banked::statistics_declaration" 19 void RegisterFile_Multi_Banked::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics) 20 { 21 log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"Begin"); 17 22 18 string RegisterFile_Multi_Banked::statistics (uint32_t depth) 19 { 20 log_printf(FUNC,RegisterFile_Multi_Banked,"statistics","Begin"); 21 22 string txt = _stat->print(depth); 23 _stat = new Stat (static_cast<std::string>(_name), 24 "RegisterFile_Multi_Banked", 25 param_statistics); 23 26 24 log_printf(FUNC,RegisterFile_Multi_Banked,"statistics","End"); 25 26 return txt; 27 log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"End"); 27 28 }; 28 29 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_transition.cpp
r57 r75 35 35 } 36 36 37 #ifdef STATISTICS 38 _stat->add(); 39 #endif 40 41 #ifdef VHDL_TESTBENCH 42 vhdl_testbench_transition (); 37 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 38 end_cycle(); 43 39 #endif 44 40 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_vhdl.cpp
r57 r75 39 39 ,_param->_size_word); 40 40 41 st ring bank_name = _name + "_bank";41 std::string bank_name = _name + "_bank"; 42 42 bank = new morpheo::behavioural::generic::registerfile::registerfile_monolithic::RegisterFile_Monolithic 43 43 (bank_name.c_str() … … 106 106 (nb_select_port_4 != nb_select_port_1) ); 107 107 108 st ring select_name1;109 st ring select_name2;110 st ring select_name3;111 st ring select_name4;108 std::string select_name1; 109 std::string select_name2; 110 std::string select_name3; 111 std::string select_name4; 112 112 113 113 if (have_select1) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_vhdl_body.cpp
r62 r75 85 85 { 86 86 uint32_t num_port = (_param->_crossbar == FULL_CROSSBAR)?k:(_param->_nb_port_read_by_bank*k+j); 87 st ring separator = ((k==0)?" ":",");88 st ring index = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";87 std::string separator = ((k==0)?" ":","); 88 std::string index = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):""; 89 89 90 90 vhdl->set_body("\t"+separator+" in_VAL_"+toString(k)+" \t=>\tinternal_READ_"+toString(i)+"_"+toString(num_port)+index+"_VAL"); … … 104 104 { 105 105 uint32_t num_port = (_param->_crossbar == FULL_CROSSBAR)?k:(_param->_nb_port_write_by_bank*k+j); 106 st ring separator = ((k==0)?" ":",");107 st ring index = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";106 std::string separator = ((k==0)?" ":","); 107 std::string index = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):""; 108 108 109 109 vhdl->set_body("\t"+separator+" in_VAL_"+toString(k)+" \t=>\tinternal_WRITE_"+toString(i)+"_"+toString(num_port)+index+"_VAL"); … … 130 130 { 131 131 uint32_t num_port = (_param->_crossbar == FULL_CROSSBAR)?k:(_param->_nb_port_read_by_bank*k+j); 132 st ring index = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";132 std::string index = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):""; 133 133 vhdl->set_body("\tor internal_SELECT_READ_"+toString(i)+"_"+toString(num_port)+index+"_VAL"); 134 134 } … … 143 143 { 144 144 uint32_t num_port = (_param->_crossbar == FULL_CROSSBAR)?k:(_param->_nb_port_write_by_bank*k+j); 145 st ring index = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";145 std::string index = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):""; 146 146 147 147 vhdl->set_body("\tor internal_SELECT_WRITE_"+toString(i)+"_"+toString(num_port)+index+"_VAL"); … … 168 168 { 169 169 uint32_t num_port = (_param->_crossbar == FULL_CROSSBAR)?k:(_param->_nb_port_read_by_bank*k+j); 170 st ring index = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";170 std::string index = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):""; 171 171 172 172 vhdl->set_body("\tin_READ_"+toString(num_port)+"_ADDRESS"+std_logic_range(_param->_size_address_by_bank)+" when internal_SELECT_READ_"+toString(i)+"_"+toString(num_port)+index+"_VAL ='1' else"); … … 183 183 { 184 184 uint32_t num_port = (_param->_crossbar == FULL_CROSSBAR)?k:(_param->_nb_port_write_by_bank*k+j); 185 st ring index = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";185 std::string index = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):""; 186 186 187 187 vhdl->set_body("\tin_WRITE_"+toString(num_port)+"_ADDRESS"+std_logic_range(_param->_size_address_by_bank)+" when internal_SELECT_WRITE_"+toString(i)+"_"+toString(num_port)+index+"_VAL='1' else"); … … 207 207 { 208 208 uint32_t num_port = (_param->_crossbar == FULL_CROSSBAR)?k:(_param->_nb_port_write_by_bank*k+j); 209 st ring index = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):"";209 std::string index = (_param->_crossbar == FULL_CROSSBAR)?("_"+toString(j)):""; 210 210 vhdl->set_body("\tin_WRITE_"+toString(num_port)+"_DATA when internal_SELECT_WRITE_"+toString(i)+"_"+toString(num_port)+index+"_VAL='1' else"); 211 211 } … … 225 225 for (uint32_t j=0; j<_param->_nb_port_read; j ++) 226 226 { 227 st ring str_address;227 std::string str_address; 228 228 229 229 if (_param->_have_bank_port_address == true) … … 236 236 for (uint32_t j=0; j<_param->_nb_port_write; j ++) 237 237 { 238 st ring str_address;238 std::string str_address; 239 239 240 240 if (_param->_have_port_address == true) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/include/Parameters.h
r62 r75 43 43 public : ~Parameters () ; 44 44 45 public : string msg_error (void); 46 47 public : string print (uint32_t depth); 48 public : friend ostream& operator<< (ostream& output_stream, 45 public : std::string msg_error (void); 46 public : std::string print (uint32_t depth); 47 public : friend std::ostream& operator<< (std::ostream& output_stream, 49 48 morpheo::behavioural::generic::registerfile::Parameters & x); 50 49 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/include/RegisterFile.h
r62 r75 23 23 #include "Behavioural/Generic/RegisterFile/include/Types.h" 24 24 #ifdef STATISTICS 25 #include "Behavioural/ Generic/RegisterFile/include/Statistics.h"25 #include "Behavioural/include/Stat.h" 26 26 #endif 27 27 #include "Behavioural/include/Component.h" … … 29 29 #include "Behavioural/include/Vhdl.h" 30 30 #endif 31 32 using namespace std;33 31 34 32 namespace morpheo { … … 45 43 // -----[ fields ]---------------------------------------------------- 46 44 // Parameters 47 protected : const st ring _name;45 protected : const std::string _name; 48 46 49 47 protected : const Parameters * _param; 48 50 49 #ifdef STATISTICS 51 p rotected : morpheo::behavioural::Parameters_Statistics * _param_statistics;50 public : Stat * _stat; 52 51 #endif 53 52 … … 89 88 public : RegisterFile ( 90 89 #ifdef SYSTEMC 91 90 sc_module_name name, 92 91 #else 93 92 std::string name, 94 93 #endif 95 94 #ifdef STATISTICS 96 95 morpheo::behavioural::Parameters_Statistics * param_statistics, 97 96 #endif 98 99 97 Parameters * param ); 98 100 99 public : ~RegisterFile (void); 101 100 102 101 #ifdef SYSTEMC 103 private : void allocation (void); 102 private : void allocation ( 103 #ifdef STATISTICS 104 morpheo::behavioural::Parameters_Statistics * param_statistics 105 #else 106 void 107 #endif 108 ); 104 109 private : void deallocation (void); 105 110 #endif 106 107 #ifdef STATISTICS108 public : string statistics (uint32_t depth);109 #endif110 111 }; 111 112 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/Parameters_msg_error.cpp
r53 r75 9 9 #include "Behavioural/Generic/RegisterFile/include/Types.h" 10 10 #include <sstream> 11 using namespace std;12 11 13 12 namespace morpheo { … … 17 16 18 17 19 st ring Parameters::msg_error(void)18 std::string Parameters::msg_error(void) 20 19 { 21 20 log_printf(FUNC,RegisterFile,"msg_error","Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/Parameters_print.cpp
r53 r75 8 8 #include "Behavioural/Generic/RegisterFile/include/Parameters.h" 9 9 #include "Behavioural/include/XML.h" 10 using namespace std;11 10 12 11 namespace morpheo { … … 16 15 17 16 18 st ring Parameters::print (uint32_t depth)17 std::string Parameters::print (uint32_t depth) 19 18 { 20 19 log_printf(FUNC,RegisterFile,"print","Begin"); 21 20 22 st ring _return;21 std::string _return; 23 22 24 23 if (_instance == instance_RegisterFile_Monolithic) … … 32 31 }; 33 32 34 ostream& operator<< (ostream& output_stream ,35 33 std::ostream& operator<< (std::ostream& output_stream , 34 morpheo::behavioural::generic::registerfile::Parameters & x) 36 35 { 37 if (x._instance == instance_RegisterFile_Monolithic) 38 output_stream << x._param_registerfile_monolithic ->print(0); 39 else 40 output_stream << x._param_registerfile_multi_banked->print(0); 36 output_stream << x.print(0); 41 37 42 38 return output_stream; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile.cpp
r62 r75 25 25 _name (name) 26 26 ,_param (param) 27 #ifdef STATISTICS28 ,_param_statistics (param_statistics)29 #endif30 27 { 31 28 log_printf(FUNC,RegisterFile,"RegisterFile","Begin"); … … 34 31 log_printf(INFO,RegisterFile,"RegisterFile","Allocation"); 35 32 36 allocation (); 33 allocation ( 34 # ifdef STATISTICS 35 param_statistics 36 # endif 37 ); 38 #endif 39 40 #ifdef STATISTICS 41 if (_param->_instance == instance_RegisterFile_Monolithic) 42 _stat = component_RegisterFile_Monolithic ->_stat; 43 else 44 _stat = component_RegisterFile_Multi_Banked->_stat; 37 45 #endif 38 46 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile_allocation.cpp
r62 r75 15 15 16 16 17 void RegisterFile::allocation (void) 17 void RegisterFile::allocation ( 18 #ifdef STATISTICS 19 morpheo::behavioural::Parameters_Statistics * param_statistics 20 #else 21 void 22 #endif 23 ) 18 24 { 19 st ring rename;25 std::string rename; 20 26 21 27 log_printf(FUNC,RegisterFile,"allocation","Begin"); … … 78 84 component_RegisterFile_Monolithic = new morpheo::behavioural::generic::registerfile::registerfile_monolithic ::RegisterFile_Monolithic ::RegisterFile_Monolithic (_name.c_str() 79 85 #ifdef STATISTICS 80 , _param_statistics86 ,param_statistics 81 87 #endif 82 88 ,_param->_param_registerfile_monolithic … … 89 95 component_RegisterFile_Multi_Banked = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::RegisterFile_Multi_Banked::RegisterFile_Multi_Banked (_name.c_str() 90 96 #ifdef STATISTICS 91 , _param_statistics97 ,param_statistics 92 98 #endif 93 99 ,_param->_param_registerfile_multi_banked -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Parameters.h
r44 r75 34 34 public : ~Parameters () ; 35 35 36 public : string msg_error (void); 37 38 public : string print (uint32_t depth); 39 public : friend ostream& operator<< (ostream& output_stream, 40 morpheo::behavioural::generic::select::select_priority_fixed::Parameters & x); 36 public : std::string msg_error (void); 37 public : std::string print (uint32_t depth); 38 public : friend std::ostream& operator<< (std::ostream& output_stream, 39 morpheo::behavioural::generic::select::select_priority_fixed::Parameters & x); 41 40 }; 42 41 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h
r57 r75 20 20 #include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Types.h" 21 21 #ifdef STATISTICS 22 #include "Behavioural/ Generic/Select/Select_Priority_Fixed/include/Statistics.h"22 #include "Behavioural/include/Stat.h" 23 23 #endif 24 24 #include "Behavioural/include/Component.h" … … 27 27 #endif 28 28 #include "Behavioural/include/Usage.h" 29 30 using namespace std;31 29 32 30 namespace morpheo { … … 44 42 // -----[ fields ]---------------------------------------------------- 45 43 // Parameters 46 protected : const st ring _name;44 protected : const std::string _name; 47 45 protected : const Parameters * _param; 48 46 private : const Tusage_t _usage; … … 52 50 53 51 #ifdef STATISTICS 54 p rivate : Statistics* _stat;52 public : Stat * _stat; 55 53 #endif 56 54 … … 87 85 sc_module_name name, 88 86 #else 89 st ringname,87 std::string name, 90 88 #endif 91 89 #ifdef STATISTICS … … 101 99 private : void deallocation (void); 102 100 103 # if defined(STATISTICS) or defined(VHDL_TESTBENCH)101 # if defined(STATISTICS) or defined(VHDL_TESTBENCH) 104 102 public : void transition (void); 105 # endif103 # endif 106 104 public : void genMealy_entity (void); 107 105 #endif 108 #ifdef STATISTICS109 public : string statistics (uint32_t depth);110 #endif111 106 112 107 #if VHDL … … 116 111 #endif 117 112 118 #ifdef VHDL_TESTBENCH 119 private : void vhdl_testbench_transition (void); 113 #ifdef STATISTICS 114 public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); 115 #endif 116 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 117 private : void end_cycle (void); 120 118 #endif 121 119 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Parameters_msg_error.cpp
r40 r75 9 9 #include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Types.h" 10 10 #include <sstream> 11 using namespace std;12 11 13 12 namespace morpheo { … … 18 17 19 18 20 st ring Parameters::msg_error(void)19 std::string Parameters::msg_error(void) 21 20 { 22 21 log_printf(FUNC,Select_Priority_Fixed,"msg_error","Begin"); 23 22 24 st ring msg = "";23 std::string msg = ""; 25 24 26 25 if ((_encoding_one_hot or _encoding_compact) == false) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Parameters_print.cpp
r15 r75 8 8 #include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Parameters.h" 9 9 #include "Behavioural/include/XML.h" 10 using namespace std;11 10 12 11 namespace morpheo { … … 16 15 namespace select_priority_fixed { 17 16 18 st ring Parameters::print (uint32_t depth)17 std::string Parameters::print (uint32_t depth) 19 18 { 20 19 log_printf(FUNC,Select_Priority_Fixed,"print","Begin"); … … 33 32 }; 34 33 35 ostream& operator<< (ostream& output_stream ,36 34 std::ostream& operator<< (std::ostream& output_stream , 35 morpheo::behavioural::generic::select::select_priority_fixed::Parameters & x) 37 36 { 38 37 output_stream << x.print(0); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed.cpp
r68 r75 30 30 _param (param), 31 31 _usage (usage) 32 // #ifdef STATISTICS33 // ,_param_statistics (param_statistics)34 // #endif35 32 { 36 33 log_printf(FUNC,Select_Priority_Fixed,"Select_Priority_Fixed","Begin"); … … 44 41 log_printf(INFO,Select_Priority_Fixed,"Select_Priority_Fixed","Allocation of statistics"); 45 42 46 // Allocation of statistics 47 _stat = new Statistics (static_cast<string>(_name), 48 param_statistics , 49 param); 43 statistics_declaration(param_statistics); 50 44 } 51 45 #endif … … 106 100 log_printf(INFO,Select_Priority_Fixed,"~Select_Priority_Fixed","Generate Statistics file"); 107 101 108 _stat->generate_file(statistics(0));109 102 delete _stat; 110 103 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_end_cycle.cpp
r59 r75 1 #if def VHDL_TESTBENCH1 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 2 2 /* 3 3 * $Id$ … … 15 15 namespace select_priority_fixed { 16 16 17 #undef FUNCTION 18 #define FUNCTION "Select_Priority_Fixed::end_cycle" 19 void Select_Priority_Fixed::end_cycle () 20 { 21 log_printf(FUNC,Select_Priority_Fixed,FUNCTION,"Begin"); 17 22 18 void Select_Priority_Fixed::vhdl_testbench_transition () 19 {20 log_printf(FUNC,Select_Priority_Fixed,"vhdl_testbench_transition","Begin"); 23 #ifdef STATISTICS 24 _stat->end_cycle(); 25 #endif 21 26 27 #ifdef VHDL_TESTBENCH 22 28 // Evaluation before read the ouput signal 23 // sc_start(0); 29 // sc_start(0); 30 _interfaces->testbench(); 31 #endif 24 32 25 _interfaces->testbench(); 26 27 log_printf(FUNC,Select_Priority_Fixed,"vhdl_testbench_transition","End"); 33 log_printf(FUNC,Select_Priority_Fixed,FUNCTION,"End"); 28 34 }; 29 35 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_statistics_declaration.cpp
r59 r75 15 15 namespace select_priority_fixed { 16 16 17 #undef FUNCTION 18 #define FUNCTION "Select_Priority_Fixed::statistics_declaration" 19 void Select_Priority_Fixed::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics) 20 { 21 log_printf(FUNC,Select_Priority_Fixed,FUNCTION,"Begin"); 17 22 18 string Select_Priority_Fixed::statistics (uint32_t depth) 19 { 20 log_printf(FUNC,Select_Priority_Fixed,"statistics","Begin"); 21 22 string txt = _stat->print(depth); 23 _stat = new Stat (static_cast<std::string>(_name), 24 "Select_Priority_Fixed", 25 param_statistics); 23 26 24 log_printf(FUNC,Select_Priority_Fixed,"statistics","End"); 25 26 return txt; 27 log_printf(FUNC,Select_Priority_Fixed,FUNCTION,"End"); 27 28 }; 28 29 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_transition.cpp
r15 r75 21 21 log_printf(FUNC,Select_Priority_Fixed,"transition","Begin"); 22 22 23 #ifdef STATISTICS 24 _stat->add(); 25 #endif 26 27 #ifdef VHDL_TESTBENCH 28 vhdl_testbench_transition (); 23 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 24 end_cycle(); 29 25 #endif 30 26 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_body.cpp
r59 r75 38 38 if (_param->_encoding_compact) 39 39 { 40 st ring range = ((_param->_size_entity-1)==0)?"(0)":std_logic_range(_param->_size_entity-1,0);40 std::string range = ((_param->_size_entity-1)==0)?"(0)":std_logic_range(_param->_size_entity-1,0); 41 41 42 42 vhdl->set_body ("out_ENTITY <= internal_entity"+range+";"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/include/test.h
r2 r75 20 20 using namespace morpheo::behavioural; 21 21 using namespace morpheo::behavioural::generic; 22 23 22 using namespace morpheo::behavioural::generic::shifter; 24 23 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/src/test.cpp
r44 r75 33 33 exit (EXIT_FAILURE); 34 34 } 35 36 #ifdef STATISTICS 37 morpheo::behavioural::Parameters_Statistics * param_stat = new morpheo::behavioural::Parameters_Statistics(5,50); 38 #endif 35 39 Shifter * _Shifter = new Shifter (name.c_str(), 36 40 #ifdef STATISTICS 37 morpheo::behavioural::Parameters_Statistics(5,50),38 #endif 39 41 param_stat, 42 #endif 43 param); 40 44 41 45 #ifdef SYSTEMC … … 48 52 sc_signal <Tshift_t > SHIFTER_SHIFT [param._nb_port]; 49 53 sc_signal <Tdirection_t> SHIFTER_DIRECTION [param._nb_port]; 50 sc_signal < Ttype_t > SHIFTER_TYPE [param._nb_port];54 sc_signal <morpheo::behavioural::generic::shifter::Ttype_t > SHIFTER_TYPE [param._nb_port]; 51 55 sc_signal <Tcarry_t > SHIFTER_CARRY [param._nb_port]; 52 56 sc_signal <Tcontrol_t > SHIFTER_CARRY_IN [param._nb_port]; … … 96 100 97 101 Tdirection_t direction ; 98 Ttype_t type ;102 morpheo::behavioural::generic::shifter::Ttype_t type ; 99 103 Tcarry_t carry ; 100 104 const Tdata_t data_max = (1<<param._size_data); … … 271 275 << hex 272 276 << data_in[i] << op 273 << dec277 << std::dec 274 278 << shift << " = " 275 << hex279 << std::hex 276 280 << SHIFTER_DATA_OUT [i].read() 277 281 << " - completion : " 278 282 << data_completion [i] 279 << dec ;283 << std::dec ; 280 284 281 285 TEST(Tdata_t,SHIFTER_DATA_OUT [i].read(),data_out[i]); … … 298 302 299 303 delete _Shifter; 304 305 #ifdef STATISTICS 306 delete param_stat; 307 #endif 300 308 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Parameters.h
r2 r75 48 48 public : const bool _have_direction_right ; 49 49 50 string toString_rotate (rotate_t x)51 {52 switch (x)53 {54 case without_rotate : return "without_rotate" ;55 case internal_rotate : return "internal_rotate";56 case external_rotate : return "external_rotate";57 default : return "";58 }59 };60 61 string toString_direction (direction_t x)62 {63 switch (x)64 {65 case internal_right_shift : return "internal_right_shift";66 case internal_left_shift : return "internal_left_shift" ;67 case external_direction : return "external_direction" ;68 default : return "";69 }70 };71 72 string toString_carry (carry_t x)73 {74 switch (x)75 {76 case internal_logic : return "internal_logic" ;77 case internal_arithmetic : return "internal_arithmetic" ;78 case external_carry : return "external_carry" ;79 case external_completion : return "external_completion" ;80 default : return "";81 }82 };83 84 50 //-----[ methods ]----------------------------------------------------------- 85 51 public : Parameters (uint32_t size_data , … … 93 59 public : ~Parameters () ; 94 60 95 public : string msg_error (void); 96 97 public : string print (uint32_t depth); 98 public : friend ostream& operator<< (ostream& output_stream, 99 morpheo::behavioural::generic::shifter::Parameters & x); 61 public : std::string msg_error (void); 62 public : std::string print (uint32_t depth); 63 public : friend std::ostream& operator<< (std::ostream& output_stream, 64 morpheo::behavioural::generic::shifter::Parameters & x); 100 65 }; 101 66 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Shifter.h
r44 r75 19 19 #include "Behavioural/Generic/Shifter/include/Types.h" 20 20 #ifdef STATISTICS 21 #include "Behavioural/ Generic/Shifter/include/Statistics.h"21 #include "Behavioural/include/Stat.h" 22 22 #endif 23 23 #ifdef VHDL … … 25 25 #endif 26 26 #include "Behavioural/include/Component.h" 27 28 using namespace std;29 27 30 28 namespace morpheo { … … 41 39 // -----[ fields ]---------------------------------------------------- 42 40 // Parameters 43 protected : const st ring _name;41 protected : const std::string _name; 44 42 45 43 protected : const Parameters _param; 46 44 #ifdef STATISTICS 47 p rivate : Statistics* _stat;45 public : Stat * _stat; 48 46 #endif 49 47 … … 79 77 public : Shifter ( 80 78 #ifdef SYSTEMC 81 sc_module_name name,79 sc_module_name name, 82 80 #else 83 st ringname,81 std::string name, 84 82 #endif 85 83 #ifdef STATISTICS 86 morpheo::behavioural::Parameters_Statistics param_statistics,84 morpheo::behavioural::Parameters_Statistics * param_statistics, 87 85 #endif 88 Parameters param );86 Parameters param ); 89 87 90 88 public : Shifter (Parameters param ); … … 106 104 private : void vhdl_body (Vhdl * & vhdl); 107 105 #endif 106 108 107 #ifdef STATISTICS 109 public : string statistics (uint32_t depth);108 public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); 110 109 #endif 111 112 #ifdef VHDL_TESTBENCH 113 private : void vhdl_testbench_transition (void); 110 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 111 private : void end_cycle (void); 114 112 #endif 115 116 113 }; 117 114 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Types.h
r44 r75 1 #ifdef SYSTEMC2 1 #ifndef morpheo_behavioural_generic_shifter_Type_h 3 2 #define morpheo_behavioural_generic_shifter_Type_h … … 10 9 */ 11 10 12 #include "Common/include/Types.h" 11 #include "Behavioural/include/Types.h" 12 #include "Common/include/ToString.h" 13 13 14 14 namespace morpheo { … … 49 49 }; // end namespace generic 50 50 }; // end namespace behavioural 51 52 template<> inline std::string toString<morpheo::behavioural::generic::shifter::rotate_t>(const morpheo::behavioural::generic::shifter::rotate_t& x) 53 { 54 switch (x) 55 { 56 case morpheo::behavioural::generic::shifter::without_rotate : return "without_rotate" ; 57 case morpheo::behavioural::generic::shifter::internal_rotate : return "internal_rotate"; 58 case morpheo::behavioural::generic::shifter::external_rotate : return "external_rotate"; 59 default : return ""; 60 } 61 }; 62 63 template<> inline std::string toString<morpheo::behavioural::generic::shifter::direction_t>(const morpheo::behavioural::generic::shifter::direction_t& x) 64 { 65 switch (x) 66 { 67 case morpheo::behavioural::generic::shifter::internal_right_shift : return "internal_right_shift"; 68 case morpheo::behavioural::generic::shifter::internal_left_shift : return "internal_left_shift" ; 69 case morpheo::behavioural::generic::shifter::external_direction : return "external_direction" ; 70 default : return ""; 71 } 72 }; 73 74 template<> inline std::string toString<morpheo::behavioural::generic::shifter::carry_t>(const morpheo::behavioural::generic::shifter::carry_t& x) 75 { 76 switch (x) 77 { 78 case morpheo::behavioural::generic::shifter::internal_logic : return "internal_logic" ; 79 case morpheo::behavioural::generic::shifter::internal_arithmetic : return "internal_arithmetic" ; 80 case morpheo::behavioural::generic::shifter::external_carry : return "external_carry" ; 81 case morpheo::behavioural::generic::shifter::external_completion : return "external_completion" ; 82 default : return ""; 83 } 84 }; 85 86 51 87 }; // end namespace morpheo 52 88 53 89 #endif 54 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters_msg_error.cpp
r2 r75 9 9 #include "Behavioural/Generic/Shifter/include/Types.h" 10 10 #include <sstream> 11 using namespace std;12 11 13 12 namespace morpheo { … … 16 15 namespace shifter { 17 16 18 st ring Parameters::msg_error(void)17 std::string Parameters::msg_error(void) 19 18 { 20 st ring msg = "";19 std::string msg = ""; 21 20 22 21 if (_size_data < 2) … … 42 41 { 43 42 msg += " - Incompatible parameters : internal_rotate have never carry (must be set at \"internal_logic\"\n"; 44 msg += " * rotate : " + toString _rotate(_rotate) + "\n";45 msg += " * carry : " + toString _carry(_carry ) + "\n";43 msg += " * rotate : " + toString(_rotate) + "\n"; 44 msg += " * carry : " + toString(_carry ) + "\n"; 46 45 } 47 46 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters_print.cpp
r2 r75 7 7 8 8 #include "Behavioural/Generic/Shifter/include/Parameters.h" 9 #include <sstream> 10 using namespace std; 9 #include "Behavioural/include/XML.h" 11 10 12 11 namespace morpheo { … … 16 15 17 16 18 st ring Parameters::print (uint32_t depth)17 std::string Parameters::print (uint32_t depth) 19 18 { 20 string tab = string(depth,'\t'); 21 ostringstream msg; 22 msg << tab << "<shifter>" << endl 23 << tab << "\t<size_data value=\"" << _size_data << "\" />" << endl 24 << tab << "\t<nb_port value=\"" << _nb_port << "\" />" << endl 25 << tab << "\t<shift_value value=\"" << _shift_value << "\" />" << endl 26 << tab << "\t<rotate value=\"" << toString_rotate (_rotate ) << "\" />" << endl 27 << tab << "\t<direction value=\"" << toString_direction (_direction) << "\" />" << endl 28 << tab << "\t<carry value=\"" << toString_carry (_carry ) << "\" />" << endl 29 << tab << "\t<!-- port_completion is type bool : " << toString(_type_completion_bool) << " -->" << endl 30 << tab << "</shifter>" << endl; 19 XML xml ("shifter"); 20 21 xml.balise_open("shifter"); 22 xml.singleton_begin("size_data "); xml.attribut("value",toString(_size_data )); xml.singleton_end(); 23 xml.singleton_begin("nb_port "); xml.attribut("value",toString(_nb_port )); xml.singleton_end(); 24 xml.singleton_begin("shift_value"); xml.attribut("value",toString(_shift_value)); xml.singleton_end(); 25 xml.singleton_begin("rotate "); xml.attribut("value",toString(_rotate )); xml.singleton_end(); 26 xml.singleton_begin("direction "); xml.attribut("value",toString(_direction )); xml.singleton_end(); 27 xml.singleton_begin("carry "); xml.attribut("value",toString(_carry )); xml.singleton_end(); 31 28 32 return msg.str();29 return xml.get_body(depth); 33 30 }; 34 31 35 ostream& operator<< (ostream& output_stream ,36 32 std::ostream& operator<< (std::ostream& output_stream , 33 morpheo::behavioural::generic::shifter::Parameters & x) 37 34 { 38 35 output_stream << x.print(0); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter.cpp
r66 r75 20 20 #endif 21 21 #ifdef STATISTICS 22 ,morpheo::behavioural::Parameters_Statistics 22 ,morpheo::behavioural::Parameters_Statistics * param_statistics 23 23 #endif 24 24 ,morpheo::behavioural::generic::shifter::Parameters param ): … … 32 32 #ifdef STATISTICS 33 33 // Allocation of statistics 34 _stat = new Statistics (static_cast<string>(_name), 35 param_statistics , 36 param); 34 statistics_declaration(param_statistics); 37 35 #endif 38 36 … … 101 99 102 100 #ifdef STATISTICS 103 _stat->generate_file(statistics(0));104 105 101 delete _stat; 106 102 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_end_cycle.cpp
r59 r75 1 #if def VHDL_TESTBENCH1 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 2 2 /* 3 3 * $Id$ … … 14 14 namespace shifter { 15 15 16 #undef FUNCTION 17 #define FUNCTION "Shifter::end_cycle" 18 void Shifter::end_cycle () 19 { 20 log_printf(FUNC,Shifter,FUNCTION,"Begin"); 16 21 17 void Shifter::vhdl_testbench_transition (void) 18 {19 // sc_start(0); 22 #ifdef STATISTICS 23 _stat->end_cycle(); 24 #endif 20 25 26 #ifdef VHDL_TESTBENCH 27 // Evaluation before read the ouput signal 28 // sc_start(0); 21 29 _interfaces->testbench(); 30 #endif 31 32 log_printf(FUNC,Shifter,FUNCTION,"End"); 22 33 }; 34 23 35 24 36 }; // end namespace shifter -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_genMealy_shift.cpp
r44 r75 11 11 #include <bitset> 12 12 13 using namespace std;14 13 namespace morpheo { 15 14 namespace behavioural { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_statistics_declaration.cpp
r59 r75 14 14 namespace shifter { 15 15 16 #undef FUNCTION 17 #define FUNCTION "Shifter::statistics_declaration" 18 void Shifter::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics) 19 { 20 log_printf(FUNC,Shifter,FUNCTION,"Begin"); 16 21 17 string Shifter::statistics (uint32_t depth) 18 { 19 return _stat->print(depth); 22 _stat = new Stat (static_cast<std::string>(_name), 23 "Shifter", 24 param_statistics); 25 26 log_printf(FUNC,Shifter,FUNCTION,"End"); 20 27 }; 21 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_transition.cpp
r42 r75 18 18 void Shifter::transition (void) 19 19 { 20 #ifdef STATISTICS 21 _stat->add(); 22 #endif 23 24 #ifdef VHDL_TESTBENCH 25 vhdl_testbench_transition (); 20 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 21 end_cycle (); 26 22 #endif 27 23 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_vhdl_body.cpp
r42 r75 50 50 for (uint32_t i=0; i<_param._nb_port; i++) 51 51 { 52 st ring print_shifter_completion;52 std::string print_shifter_completion; 53 53 54 54 if (_param._type_completion_bool == true) … … 83 83 { 84 84 vhdl->set_body ("out_SHIFTER_"+toString(i)+"_DATA <="); 85 st ring print_else = " ";85 std::string print_else = " "; 86 86 87 87 //-----[ Shift arithmetic Left ]--------------------------------------- … … 89 89 { 90 90 bool have_when = false; 91 st ring print_when = "";92 st ring print_and = "";91 std::string print_when = ""; 92 std::string print_and = ""; 93 93 94 94 if (_param._direction == external_direction) … … 120 120 { 121 121 bool have_when = false; 122 st ring print_when = "";123 st ring print_and = "";122 std::string print_when = ""; 123 std::string print_and = ""; 124 124 125 125 if (_param._direction == external_direction) … … 151 151 { 152 152 bool have_when = false; 153 st ring print_when = "";154 st ring print_and = "";153 std::string print_when = ""; 154 std::string print_and = ""; 155 155 156 156 if (_param._direction == external_direction) … … 175 175 print_when = "when " + print_when; 176 176 177 st ring print_expr_completion;177 std::string print_expr_completion; 178 178 179 179 if (_param._size_data_completion == 0) … … 189 189 { 190 190 bool have_when = false; 191 st ring print_when = "";192 st ring print_and = "";191 std::string print_when = ""; 192 std::string print_and = ""; 193 193 194 194 if (_param._direction == external_direction) … … 213 213 print_when = "when " + print_when; 214 214 215 st ring print_expr_completion;215 std::string print_expr_completion; 216 216 217 217 if (_param._size_data_completion == 0) … … 227 227 { 228 228 bool have_when = false; 229 st ring print_when = "";230 st ring print_and = "";229 std::string print_when = ""; 230 std::string print_and = ""; 231 231 232 232 if (_param._direction == external_direction) … … 253 253 { 254 254 bool have_when = false; 255 st ring print_when = "";256 st ring print_and = "";255 std::string print_when = ""; 256 std::string print_and = ""; 257 257 258 258 if (_param._direction == external_direction) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/Makefile.deps
r53 r75 13 13 include $(DIR_MORPHEO)/Behavioural/Makefile.deps 14 14 endif 15 ifndef Group16 include $(DIR_MORPHEO)/Behavioural/Generic/Group/Makefile.deps17 endif18 15 19 16 #-----[ Library ]------------------------------------------ 20 17 Victim_Pseudo_LRU_LIBRARY = -lVictim_Pseudo_LRU \ 21 $(Group_LIBRARY) \22 18 $(Behavioural_LIBRARY) 23 19 24 20 Victim_Pseudo_LRU_DIR_LIBRARY = -L$(DIR_MORPHEO)/Behavioural/Generic/Victim/Victim_Pseudo_LRU/lib \ 25 $(Group_DIR_LIBRARY) \26 21 $(Behavioural_DIR_LIBRARY) 27 22 … … 31 26 @\ 32 27 $(MAKE) Behavioural_library; \ 33 $(MAKE) Group_library; \34 28 $(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Generic/Victim/Victim_Pseudo_LRU --makefile=Makefile; 35 29 36 30 Victim_Pseudo_LRU_library_clean : 37 31 @\ 38 32 $(MAKE) Behavioural_library_clean; \ 39 $(MAKE) Group_library_clean; \40 33 $(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Generic/Victim/Victim_Pseudo_LRU --makefile=Makefile clean; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src/test.cpp
r44 r75 36 36 exit (EXIT_FAILURE); 37 37 } 38 39 #ifdef STATISTICS 40 morpheo::behavioural::Parameters_Statistics * param_stat = new morpheo::behavioural::Parameters_Statistics(5,50); 41 #endif 42 38 43 Victim_Pseudo_LRU * _Victim_Pseudo_LRU = new Victim_Pseudo_LRU (name.c_str(), 39 44 #ifdef STATISTICS 40 morpheo::behavioural::Parameters_Statistics(5,50),41 #endif 42 45 param_stat, 46 #endif 47 param); 43 48 44 49 #ifdef SYSTEMC … … 207 212 208 213 delete _Victim_Pseudo_LRU; 214 215 #ifdef STATISTICS 216 delete param_stat; 217 #endif 218 209 219 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Parameters.h
r15 r75 35 35 public : ~Parameters () ; 36 36 37 public : string msg_error (void); 38 39 public : string print (uint32_t depth); 40 public : friend ostream& operator<< (ostream& output_stream, 41 morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters & x); 37 public : std::string msg_error (void); 38 public : std::string print (uint32_t depth); 39 public : friend std::ostream& operator<< (std::ostream& output_stream, 40 morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters & x); 42 41 }; 43 42 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Types.h
r44 r75 9 9 */ 10 10 11 #include " Common/include/Types.h"11 #include "Behavioural/include/Types.h" 12 12 13 13 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h
r44 r75 35 35 #include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Types.h" 36 36 #ifdef STATISTICS 37 #include "Behavioural/ Generic/Victim/Victim_Pseudo_LRU/include/Statistics.h"37 #include "Behavioural/include/Stat.h" 38 38 #endif 39 39 #ifdef VHDL 40 40 #include "Behavioural/include/Vhdl.h" 41 41 #endif 42 #ifdef POSITION43 42 #include "Behavioural/include/Component.h" 44 #else45 #include "Behavioural/include/Interfaces.h"46 #endif47 48 using namespace std;49 43 50 44 namespace morpheo { … … 157 151 } 158 152 159 public : st ring print ()160 { 161 st ring res = "";153 public : std::string print () 154 { 155 std::string res = ""; 162 156 163 157 for (int32_t i=static_cast<int32_t>(_size)-1; i>=0; i--) … … 170 164 // -----[ fields ]---------------------------------------------------- 171 165 // Parameters 172 protected : const st ring _name;166 protected : const std::string _name; 173 167 174 168 protected : const Parameters _param; 175 169 #ifdef STATISTICS 176 private : Statistics * _stat; 177 #endif 178 179 #ifdef POSITION 180 private : Component * _component; 181 #endif 170 public : Stat * _stat; 171 #endif 172 173 public : Component * _component; 182 174 private : Interfaces * _interfaces; 183 175 … … 215 207 public : Victim_Pseudo_LRU ( 216 208 #ifdef SYSTEMC 217 sc_module_name name,209 sc_module_name name, 218 210 #else 219 st ringname,211 std::string name, 220 212 #endif 221 213 #ifdef STATISTICS 222 morpheo::behavioural::Parameters_Statistics param_statistics,223 #endif 224 Parameters param );214 morpheo::behavioural::Parameters_Statistics * param_statistics, 215 #endif 216 Parameters param ); 225 217 226 218 public : Victim_Pseudo_LRU (Parameters param ); … … 233 225 public : void transition (void); 234 226 public : void genMealy_access (void); 235 #endif236 #ifdef STATISTICS237 public : string statistics (uint32_t depth);238 227 #endif 239 228 … … 244 233 #endif 245 234 246 #ifdef VHDL_TESTBENCH 247 private : void vhdl_testbench_transition (void); 248 #endif 249 235 #ifdef STATISTICS 236 public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); 237 #endif 238 239 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 240 private : void end_cycle (void); 241 #endif 250 242 }; 251 243 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Parameters_msg_error.cpp
r15 r75 9 9 #include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Types.h" 10 10 #include <sstream> 11 using namespace std;12 11 13 12 namespace morpheo { … … 17 16 namespace victim_pseudo_lru { 18 17 19 st ring Parameters::msg_error(void)18 std::string Parameters::msg_error(void) 20 19 { 21 st ring msg = "";20 std::string msg = ""; 22 21 23 22 if (_nb_entity < 2) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Parameters_print.cpp
r15 r75 2 2 * $Id$ 3 3 * 4 * [ 4 * [ Description ] 5 5 * 6 6 */ 7 7 8 8 #include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Parameters.h" 9 #include "Behavioural/include/XML.h" 9 10 #include <sstream> 10 using namespace std;11 11 12 12 namespace morpheo { … … 16 16 namespace victim_pseudo_lru { 17 17 18 st ring Parameters::print (uint32_t depth)18 std::string Parameters::print (uint32_t depth) 19 19 { 20 string tab = string(depth,'\t');21 ostringstream msg; 22 msg << tab << "<victim_pseudo_lru>" << endl23 << tab << "\t<nb_entity value=\"" << _nb_entity << "\" />" << endl 24 << tab << "\t<nb_access value=\"" << _nb_access << "\" />" << endl 25 << tab << "\t<nb_update value=\"" << _nb_update << "\" />" << endl 26 << tab << "\t<size_table value=\"" << _size_table << "\" />" << endl 27 << tab << "</victim_pseudo_lru>" << endl;28 29 return msg.str();20 XML xml ("victim_pseudo_lru"); 21 22 xml.balise_open("victim_pseudo_lru"); 23 xml.singleton_begin("nb_entity "); xml.attribut("value",toString(_nb_entity )); xml.singleton_end(); 24 xml.singleton_begin("nb_access "); xml.attribut("value",toString(_nb_access )); xml.singleton_end(); 25 xml.singleton_begin("nb_update "); xml.attribut("value",toString(_nb_update )); xml.singleton_end(); 26 xml.singleton_begin("size_table"); xml.attribut("value",toString(_size_table)); xml.singleton_end(); 27 xml.balise_close(); 28 29 return xml.get_body(depth); 30 30 }; 31 31 32 ostream& operator<< (ostream& output_stream ,33 32 std::ostream& operator<< (std::ostream& output_stream , 33 morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters & x) 34 34 { 35 35 output_stream << x.print(0); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU.cpp
r66 r75 17 17 Victim_Pseudo_LRU::Victim_Pseudo_LRU (sc_module_name name, 18 18 #else 19 Victim_Pseudo_LRU::Victim_Pseudo_LRU (st ring name,19 Victim_Pseudo_LRU::Victim_Pseudo_LRU (std::string name, 20 20 #endif 21 21 #ifdef STATISTICS 22 morpheo::behavioural::Parameters_Statistics 22 morpheo::behavioural::Parameters_Statistics * param_statistics, 23 23 #endif 24 24 morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters param ): … … 37 37 38 38 // Allocation of statistics 39 _stat = new Statistics (static_cast<string>(_name), 40 param_statistics , 41 param); 39 statistics_declaration(param_statistics); 42 40 #endif 43 41 … … 93 91 94 92 #ifdef STATISTICS 95 _stat->generate_file(statistics(0));96 97 93 delete _stat; 98 94 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_allocation.cpp
r42 r75 17 17 void Victim_Pseudo_LRU::allocation (void) 18 18 { 19 #ifdef POSITION20 19 _component = new Component (); 21 20 22 Entity * entity = _component->set_entity (_name , 23 "Select_Priority_Fixed", 24 COMBINATORY ); 21 Entity * entity = _component->set_entity (_name 22 ,"Select_Priority_Fixed" 23 #ifdef POSITION 24 ,COMBINATORY 25 #endif 26 ); 25 27 26 28 _interfaces = entity->set_interfaces(); 27 #else28 _interfaces = new Interfaces();29 #endif30 29 31 30 // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 32 31 { 33 Interface_fifo * interface = _interfaces->set_interface("", IN ,WEST, "Generalist interface"); 32 Interface_fifo * interface = _interfaces->set_interface("" 33 #ifdef POSITION 34 , IN ,WEST, "Generalist interface" 35 #endif 36 ); 34 37 35 38 in_CLOCK = interface->set_signal_clk ("clock" ,1); … … 47 50 for (uint32_t i=0; i<_param._nb_access; i++) 48 51 { 49 Interface_fifo * interface = _interfaces->set_interface("access_"+toString(i), IN ,WEST, "Access"); 52 Interface_fifo * interface = _interfaces->set_interface("access_"+toString(i) 53 #ifdef POSITION 54 , IN ,WEST, "Access" 55 #endif 56 ); 50 57 51 58 in_ACCESS_VAL [i] = interface->set_signal_valack_in ("val" , VAL); … … 69 76 for (uint32_t i=0; i<_param._nb_update; i++) 70 77 { 71 Interface_fifo * interface = _interfaces->set_interface("update_"+toString(i), IN ,EAST, "Update"); 78 Interface_fifo * interface = _interfaces->set_interface("update_"+toString(i) 79 #ifdef POSITION 80 , IN ,EAST, "Update" 81 #endif 82 ); 72 83 73 84 in_UPDATE_VAL [i] = interface->set_signal_valack_in ("val" , VAL); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_end_cycle.cpp
r59 r75 1 #if def VHDL_TESTBENCH1 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 2 2 /* 3 3 * $Id$ … … 15 15 namespace victim_pseudo_lru { 16 16 17 #undef FUNCTION 18 #define FUNCTION "Victim_Pseudo_LRU::end_cycle" 19 void Victim_Pseudo_LRU::end_cycle () 20 { 21 log_printf(FUNC,Victim_Pseudo_LRU,FUNCTION,"Begin"); 17 22 18 void Victim_Pseudo_LRU::vhdl_testbench_transition (void) 19 { 23 #ifdef STATISTICS 24 _stat->end_cycle(); 25 #endif 26 27 #ifdef VHDL_TESTBENCH 20 28 // Evaluation before read the ouput signal 21 // sc_start(0); 29 // sc_start(0); 30 _interfaces->testbench(); 31 #endif 22 32 23 _interfaces->testbench();33 log_printf(FUNC,Victim_Pseudo_LRU,FUNCTION,"End"); 24 34 }; 25 35 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_statistics_declaration.cpp
r59 r75 15 15 namespace victim_pseudo_lru { 16 16 17 18 string Victim_Pseudo_LRU::statistics (uint32_t depth) 17 #undef FUNCTION 18 #define FUNCTION "Victim_Pseudo_LRU::statistics_declaration" 19 void Victim_Pseudo_LRU::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics) 19 20 { 20 return _stat->print(depth); 21 log_printf(FUNC,Victim_Pseudo_LRU,FUNCTION,"Begin"); 22 23 _stat = new Stat (static_cast<std::string>(_name), 24 "Victim_Pseudo_LRU", 25 param_statistics); 26 27 log_printf(FUNC,Victim_Pseudo_LRU,FUNCTION,"End"); 21 28 }; 22 29 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_transition.cpp
r42 r75 61 61 }//end for i 62 62 63 #ifdef STATISTICS 64 _stat->add(_stat_nb_access, 65 _stat_nb_update); 66 #endif 67 68 #ifdef VHDL_TESTBENCH 69 vhdl_testbench_transition (); 63 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 64 end_cycle (); 70 65 #endif 71 66 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_vhdl_body.cpp
r42 r75 40 40 // Read the table 41 41 42 st ring access_address;42 std::string access_address; 43 43 44 44 if (_param._size_table>1) … … 58 58 for (int32_t k=(1<<j)-1; k<static_cast<int32_t>(_param._nb_entity-1); k+=(1<<(j+1))) 59 59 { 60 st ring cond = "";60 std::string cond = ""; 61 61 62 62 // Create the condition … … 70 70 } 71 71 72 st ring print_else = (k==(1<<j)-1)?" ":"else ";72 std::string print_else = (k==(1<<j)-1)?" ":"else "; 73 73 74 74 vhdl->set_body ("\t"+print_else+"access_entry_"+toString(i)+"("+toString(k)+") "+cond); … … 93 93 { 94 94 bool have_cond = false; 95 st ring cond = "";95 std::string cond = ""; 96 96 97 97 // condition to change the bit … … 126 126 { 127 127 bool have_cond = false; 128 st ring cond = "";128 std::string cond = ""; 129 129 130 130 // condition to change the bit … … 144 144 if (have_cond == true) 145 145 { 146 st ring update_address;146 std::string update_address; 147 147 148 148 if (_param._size_table>1) … … 170 170 for (uint32_t i=0; i<_param._nb_access; i++) 171 171 { 172 st ring access_address;172 std::string access_address; 173 173 174 174 if (_param._size_table>1) … … 185 185 for (uint32_t i=0; i<_param._nb_update; i++) 186 186 { 187 st ring update_address;187 std::string update_address; 188 188 189 189 if (_param._size_table>1) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/include/New_Component.h
r74 r75 97 97 //public : void genMoore (void); 98 98 #endif 99 #ifdef STATISTICS 100 public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); 101 #endif 102 99 103 100 #if VHDL 104 101 public : void vhdl (void); … … 106 103 private : void vhdl_body (Vhdl * & vhdl); 107 104 #endif 108 105 106 #ifdef STATISTICS 107 public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); 108 #endif 109 109 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 110 110 private : void end_cycle (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/New_Component_allocation.cpp
r74 r75 24 24 ) 25 25 { 26 string rename;27 28 26 log_printf(FUNC,@COMPONENT,FUNCTION,"Begin"); 29 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/New_Component_statistics_declaration.cpp
r71 r75 19 19 log_printf(FUNC,@COMPONENT,FUNCTION,"Begin"); 20 20 21 _stat = new Stat (static_cast<st ring>(_name),21 _stat = new Stat (static_cast<std::string>(_name), 22 22 "@COMPONENT", 23 23 param_statistics); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h
r71 r75 44 44 private : const Tusage_t _usage; 45 45 private : Entity * _entity ; 46 private : list<Tcomponent_t*> * _list_component;46 private : std::list<Tcomponent_t*> * _list_component; 47 47 48 48 // -----[ methods ]--------------------------------------------------- … … 102 102 public : void generate_file (void); 103 103 #endif 104 public : friend ostream& operator<< (ostream& output_stream,105 104 public : friend std::ostream& operator<< (std::ostream& output_stream, 105 morpheo::behavioural::Component & x); 106 106 }; 107 107 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Configuration_Parameters.h
r71 r75 45 45 // methods to print and test parameters_configuration 46 46 public : std::string print (uint32_t depth); 47 public : friend ostream& operator<< (ostream& output_stream,48 morpheo::behavioural::Configuration_Parameters & x);47 public : friend std::ostream& operator<< (std::ostream& output_stream, 48 morpheo::behavioural::Configuration_Parameters & x); 49 49 }; 50 50 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h
r71 r75 84 84 public : XML toXML_mapping (void); 85 85 #endif 86 public : friend ostream& operator<< (ostream& output_stream,87 86 public : friend std::ostream& operator<< (std::ostream& output_stream, 87 morpheo::behavioural::Entity & x); 88 88 }; 89 89 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h
r71 r75 45 45 #endif 46 46 47 protected : list<Signal *> * _list_signal ;47 protected : std::list<Signal *> * _list_signal ; 48 48 49 49 #ifdef POSITION … … 88 88 uint32_t size , 89 89 presence_port_t presence_port = PORT_VHDL_YES_TESTBENCH_YES); 90 public : list<Signal *> * get_signal_list (void);90 public : std::list<Signal *> * get_signal_list (void); 91 91 92 92 #ifdef SYSTEMC … … 207 207 # ifdef VHDL_TESTBENCH 208 208 public : void set_signal (Vhdl * & vhdl); 209 public : void get_signal ( list<std::string> * & list_signal);209 public : void get_signal (std::list<std::string> * & list_signal); 210 210 # endif 211 211 #endif … … 237 237 public : XML toXML_mapping (void); 238 238 #endif 239 public : friend ostream& operator<< (ostream& output_stream,240 239 public : friend std::ostream& operator<< (std::ostream& output_stream, 240 morpheo::behavioural::Interface & x); 241 241 242 242 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface_fifo.h
r57 r75 31 31 class Interface_fifo : public Interface 32 32 { 33 private : list<Signal *> * _list_signal_val;34 private : list<Signal *> * _list_signal_ack;33 private : std::list<Signal *> * _list_signal_val; 34 private : std::list<Signal *> * _list_signal_ack; 35 35 36 36 #ifdef VHDL_TESTBENCH 37 37 private : bool _test_exhaustive; 38 private : list<uint32_t> * _list_cycle ;38 private : std::list<uint32_t> * _list_cycle ; 39 39 #endif 40 40 41 41 // -----[ methods ]--------------------------------------------------- 42 public : Interface_fifo (st ring name42 public : Interface_fifo (std::string name 43 43 #ifdef POSITION 44 44 ,direction_t direction … … 51 51 public : ~Interface_fifo (); 52 52 53 public : Signal * set_signal_valack (st ring name ,53 public : Signal * set_signal_valack (std::string name , 54 54 direction_t direction, 55 55 val_ack_t val_ack , … … 66 66 } 67 67 68 public : sc_in <bool> * set_signal_valack_in (st ring name ,68 public : sc_in <bool> * set_signal_valack_in (std::string name , 69 69 val_ack_t val_ack , 70 70 presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES) … … 86 86 } 87 87 88 public : sc_out<bool> * set_signal_valack_out(st ring name ,88 public : sc_out<bool> * set_signal_valack_out(std::string name , 89 89 val_ack_t val_ack , 90 90 presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES) … … 107 107 public : bool testbench_transaction(void); 108 108 public : void testbench_cycle (void); 109 public : st ringtestbench_test (Vhdl * & vhdl ,110 st ring counter_name,111 st ring reset_name );109 public : std::string testbench_test (Vhdl * & vhdl , 110 std::string counter_name, 111 std::string reset_name ); 112 112 113 public : st ringtestbench_test_transaction (Vhdl * & vhdl);113 public : std::string testbench_test_transaction (Vhdl * & vhdl); 114 114 #endif 115 115 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h
r71 r75 29 29 private : const std::string _name; 30 30 private : const Tusage_t _usage; 31 private : list<Interface_fifo*> * _list_interface;31 private : std::list<Interface_fifo*> * _list_interface; 32 32 33 33 // -----[ methods ]--------------------------------------------------- … … 50 50 #endif 51 51 private : std::string get_interface (void); 52 public : list<Interface_fifo*>* get_interface_list (void);52 public :std::list<Interface_fifo*>* get_interface_list (void); 53 53 54 54 #ifdef VHDL 55 55 public : void set_port (Vhdl * & vhdl ); 56 56 # ifdef VHDL_TESTBENCH 57 private : void get_signal ( list<std::string> * & list_signal );57 private : void get_signal (std::list<std::string> * & list_signal ); 58 58 private : void set_signal (Vhdl * & vhdl ); 59 59 # endif … … 82 82 public : bool test_map (bool top_level); 83 83 84 public : friend ostream& operator<< (ostream& output_stream,85 84 public : friend std::ostream& operator<< (std::ostream& output_stream, 85 morpheo::behavioural::Interfaces & x); 86 86 87 87 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h
r71 r75 66 66 67 67 #ifdef VHDL_TESTBENCH 68 private : list<std::string>* _list_value ;68 private : std::list<std::string> * _list_value ; 69 69 #endif 70 70 … … 182 182 183 183 public : void set_signal (Vhdl * & vhdl); 184 public : void get_name_vhdl ( list<std::string> * & list_signal);184 public : void get_name_vhdl (std::list<std::string> * & list_signal); 185 185 186 186 public : void testbench (void); … … 193 193 public : XML toXML (void); 194 194 195 public : friend ostream& operator<< (ostream& output_stream,196 morpheo::behavioural::Signal & x);195 public : friend std::ostream& operator<< (std::ostream& output_stream, 196 morpheo::behavioural::Signal & x); 197 197 198 198 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Stat.h
r74 r75 94 94 private : void generate_file (void); 95 95 96 private : bool have_counter (void); 97 96 98 public : void add_stat (Stat * stat); 97 99 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component.cpp
r57 r75 15 15 { 16 16 log_printf(FUNC,Behavioural,"Component::Component","Begin"); 17 _list_component = new list<Tcomponent_t *>;17 _list_component = new std::list<Tcomponent_t *>; 18 18 log_printf(FUNC,Behavioural,"Component::Component","End"); 19 19 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_find_entity.cpp
r57 r75 11 11 namespace behavioural { 12 12 13 Entity * Component::find_entity (st ring name)13 Entity * Component::find_entity (std::string name) 14 14 { 15 15 log_printf(FUNC,Behavioural,"Component::find_entity", "Begin"); … … 22 22 if (_list_component->empty()== false) 23 23 { 24 list<Tcomponent_t *>::iterator i = _list_component->begin();24 std::list<Tcomponent_t *>::iterator i = _list_component->begin(); 25 25 26 26 while (i != _list_component->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_get_component.cpp
r57 r75 14 14 #define FUNCTION "Component::get_component" 15 15 16 st ring Component::get_component (void)16 std::string Component::get_component (void) 17 17 { 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 19 20 20 uint32_t depth = 0; 21 st ring separator = "\n";21 std::string separator = "\n"; 22 22 bool last_separator = false; 23 23 24 list<Tcomponent_t *>::iterator i = _list_component->begin();24 std::list<Tcomponent_t *>::iterator i = _list_component->begin(); 25 25 bool empty = _list_component->empty(); 26 26 27 st ring tab =string(depth,'\t');28 ostringstream text;27 std::string tab = std::string(depth,'\t'); 28 std::ostringstream text; 29 29 30 30 if (not empty) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_get_entity.cpp
r43 r75 13 13 #undef FUNCTION 14 14 #define FUNCTION "Component::get_entity" 15 st ring Component::get_entity (void)15 std::string Component::get_entity (void) 16 16 { 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 18 19 ostringstream text;19 std::ostringstream text; 20 20 text << *(_entity); 21 21 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_interface_map.cpp
r44 r75 14 14 #undef FUNCTION 15 15 #define FUNCTION "Component::interface_map" 16 void Component::interface_map (st ring component_src ,17 st ring port_src ,18 st ring component_dest,19 st ring port_dest )16 void Component::interface_map (std::string component_src , 17 std::string port_src , 18 std::string component_dest, 19 std::string port_dest ) 20 20 { 21 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 24 24 Entity * entity_dest = find_entity(component_dest); 25 25 26 st ring name_entity = _entity->get_name();26 std::string name_entity = _entity->get_name(); 27 27 28 28 if (entity_dest == NULL) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp
r65 r75 13 13 #undef FUNCTION 14 14 #define FUNCTION "Component::port_map" 15 void Component::port_map (st ring component_src ,16 st ring port_src ,17 st ring component_dest,18 st ring port_dest )15 void Component::port_map (std::string component_src , 16 std::string port_src , 17 std::string component_dest, 18 std::string port_dest ) 19 19 { 20 20 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 21 21 22 st ring name_entity = _entity->get_name();22 std::string name_entity = _entity->get_name(); 23 23 24 24 // First entity … … 111 111 112 112 113 void Component::port_map (st ring component_src ,114 st ring port_src )113 void Component::port_map (std::string component_src , 114 std::string port_src ) 115 115 { 116 116 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_print.cpp
r43 r75 14 14 #undef FUNCTION 15 15 #define FUNCTION "Component::operator<<" 16 ostream& operator<< (ostream& output_stream,17 16 std::ostream& operator<< (std::ostream& output_stream, 17 morpheo::behavioural::Component & x) 18 18 { 19 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 20 21 output_stream << x.get_entity () << endl;22 output_stream << x.get_component () << endl;21 output_stream << x.get_entity () << std::endl; 22 output_stream << x.get_component () << std::endl; 23 23 24 24 log_printf(FUNC,Behavioural,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_entity.cpp
r57 r75 13 13 #undef FUNCTION 14 14 #define FUNCTION "Component::set_entity" 15 Entity * Component::set_entity (st ring name16 ,st ring type15 Entity * Component::set_entity (std::string name 16 ,std::string type 17 17 #ifdef POSITION 18 18 ,schema_t schema -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_signal_internal.cpp
r62 r75 19 19 20 20 // create name of internal's signal 21 st ring str_entity = entity_productor->get_name();22 st ring str_signal = signal_productor->get_name();21 std::string str_entity = entity_productor->get_name(); 22 std::string str_signal = signal_productor->get_name(); 23 23 24 24 UpperCase (str_entity); 25 25 UpperCase (str_signal); 26 26 27 st ring name_internal = "internal_"+str_entity+"_"+str_signal;27 std::string name_internal = "internal_"+str_entity+"_"+str_signal; 28 28 29 29 // test if internal's signal exist ... else, create … … 40 40 throw (ErrorMorpheo ("<Component::port_map> Component \""+_entity->get_name()+"\", doesn't have an interface \"\".")); 41 41 42 st ring signame = entity_productor->get_name()+"_"+signal_productor->get_name();42 std::string signame = entity_productor->get_name()+"_"+signal_productor->get_name(); 43 43 44 44 // Signal's creation -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_test_map.cpp
r62 r75 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 18 19 st ring name = _entity->get_name();19 std::string name = _entity->get_name(); 20 20 bool test_ok = true; 21 21 if (_list_component->empty () == true) … … 31 31 log_printf(INFO,Behavioural,FUNCTION, "Test all internal component"); 32 32 33 for ( list<Tcomponent_t *>::iterator i= _list_component->begin();33 for (std::list<Tcomponent_t *>::iterator i= _list_component->begin(); 34 34 i != _list_component->end(); 35 35 ++i) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_toXML.cpp
r57 r75 27 27 if (_list_component->empty()== false) 28 28 { 29 list<Tcomponent_t *>::iterator i = _list_component->begin();29 std::list<Tcomponent_t *>::iterator i = _list_component->begin(); 30 30 31 31 while (i != _list_component->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_vhdl_instance.cpp
r65 r75 19 19 20 20 uint32_t cpt = 0; 21 map<Signal *,string> tab;21 std::map<Signal *,std::string> tab; 22 22 23 23 // buffer all output … … 25 25 { 26 26 // for each interface 27 list<Interface_fifo *> * list_interface = (_entity)->get_interfaces_list()->get_interface_list();28 list<Interface_fifo *>::iterator j = list_interface->begin();27 std::list<Interface_fifo *> * list_interface = (_entity)->get_interfaces_list()->get_interface_list(); 28 std::list<Interface_fifo *>::iterator j = list_interface->begin(); 29 29 if (not list_interface->empty()) 30 30 { … … 36 36 { 37 37 // for each signal 38 list<Signal *> * list_signal = (*j)->get_signal_list();39 list<Signal *>::iterator k = list_signal->begin();38 std::list<Signal *> * list_signal = (*j)->get_signal_list(); 39 std::list<Signal *>::iterator k = list_signal->begin(); 40 40 if (not list_signal->empty()) 41 41 { … … 49 49 { 50 50 // Create name 51 st ring signal_name = "signal_"+toString(cpt++);51 std::string signal_name = "signal_"+toString(cpt++); 52 52 53 53 tab [signal ] = signal_name; … … 76 76 77 77 // for each entity 78 list<Tcomponent_t *> * list_component = _list_component;79 list<Tcomponent_t *>::iterator i = list_component->begin();78 std::list<Tcomponent_t *> * list_component = _list_component; 79 std::list<Tcomponent_t *>::iterator i = list_component->begin(); 80 80 if (not list_component->empty()) 81 81 { … … 90 90 if (instance & INSTANCE_COMPONENT) 91 91 { 92 list<string> list_port_map;92 std::list<std::string> list_port_map; 93 93 94 94 // for each interface 95 list<Interface_fifo *> * list_interface = entity->get_interfaces_list()->get_interface_list();96 list<Interface_fifo *>::iterator j = list_interface->begin();95 std::list<Interface_fifo *> * list_interface = entity->get_interfaces_list()->get_interface_list(); 96 std::list<Interface_fifo *>::iterator j = list_interface->begin(); 97 97 if (not list_interface->empty()) 98 98 { … … 100 100 { 101 101 // for each signal 102 list<Signal *> * list_signal = (*j)->get_signal_list();103 list<Signal *>::iterator k = list_signal->begin();102 std::list<Signal *> * list_signal = (*j)->get_signal_list(); 103 std::list<Signal *>::iterator k = list_signal->begin(); 104 104 if (not list_signal->empty()) 105 105 { … … 112 112 { 113 113 Signal * signal_dest = signal_src->get_connect_to_signal(); 114 st ring name_src = signal_src->get_name();115 st ring name_dest;114 std::string name_src = signal_src->get_name(); 115 std::string name_dest; 116 116 117 117 // // Test if destination signal is a interface port ? … … 119 119 // { 120 120 // find if signal is already link 121 map<Signal *,string>::iterator it = tab.find(signal_dest);121 std::map<Signal *,std::string>::iterator it = tab.find(signal_dest); 122 122 if (tab.find(signal_dest) == tab.end()) 123 123 { … … 144 144 // { 145 145 // // Take buffer's signal 146 // map<Signal *,st ring>::iterator it = tab.find(signal_dest);146 // map<Signal *,std::string>::iterator it = tab.find(signal_dest); 147 147 // name_dest = (*it).second; 148 148 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Configuration_Parameters.cpp
r43 r75 14 14 #undef FUNCTION 15 15 #define FUNCTION "Configuration_Parameters::Configuration_Parameters" 16 Configuration_Parameters::Configuration_Parameters (st ring name ,16 Configuration_Parameters::Configuration_Parameters (std::string name , 17 17 uint32_t value , 18 18 uint32_t min , 19 19 uint32_t max , 20 st ring step ,20 std::string step , 21 21 uint32_t value_default, 22 22 uint32_t level , 23 st ring comment):23 std::string comment): 24 24 _name (name ), 25 25 _value (value ), -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Configuration_Parameters_print.cpp
r43 r75 15 15 #undef FUNCTION 16 16 #define FUNCTION "Configuration_Parameters::print" 17 st ring Configuration_Parameters::print (uint32_t depth)17 std::string Configuration_Parameters::print (uint32_t depth) 18 18 { 19 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 38 38 #undef FUNCTION 39 39 #define FUNCTION "Configuration_Parameters::operator<<" 40 ostream& operator<< (ostream& output_stream,41 40 std::ostream& operator<< (std::ostream& output_stream, 41 morpheo::behavioural::Configuration_Parameters & x) 42 42 { 43 43 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity.cpp
r57 r75 11 11 namespace behavioural { 12 12 13 Entity::Entity ( st ring name14 ,st ring type13 Entity::Entity ( std::string name 14 ,std::string type 15 15 #ifdef POSITION 16 16 ,schema_t schema -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_find_interface.cpp
r43 r75 13 13 #undef FUNCTION 14 14 #define FUNCTION "Entity::find_interface" 15 Interface * Entity::find_interface (st ring name)15 Interface * Entity::find_interface (std::string name) 16 16 { 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_find_signal.cpp
r43 r75 13 13 #undef FUNCTION 14 14 #define FUNCTION "Entity::find_signal" 15 Signal * Entity::find_signal (st ring name)15 Signal * Entity::find_signal (std::string name) 16 16 { 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_comment.cpp
r43 r75 15 15 #undef FUNCTION 16 16 #define FUNCTION "Entity::get_comment" 17 st ring Entity::get_comment (void)17 std::string Entity::get_comment (void) 18 18 { 19 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 st ring _return = _comment;20 std::string _return = _comment; 21 21 log_printf(FUNC,Behavioural,FUNCTION,"End"); 22 22 return _return; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_interfaces.cpp
r43 r75 14 14 #undef FUNCTION 15 15 #define FUNCTION "Entity::get_interfaces" 16 st ring Entity::get_interfaces (void)16 std::string Entity::get_interfaces (void) 17 17 { 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 ostringstream text;19 std::ostringstream text; 20 20 text << *(_interfaces); 21 21 log_printf(FUNC,Behavioural,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_name.cpp
r43 r75 14 14 #undef FUNCTION 15 15 #define FUNCTION "Entity::get_name" 16 st ring Entity::get_name (void)16 std::string Entity::get_name (void) 17 17 { 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 st ring _return = _name;19 std::string _return = _name; 20 20 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 21 return _return; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_type.cpp
r43 r75 14 14 #undef FUNCTION 15 15 #define FUNCTION "Entity::get_type" 16 st ring Entity::get_type (void)16 std::string Entity::get_type (void) 17 17 { 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 st ring _return = _type;19 std::string _return = _type; 20 20 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 21 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_print.cpp
r43 r75 14 14 #undef FUNCTION 15 15 #define FUNCTION "Entity::operator<<" 16 ostream& operator<< (ostream& output_stream,17 16 std::ostream& operator<< (std::ostream& output_stream, 17 morpheo::behavioural::Entity & x) 18 18 { 19 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 20 20 21 21 #ifdef POSITION 22 output_stream << x._name + "\t"+x._type+"\t"+toString(x._schema) << endl;23 output_stream << x.get_comment() << endl;22 output_stream << x._name + "\t"+x._type+"\t"+toString(x._schema) << std::endl; 23 output_stream << x.get_comment() << std::endl; 24 24 #else 25 output_stream << x._name + "\t"+x._type<< endl;25 output_stream << x._name + "\t"+x._type<< std::endl; 26 26 #endif 27 output_stream << x.get_interfaces() << endl;27 output_stream << x.get_interfaces() << std::endl; 28 28 29 29 log_printf(FUNC,Behavioural,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_set_comment.cpp
r43 r75 15 15 #undef FUNCTION 16 16 #define FUNCTION "Entity::set_comment" 17 void Entity::set_comment (st ring comment)17 void Entity::set_comment (std::string comment) 18 18 { 19 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp
r57 r75 11 11 namespace behavioural { 12 12 13 Interface::Interface (st ring name13 Interface::Interface (std::string name 14 14 #ifdef POSITION 15 15 ,direction_t direction … … 27 27 log_printf(FUNC,Behavioural,"Interface","Begin"); 28 28 29 _list_signal = new ( list<Signal*>);29 _list_signal = new (std::list<Signal*>); 30 30 31 31 #ifdef POSITION … … 72 72 if (_list_signal->empty()== false) 73 73 { 74 list<Signal*>::iterator i = _list_signal->begin();74 std::list<Signal*>::iterator i = _list_signal->begin(); 75 75 76 76 while (i != _list_signal->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo.cpp
r57 r75 11 11 namespace behavioural { 12 12 13 Interface_fifo::Interface_fifo (st ring name13 Interface_fifo::Interface_fifo (std::string name 14 14 #ifdef POSITION 15 15 ,direction_t direction … … 28 28 log_printf(FUNC,Behavioural,"Interface_fifo","Begin"); 29 29 30 _list_signal_val = new ( list<Signal*>);31 _list_signal_ack = new ( list<Signal*>);30 _list_signal_val = new (std::list<Signal*>); 31 _list_signal_ack = new (std::list<Signal*>); 32 32 33 33 #ifdef VHDL_TESTBENCH 34 34 _test_exhaustive = true; 35 _list_cycle = new list<uint32_t>;35 _list_cycle = new std::list<uint32_t>; 36 36 #endif 37 37 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_set_signal.cpp
r41 r75 11 11 namespace behavioural { 12 12 13 Signal * Interface_fifo::set_signal_valack (st ring name ,13 Signal * Interface_fifo::set_signal_valack (std::string name , 14 14 direction_t direction, 15 15 val_ack_t val_ack , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_test.cpp
r62 r75 12 12 namespace behavioural { 13 13 14 st ring Interface_fifo::testbench_test (Vhdl * & vhdl,15 st ring counter_name,16 st ring reset_name )14 std::string Interface_fifo::testbench_test (Vhdl * & vhdl, 15 std::string counter_name, 16 std::string reset_name ) 17 17 { 18 18 log_printf(FUNC,Behavioural,"testbench_test","Begin"); 19 st ring test_name;19 std::string test_name; 20 20 21 21 if (_test_exhaustive == true) … … 28 28 29 29 test_name = testbench_test_name (vhdl); 30 st ring test_name_tmp = test_name+"_tmp";31 st ring test_name_ok = testbench_test_ok (vhdl);32 st ring test_transaction = testbench_test_transaction (vhdl);30 std::string test_name_tmp = test_name+"_tmp"; 31 std::string test_name_ok = testbench_test_ok (vhdl); 32 std::string test_transaction = testbench_test_transaction (vhdl); 33 33 34 34 vhdl->set_signal(test_name_tmp,1); … … 39 39 vhdl->set_body ("\t"+test_name_tmp+" <="); 40 40 41 list<uint32_t>::iterator i = _list_cycle->begin();41 std::list<uint32_t>::iterator i = _list_cycle->begin(); 42 42 43 43 while (i != _list_cycle->end()) … … 62 62 63 63 uint32_t j = 0; 64 list<uint32_t>::iterator i = _list_cycle->begin();64 std::list<uint32_t>::iterator i = _list_cycle->begin(); 65 65 66 66 while (i != _list_cycle->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_test_transaction.cpp
r42 r75 12 12 namespace behavioural { 13 13 14 st ring Interface_fifo::testbench_test_transaction (Vhdl * & vhdl)14 std::string Interface_fifo::testbench_test_transaction (Vhdl * & vhdl) 15 15 { 16 16 log_printf(FUNC,Behavioural,"testbench_test_transaction","Begin"); 17 17 18 st ring name = testbench_test_transaction_name(vhdl);18 std::string name = testbench_test_transaction_name(vhdl); 19 19 20 20 vhdl->set_body(name+" <= '1'"); … … 23 23 if (_list_signal_val->empty()== false) 24 24 { 25 list<Signal*>::iterator i = _list_signal_val->begin();25 std::list<Signal*>::iterator i = _list_signal_val->begin(); 26 26 27 27 while (i != _list_signal_val->end()) … … 35 35 if (_list_signal_ack->empty()== false) 36 36 { 37 list<Signal*>::iterator i = _list_signal_ack->begin();37 std::list<Signal*>::iterator i = _list_signal_ack->begin(); 38 38 39 39 while (i != _list_signal_ack->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_transaction.cpp
r42 r75 21 21 if (_list_signal_val->empty()== false) 22 22 { 23 list<Signal*>::iterator i = _list_signal_val->begin();23 std::list<Signal*>::iterator i = _list_signal_val->begin(); 24 24 25 25 while ((i != _list_signal_val->end()) and (res == true)) … … 33 33 if (_list_signal_ack->empty()== false) 34 34 { 35 list<Signal*>::iterator i = _list_signal_ack->begin();35 std::list<Signal*>::iterator i = _list_signal_ack->begin(); 36 36 37 37 while ((i != _list_signal_ack->end()) and (res == true)) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_find_signal.cpp
r42 r75 12 12 namespace behavioural { 13 13 14 Signal * Interface::find_signal (st ring name)14 Signal * Interface::find_signal (std::string name) 15 15 { 16 16 log_printf(FUNC,Behavioural,"find_signal","Begin"); 17 17 18 list<Signal*>::iterator i = _list_signal->begin();18 std::list<Signal*>::iterator i = _list_signal->begin(); 19 19 Signal * sig = NULL; 20 20 if (_list_signal->empty() == false) … … 41 41 42 42 bool find = false; 43 list<Signal*>::iterator i = _list_signal->begin();43 std::list<Signal*>::iterator i = _list_signal->begin(); 44 44 if (_list_signal->empty() == false) 45 45 { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_clock.cpp
r43 r75 23 23 if (not _list_signal->empty()) 24 24 { 25 list<Signal*>::iterator i = _list_signal->begin();25 std::list<Signal*>::iterator i = _list_signal->begin(); 26 26 27 27 while (i != _list_signal->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_comment.cpp
r42 r75 13 13 namespace behavioural { 14 14 15 st ring Interface::get_comment (void)15 std::string Interface::get_comment (void) 16 16 { 17 17 log_printf(FUNC,Behavioural,"get_comment","Begin"); 18 st ring res = _comment;18 std::string res = _comment; 19 19 log_printf(FUNC,Behavioural,"get_comment","End"); 20 20 return res; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_name.cpp
r42 r75 12 12 namespace behavioural { 13 13 14 st ring Interface::get_name (void)14 std::string Interface::get_name (void) 15 15 { 16 16 log_printf(FUNC,Behavioural,"get_name","Begin"); 17 st ring res = _name;17 std::string res = _name; 18 18 log_printf(FUNC,Behavioural,"get_name","End"); 19 19 return res; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_reset.cpp
r43 r75 23 23 if (not _list_signal->empty()) 24 24 { 25 list<Signal*>::iterator i = _list_signal->begin();25 std::list<Signal*>::iterator i = _list_signal->begin(); 26 26 27 27 while (i != _list_signal->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_signal.cpp
r43 r75 12 12 namespace behavioural { 13 13 14 st ring Interface::get_signal (void)14 std::string Interface::get_signal (void) 15 15 { 16 16 log_printf(FUNC,Behavioural,"get_signal","Begin"); 17 17 18 18 uint32_t depth = 0; 19 st ring separator = ",\n";19 std::string separator = ",\n"; 20 20 bool last_separator = false; 21 21 22 22 23 list<Signal*>::iterator i = _list_signal->begin();24 bool empty = _list_signal->empty();23 std::list<Signal*>::iterator i = _list_signal->begin(); 24 bool empty = _list_signal->empty(); 25 25 26 st ring tab =string(depth,'\t');27 ostringstream text;26 std::string tab = std::string(depth,'\t'); 27 std::ostringstream text; 28 28 29 29 if (not empty) … … 56 56 #undef FUNCTION 57 57 #define FUNCTION "Interface::get_signal" 58 void Interface::get_signal ( list<string> * & list_signal)58 void Interface::get_signal (std::list<std::string> * & list_signal) 59 59 { 60 60 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 62 62 if (not _list_signal->empty()) 63 63 { 64 list<Signal*>::iterator i = _list_signal->begin();64 std::list<Signal*>::iterator i = _list_signal->begin(); 65 65 66 66 while (i != _list_signal->end()) … … 78 78 #undef FUNCTION 79 79 #define FUNCTION "Interface::get_signal_list" 80 list<Signal *> * Interface::get_signal_list (void)80 std::list<Signal *> * Interface::get_signal_list (void) 81 81 { 82 82 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 83 list<Signal *> * _return = _list_signal;83 std::list<Signal *> * _return = _list_signal; 84 84 log_printf(FUNC,Behavioural,FUNCTION,"End"); 85 85 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_print.cpp
r42 r75 12 12 namespace behavioural { 13 13 14 ostream& operator<< (ostream& output_stream,15 14 std::ostream& operator<< (std::ostream& output_stream, 15 morpheo::behavioural::Interface & x) 16 16 { 17 17 log_printf(FUNC,Behavioural,"operator<<","Begin"); 18 18 #ifdef POSITION 19 output_stream << x._name + "\t"+toString(x._localisation)+"\t"+toString(x._direction) << endl;20 output_stream << x.get_comment() << endl;19 output_stream << x._name + "\t"+toString(x._localisation)+"\t"+toString(x._direction) << std::endl; 20 output_stream << x.get_comment() << std::endl; 21 21 #else 22 output_stream << x._name << endl;22 output_stream << x._name << std::endl; 23 23 #endif 24 output_stream << x.get_signal () << endl;24 output_stream << x.get_signal () << std::endl; 25 25 26 26 // #ifdef VHDL_TESTBENCH -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_comment.cpp
r42 r75 13 13 namespace behavioural { 14 14 15 void Interface::set_comment (st ring comment)15 void Interface::set_comment (std::string comment) 16 16 { 17 17 log_printf(FUNC,Behavioural,"set_comment","Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_port.cpp
r41 r75 18 18 if (not _list_signal->empty()) 19 19 { 20 list<Signal*>::iterator i = _list_signal->begin();20 std::list<Signal*>::iterator i = _list_signal->begin(); 21 21 22 22 while (i != _list_signal->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp
r43 r75 11 11 namespace behavioural { 12 12 13 Signal * Interface::set_signal (st ring name ,13 Signal * Interface::set_signal (std::string name , 14 14 direction_t direction, 15 15 uint32_t size , … … 18 18 log_printf(FUNC,Behavioural,"set_signal","Begin"); 19 19 20 st ring signame = signal_name(_name, name, direction);20 std::string signame = signal_name(_name, name, direction); 21 21 22 22 Signal * sig = new Signal (signame, direction, size, presence_port); … … 39 39 if (not _list_signal->empty()) 40 40 { 41 list<Signal*>::iterator i = _list_signal->begin();41 std::list<Signal*>::iterator i = _list_signal->begin(); 42 42 43 43 while (i != _list_signal->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_signal_name.cpp
r62 r75 11 11 namespace behavioural { 12 12 13 st ring Interface::signal_name (string name_interface,14 string name_signal ,15 direction_t direction )13 std::string Interface::signal_name (std::string name_interface, 14 std::string name_signal , 15 direction_t direction ) 16 16 { 17 17 log_printf(FUNC,Behavioural,"signal_name","Begin"); 18 18 19 st ring str_direction = toString(direction);20 st ring str_interface = name_interface;21 st ring str_signal = name_signal;19 std::string str_direction = toString(direction); 20 std::string str_interface = name_interface; 21 std::string str_signal = name_signal; 22 22 23 23 LowerCase(str_direction); … … 25 25 UpperCase(str_signal ); 26 26 27 st ring signame = str_direction;27 std::string signame = str_direction; 28 28 if (str_interface != "") 29 29 signame += "_"+str_interface; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_test_map.cpp
r62 r75 22 22 log_printf(INFO,Behavioural,FUNCTION, " * Interface \"%s\"",_name.c_str()); 23 23 24 for ( list<Signal*>::iterator i = _list_signal->begin();24 for (std::list<Signal*>::iterator i = _list_signal->begin(); 25 25 i != _list_signal->end(); 26 26 ++i) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench.cpp
r41 r75 19 19 if (_list_signal->empty()== false) 20 20 { 21 list<Signal*>::iterator i = _list_signal->begin();21 std::list<Signal*>::iterator i = _list_signal->begin(); 22 22 23 23 while (i != _list_signal->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_body.cpp
r42 r75 14 14 15 15 void Interface::testbench_body (Vhdl * & vhdl, 16 st ring counter_name,17 st ring reset_name )16 std::string counter_name, 17 std::string reset_name ) 18 18 { 19 19 log_printf(FUNC,Behavioural,"testbench_body","Begin"); … … 21 21 if (_list_signal->empty()== false) 22 22 { 23 list<Signal*>::iterator i = _list_signal->begin();23 std::list<Signal*>::iterator i = _list_signal->begin(); 24 24 25 25 vhdl->set_body("------------------------------------------------------"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_test.cpp
r42 r75 13 13 namespace behavioural { 14 14 15 st ring Interface::testbench_test (Vhdl * & vhdl,16 st ring counter_name,17 st ring reset_name )15 std::string Interface::testbench_test (Vhdl * & vhdl, 16 std::string counter_name, 17 std::string reset_name ) 18 18 { 19 19 log_printf(FUNC,Behavioural,"testbench_test","Begin"); … … 23 23 vhdl->set_body(""); 24 24 25 st ring test_name = testbench_test_name(vhdl);26 st ring test_name_ok = testbench_test_ok (vhdl);25 std::string test_name = testbench_test_name(vhdl); 26 std::string test_name_ok = testbench_test_ok (vhdl); 27 27 28 28 vhdl->set_body(test_name + " <= '1' when ("+reset_name+" = '0') else "+test_name_ok+";"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_test_name.cpp
r42 r75 13 13 namespace behavioural { 14 14 15 st ring Interface::testbench_test_name (Vhdl * & vhdl)15 std::string Interface::testbench_test_name (Vhdl * & vhdl) 16 16 { 17 17 log_printf(FUNC,Behavioural,"testbench_test_name","Begin"); 18 18 19 st ring name;19 std::string name; 20 20 21 21 name = "interface_"; … … 31 31 }; 32 32 33 st ring Interface::testbench_test_ok_name (Vhdl * & vhdl)33 std::string Interface::testbench_test_ok_name (Vhdl * & vhdl) 34 34 { 35 35 log_printf(FUNC,Behavioural,"testbench_test_ok_name","Begin"); 36 36 37 st ring name;37 std::string name; 38 38 39 39 name = "interface_"; … … 49 49 }; 50 50 51 st ring Interface::testbench_test_transaction_name (Vhdl * & vhdl)51 std::string Interface::testbench_test_transaction_name (Vhdl * & vhdl) 52 52 { 53 53 log_printf(FUNC,Behavioural,"testbench_test_transaction_name","Begin"); 54 54 55 st ring name;55 std::string name; 56 56 57 57 name = "interface_"; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_test_ok.cpp
r42 r75 13 13 namespace behavioural { 14 14 15 st ring Interface::testbench_test_ok (Vhdl * & vhdl)15 std::string Interface::testbench_test_ok (Vhdl * & vhdl) 16 16 { 17 17 log_printf(FUNC,Behavioural,"testbench_test_ok","Begin"); 18 18 19 st ring test_name = testbench_test_ok_name(vhdl);19 std::string test_name = testbench_test_ok_name(vhdl); 20 20 21 21 vhdl->set_body(test_name + " <= '1' when true"); … … 24 24 if (_list_signal->empty()== false) 25 25 { 26 list<Signal*>::iterator i = _list_signal->begin();26 std::list<Signal*>::iterator i = _list_signal->begin(); 27 27 28 28 while (i != _list_signal->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_toXML.cpp
r42 r75 28 28 if (_list_signal->empty()== false) 29 29 { 30 list<Signal*>::iterator i = _list_signal->begin();30 std::list<Signal*>::iterator i = _list_signal->begin(); 31 31 32 32 while (i != _list_signal->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces.cpp
r58 r75 11 11 namespace behavioural { 12 12 13 Interfaces::Interfaces (st ring name,13 Interfaces::Interfaces (std::string name, 14 14 Tusage_t usage): 15 15 _name (name), … … 17 17 { 18 18 log_printf(FUNC,Behavioural,"Interfaces","Begin"); 19 _list_interface = new list<Interface_fifo*>;19 _list_interface = new std::list<Interface_fifo*>; 20 20 log_printf(FUNC,Behavioural,"Interfaces","End"); 21 21 }; … … 41 41 if (_list_interface->empty()== false) 42 42 { 43 list<Interface_fifo*>::iterator i = _list_interface->begin();43 std::list<Interface_fifo*>::iterator i = _list_interface->begin(); 44 44 45 45 while (i != _list_interface->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_interface.cpp
r43 r75 13 13 #undef FUNCTION 14 14 #define FUNCTION "Interfaces::find_interface" 15 Interface_fifo * Interfaces::find_interface (st ring name)15 Interface_fifo * Interfaces::find_interface (std::string name) 16 16 { 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 20 20 if (_list_interface->empty()== false) 21 21 { 22 list<Interface_fifo*>::iterator i = _list_interface->begin();22 std::list<Interface_fifo*>::iterator i = _list_interface->begin(); 23 23 24 24 while (i != _list_interface->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_signal.cpp
r43 r75 13 13 #undef FUNCTION 14 14 #define FUNCTION "Interfaces::find_signal" 15 Signal * Interfaces::find_signal (st ring name)15 Signal * Interfaces::find_signal (std::string name) 16 16 { 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 20 20 if (_list_interface->empty()== false) 21 21 { 22 list<Interface_fifo*>::iterator i = _list_interface->begin();22 std::list<Interface_fifo*>::iterator i = _list_interface->begin(); 23 23 24 24 while (i != _list_interface->end()) … … 51 51 if (_list_interface->empty()== false) 52 52 { 53 list<Interface_fifo*>::iterator i = _list_interface->begin();53 std::list<Interface_fifo*>::iterator i = _list_interface->begin(); 54 54 55 55 while (i != _list_interface->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_clock.cpp
r43 r75 23 23 if (not _list_interface->empty()) 24 24 { 25 list<Interface_fifo*>::iterator i = _list_interface->begin();25 std::list<Interface_fifo*>::iterator i = _list_interface->begin(); 26 26 27 27 while (i != _list_interface->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_cycle.cpp
r43 r75 22 22 if (not _list_interface->empty()) 23 23 { 24 list<Interface_fifo*>::iterator i = _list_interface->begin();24 std::list<Interface_fifo*>::iterator i = _list_interface->begin(); 25 25 26 26 while (i != _list_interface->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_interface.cpp
r43 r75 14 14 #undef FUNCTION 15 15 #define FUNCTION "Interfaces::get_interface" 16 st ring Interfaces::get_interface (void)16 std::string Interfaces::get_interface (void) 17 17 { 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 19 20 20 uint32_t depth = 0; 21 st ring separator = "\n";21 std::string separator = "\n"; 22 22 bool last_separator = false; 23 23 24 list<Interface_fifo*>::iterator i = _list_interface->begin();24 std::list<Interface_fifo*>::iterator i = _list_interface->begin(); 25 25 bool empty = _list_interface->empty(); 26 26 27 st ring tab =string(depth,'\t');28 ostringstream text;27 std::string tab = std::string(depth,'\t'); 28 std::ostringstream text; 29 29 30 30 if (not empty) … … 55 55 #undef FUNCTION 56 56 #define FUNCTION "Interfaces::get_interface_list" 57 list<Interface_fifo*>* Interfaces::get_interface_list (void)57 std::list<Interface_fifo*>* Interfaces::get_interface_list (void) 58 58 { 59 59 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 60 list<Interface_fifo*>* _return = _list_interface;60 std::list<Interface_fifo*>* _return = _list_interface; 61 61 log_printf(FUNC,Behavioural,FUNCTION,"End"); 62 62 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_reset.cpp
r43 r75 23 23 if (not _list_interface->empty()) 24 24 { 25 list<Interface_fifo*>::iterator i = _list_interface->begin();25 std::list<Interface_fifo*>::iterator i = _list_interface->begin(); 26 26 27 27 while (i != _list_interface->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_signal.cpp
r43 r75 17 17 #undef FUNCTION 18 18 #define FUNCTION "Interfaces::get_signal" 19 void Interfaces::get_signal ( list<string> * & list_signal)19 void Interfaces::get_signal (std::list<std::string> * & list_signal) 20 20 { 21 21 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 23 23 if (not _list_interface->empty()) 24 24 { 25 list<Interface_fifo*>::iterator i = _list_interface->begin();25 std::list<Interface_fifo*>::iterator i = _list_interface->begin(); 26 26 27 27 while (i != _list_interface->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_print.cpp
r43 r75 15 15 #undef FUNCTION 16 16 #define FUNCTION "Interfaces::operator<<" 17 ostream& operator<< (ostream& output_stream ,18 17 std::ostream& operator<< (std::ostream& output_stream , 18 morpheo::behavioural::Interfaces & x) 19 19 { 20 20 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 21 output_stream << x.get_interface () << endl;21 output_stream << x.get_interface () << std::endl; 22 22 log_printf(FUNC,Behavioural,FUNCTION,"End"); 23 23 return output_stream; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_interface.cpp
r57 r75 13 13 #undef FUNCTION 14 14 #define FUNCTION "Interfaces::set_interface" 15 Interface_fifo * Interfaces::set_interface (st ring name15 Interface_fifo * Interfaces::set_interface (std::string name 16 16 #ifdef POSITION 17 17 ,direction_t direction … … 38 38 #undef FUNCTION 39 39 #define FUNCTION "Interfaces::set_interface" 40 Interface_fifo * Interfaces::set_interface (st ring name ,40 Interface_fifo * Interfaces::set_interface (std::string name , 41 41 direction_t direction , 42 42 localisation_t localisation, 43 st ring comment )43 std::string comment ) 44 44 { 45 45 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_port.cpp
r43 r75 20 20 if (not _list_interface->empty()) 21 21 { 22 list<Interface_fifo*>::iterator i = _list_interface->begin();22 std::list<Interface_fifo*>::iterator i = _list_interface->begin(); 23 23 24 24 while (i != _list_interface->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_signal.cpp
r43 r75 21 21 if (not _list_interface->empty()) 22 22 { 23 list<Interface_fifo*>::iterator i = _list_interface->begin();23 std::list<Interface_fifo*>::iterator i = _list_interface->begin(); 24 24 25 25 while (i != _list_interface->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_test_map.cpp
r62 r75 22 22 log_printf(INFO,Behavioural,FUNCTION, " * Interfaces \"%s\"",_name.c_str()); 23 23 24 for ( list<Interface_fifo*>::iterator i = _list_interface->begin();24 for (std::list<Interface_fifo*>::iterator i = _list_interface->begin(); 25 25 i != _list_interface->end(); 26 26 ++i) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench.cpp
r41 r75 19 19 if (_list_interface->empty()== false) 20 20 { 21 list<Interface_fifo*>::iterator i = _list_interface->begin();21 std::list<Interface_fifo*>::iterator i = _list_interface->begin(); 22 22 23 23 while (i != _list_interface->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench_body.cpp
r42 r75 13 13 namespace behavioural { 14 14 15 st ring Interfaces::testbench_body (Vhdl * & vhdl,16 st ring counter_name,17 st ring reset_name )15 std::string Interfaces::testbench_body (Vhdl * & vhdl, 16 std::string counter_name, 17 std::string reset_name ) 18 18 { 19 19 log_printf(FUNC,Behavioural,"testbench_body","Begin"); 20 20 21 st ring test = "'1'";22 st ring test_name = "test";21 std::string test = "'1'"; 22 std::string test_name = "test"; 23 23 vhdl->set_signal(test_name,1); 24 24 25 25 if (_list_interface->empty()== false) 26 26 { 27 list<Interface_fifo*>::iterator i = _list_interface->begin();27 std::list<Interface_fifo*>::iterator i = _list_interface->begin(); 28 28 29 29 while (i != _list_interface->end()) 30 30 { 31 31 (*i)->testbench_body(vhdl, counter_name, reset_name); 32 st ring str = (*i)->testbench_test(vhdl, counter_name, reset_name);32 std::string str = (*i)->testbench_test(vhdl, counter_name, reset_name); 33 33 34 34 test += " and "+str; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench_generate_file.cpp
r66 r75 18 18 19 19 Vhdl * vhdl = new Vhdl(_name+"_Testbench"); 20 st ring counter = "counter";20 std::string counter = "counter"; 21 21 Signal * clock = this->get_clock(); 22 22 Signal * reset = this->get_reset(); 23 st ring clock_name = clock->get_name();24 st ring reset_name = reset->get_name();23 std::string clock_name = clock->get_name(); 24 std::string reset_name = reset->get_name(); 25 25 uint32_t cycle = this->get_cycle(); 26 26 … … 36 36 vhdl->set_body(""); 37 37 38 list<string> * list_signal = new list<string>;38 std::list<std::string> * list_signal = new std::list<std::string>; 39 39 this->get_signal (list_signal); 40 40 … … 43 43 vhdl->set_body("port map ("); 44 44 45 list<string>::iterator i = list_signal->begin();45 std::list<std::string>::iterator i = list_signal->begin(); 46 46 if (i != list_signal->end()) 47 47 { … … 58 58 delete list_signal; 59 59 60 st ring test_name = this->testbench_body(vhdl,counter, reset_name);60 std::string test_name = this->testbench_body(vhdl,counter, reset_name); 61 61 62 62 vhdl->set_body(""); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_toXML.cpp
r43 r75 22 22 if (_list_interface->empty()== false) 23 23 { 24 list<Interface_fifo*>::iterator i = _list_interface->begin();24 std::list<Interface_fifo*>::iterator i = _list_interface->begin(); 25 25 26 26 while (i != _list_interface->end()) … … 45 45 if (_list_interface->empty()== false) 46 46 { 47 list<Interface_fifo*>::iterator i = _list_interface->begin();47 std::list<Interface_fifo*>::iterator i = _list_interface->begin(); 48 48 49 49 while (i != _list_interface->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp
r65 r75 11 11 namespace behavioural { 12 12 13 Signal::Signal (st ring name ,13 Signal::Signal (std::string name , 14 14 direction_t direction , 15 15 uint32_t size , … … 30 30 _type_info = UNKNOW; 31 31 #ifdef VHDL_TESTBENCH 32 _list_value = new list<string>;32 _list_value = new std::list<std::string>; 33 33 #endif 34 34 log_printf(FUNC,Behavioural,"Signal","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_connect.cpp
r66 r75 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 19 20 cout << "connected : " << get_name() << "\twith " << signal_dest->get_name() <<endl;20 //std::cout << "connected : " << get_name() << "\twith " << signal_dest->get_name() << std::endl; 21 21 22 22 if ((_direction == IN ) and (signal_dest->_direction == IN )) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_name.cpp
r43 r75 14 14 #undef FUNCTION 15 15 #define FUNCTION "Signal::get_name" 16 st ring Signal::get_name (void)16 std::string Signal::get_name (void) 17 17 { 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 st ring _return = _name;19 std::string _return = _name; 20 20 log_printf(FUNC,Behavioural,FUNCTION,"End"); 21 21 return _return; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_name_vhdl.cpp
r43 r75 15 15 #undef FUNCTION 16 16 #define FUNCTION "Signal::get_name_vhdl" 17 void Signal::get_name_vhdl ( list<string> *& list_signal)17 void Signal::get_name_vhdl (std::list<std::string> *& list_signal) 18 18 { 19 19 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_reset_cycle.cpp
r43 r75 21 21 uint32_t num = 0; 22 22 uint32_t cpt = 0; 23 st ring cmp = (active_low==true)?"0":"1";23 std::string cmp = (active_low==true)?"0":"1"; 24 24 25 25 if ((_presence_port == RESET_VHDL_YES) or … … 28 28 if (_list_value->empty()== false) 29 29 { 30 list<string>::iterator i = _list_value->begin();30 std::list<std::string>::iterator i = _list_value->begin(); 31 31 32 32 while (i != _list_value->end()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_print.cpp
r62 r75 11 11 namespace behavioural { 12 12 13 ostream& operator<< (ostream& output_stream,14 13 std::ostream& operator<< (std::ostream& output_stream, 14 morpheo::behavioural::Signal & x) 15 15 { 16 16 log_printf(FUNC,Behavioural,"operator<<","Begin"); … … 20 20 << toString(x._direction) << "\t" 21 21 << toString(x._presence_port) 22 << "sc_signal : " << hex << x._sc_signal << " - " << x._sc_signal_map <<dec;22 << "sc_signal : " << std::hex << x._sc_signal << " - " << x._sc_signal_map << std::dec; 23 23 24 24 log_printf(FUNC,Behavioural,"operator<<","End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_test_map.cpp
r62 r75 31 31 { 32 32 if (_return == false) 33 cerr << "Signal \"" << _name << "\" is not mapped with an outpout port or a component." <<endl;33 std::cerr << "Signal \"" << _name << "\" is not mapped with an outpout port or a component." << std::endl; 34 34 break; 35 35 } … … 37 37 { 38 38 if (_return == false) 39 cerr << "Signal \"" << _name << "\" is not mapped with an input port or a component." <<endl;39 std::cerr << "Signal \"" << _name << "\" is not mapped with an input port or a component." << std::endl; 40 40 break; 41 41 } … … 52 52 { 53 53 if (_is_map_as_src == false) 54 cerr << "Signal \"" << _name << "\" is not mapped as source" <<endl;54 std::cerr << "Signal \"" << _name << "\" is not mapped as source" << std::endl; 55 55 if (_is_map_as_dest == false) 56 cerr << "Signal \"" << _name << "\" is not mapped as destination" <<endl;56 std::cerr << "Signal \"" << _name << "\" is not mapped as destination" << std::endl; 57 57 } 58 58 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench.cpp
r42 r75 22 22 (_presence_port == RESET_VHDL_NO ) ) 23 23 { 24 st ring str;24 std::string str; 25 25 26 26 switch (_type_info) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench_body.cpp
r42 r75 13 13 14 14 void Signal::testbench_body (Vhdl * & vhdl, 15 st ring counter_name,16 st ring reset_name )15 std::string counter_name, 16 std::string reset_name ) 17 17 { 18 18 log_printf(FUNC,Behavioural,"testbench_body","Begin"); … … 24 24 if (_list_value->empty()== false) 25 25 { 26 st ring separator;26 std::string separator; 27 27 if (_size == 1) 28 28 separator = "\'"; … … 30 30 separator = "\""; 31 31 32 st ring signame = (_direction==OUT)?(_name+"_test"):_name;32 std::string signame = (_direction==OUT)?(_name+"_test"):_name; 33 33 34 34 vhdl->set_body (""); … … 37 37 38 38 uint32_t cpt = 0; 39 list<string>::iterator i = _list_value->begin();39 std::list<std::string>::iterator i = _list_value->begin(); 40 40 41 41 while (i != _list_value->end()) 42 42 { 43 list<string>::iterator j = i;43 std::list<std::string>::iterator j = i; 44 44 45 45 ++i; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_print.cpp
r74 r75 21 21 stat != _list_stat->end(); 22 22 stat ++) 23 xml.text((*stat)->print( depth+1));23 xml.text((*stat)->print(1)); 24 24 25 25 26 26 // Test special case 27 if (_cycle_sum < _nb_cycle_before_begin) 27 28 if (have_counter()) 28 29 { 29 xml.comment(_("Number of cycle is less than the number minimal")); 30 } 31 else 32 { 33 bool stop = false; 34 cycle_t nb_cycle_min; 35 cycle_t nb_cycle_max = _nb_cycle_before_begin-1; 36 for (cycle_t period=0; stop==false; period++) 30 if (_cycle_sum < _nb_cycle_before_begin) 37 31 { 38 std::map<std::string, var_t>::iterator operand=_list_operand->begin(); 32 xml.comment(_("Number of cycle is less than the number minimal")); 33 } 34 else 35 { 36 bool stop = false; 37 cycle_t nb_cycle_min; 38 cycle_t nb_cycle_max = _nb_cycle_before_begin-1; 39 for (cycle_t period=0; stop==false; period++) 40 { 41 std::map<std::string, var_t>::iterator operand=_list_operand->begin(); 42 43 if (operand->second.save_counter.size()==0) 44 throw(ERRORMORPHEO("Stat::generate_file",_("Queue 'save_counter' is empty."))); 45 46 bool last = operand->second.save_counter.size()==1; 47 48 nb_cycle_min = nb_cycle_max+1; 49 50 if (last) 51 nb_cycle_max = static_cast<cycle_t>(_cycle_sum); 52 else 53 nb_cycle_max += _period; 39 54 40 if (operand->second.save_counter.size()==0) 41 throw(ERRORMORPHEO("Stat::generate_file",_("Queue 'save_counter' is empty."))); 42 43 bool last = operand->second.save_counter.size()==1; 44 45 nb_cycle_min = nb_cycle_max+1; 46 47 if (last) 48 nb_cycle_max = static_cast<cycle_t>(_cycle_sum); 49 else 50 nb_cycle_max += _period; 51 52 xml.balise_open_begin("period"); 53 xml.attribut("number",toString(period)); 54 xml.attribut("nb_cycle_min",toString(nb_cycle_min)); 55 xml.attribut("nb_cycle_max",toString(nb_cycle_max)); 56 xml.balise_open_end(); 57 58 for (; 59 operand!= _list_operand->end(); 60 ++operand) 61 { 62 if (operand->second.type == TYPE_COUNTER) 55 xml.balise_open_begin("period"); 56 xml.attribut("number",toString(period)); 57 xml.attribut("nb_cycle_min",toString(nb_cycle_min)); 58 xml.attribut("nb_cycle_max",toString(nb_cycle_max)); 59 xml.balise_open_end(); 60 61 for (; 62 operand!= _list_operand->end(); 63 ++operand) 63 64 { 64 xml.singleton_begin(operand->second.name); 65 xml.attribut("value",toString(operand->second.save_counter.front())); 66 xml.attribut("unit",operand->second.unit); 67 xml.attribut("description",operand->second.description); 68 xml.singleton_end(); 65 if (operand->second.type == TYPE_COUNTER) 66 { 67 xml.singleton_begin(operand->second.name); 68 xml.attribut("value",toString(operand->second.save_counter.front())); 69 xml.attribut("unit",operand->second.unit); 70 xml.attribut("description",operand->second.description); 71 xml.singleton_end(); 72 } 73 operand->second.save_counter.pop_front(); 69 74 } 70 operand->second.save_counter.pop_front(); 75 76 xml.balise_close(); 77 78 stop = last; 71 79 } 72 73 xml.balise_close();74 75 stop = last;76 80 } 77 81 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_text.cpp
r71 r75 16 16 { 17 17 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 18 _body += indent()+text +"\n";18 _body += indent()+text; // +"\n"; 19 19 log_printf(FUNC,Behavioural,FUNCTION,"End"); 20 20 -
trunk/IPs/systemC/processor/Morpheo/Common/include/Test.h
r71 r75 9 9 #include "Common/include/ToString.h" 10 10 11 namespace morpheo { 12 11 13 //-----[ Routine de test ]--------------------------------------- 12 14 … … 15 17 inline void test_ko_error (void) 16 18 { 17 st ring msg = "Test ko : error in test \""+morpheo::toString(num_test)+"\"";19 std::string msg = "Test ko : error in test \""+morpheo::toString(num_test)+"\""; 18 20 throw (morpheo::ErrorMorpheo (msg)); 19 21 } … … 22 24 inline void test_ko (char * file, uint32_t line, T exp1, T exp2) 23 25 { 24 cerr << "[" << num_test << "] : Test KO"25 << "\tline " << line << endl26 << " * Localisation" << endl27 << " - File : " << file << endl28 << " - Line : " << line << endl29 << " * Expression is different" << endl30 << " - exp1 : "+morpheo::toString(exp1) << endl31 << " - exp2 : "+morpheo::toString(exp2) << endl;26 std::cerr << "[" << num_test << "] : Test KO" 27 << "\tline " << line << std::endl 28 << " * Localisation" << std::endl 29 << " - File : " << file << std::endl 30 << " - Line : " << line << std::endl 31 << " * Expression is different" << std::endl 32 << " - exp1 : "+morpheo::toString(exp1) << std::endl 33 << " - exp2 : "+morpheo::toString(exp2) << std::endl; 32 34 33 35 test_ko_error (); … … 36 38 inline void test_ko (char * file, uint32_t line) 37 39 { 38 cerr << "[" << num_test << "] : Test KO"39 << "\tline " << line << endl40 << " * Localisation" << endl41 << " - File : " << file << endl42 << " - Line : " << line << endl;40 std::cerr << "[" << num_test << "] : Test KO" 41 << "\tline " << line << std::endl 42 << " * Localisation" << std::endl 43 << " - File : " << file << std::endl 44 << " - Line : " << line << std::endl; 43 45 44 46 test_ko_error (); … … 79 81 }; 80 82 81 #define TEST(type,exp1,exp2) do { test<type> (__FILE__,__LINE__,exp1,exp2);} while(0)82 #define TEST_STR(type,exp1,exp2,str...) do {fprintf(stdout,str); fprintf(stdout,"\n"); test<type> (__FILE__,__LINE__,exp1,exp2);} while(0)83 #define TEST_OK(str...) do {fprintf(stdout,str); fprintf(stdout,"\n"); test_ok(__FILE__,__LINE__);} while(0)84 #define TEST_KO(str...) do {fprintf(stdout,str); fprintf(stdout,"\n"); test_ko(__FILE__,__LINE__);} while(0)83 #define TEST(type,exp1,exp2) do {morpheo::test<type> (__FILE__,__LINE__,exp1,exp2);} while(0) 84 #define TEST_STR(type,exp1,exp2,str...) do {fprintf(stdout,str); fprintf(stdout,"\n"); morpheo::test<type> (__FILE__,__LINE__,exp1,exp2);} while(0) 85 #define TEST_OK(str...) do {fprintf(stdout,str); fprintf(stdout,"\n"); morpheo::test_ok(__FILE__,__LINE__);} while(0) 86 #define TEST_KO(str...) do {fprintf(stdout,str); fprintf(stdout,"\n"); morpheo::test_ko(__FILE__,__LINE__);} while(0) 85 87 86 88 89 }; 87 90 #endif -
trunk/IPs/systemC/processor/Morpheo/Common/include/ToBase2.h
r43 r75 10 10 11 11 #include <sstream> 12 using namespace std;13 12 14 13 namespace morpheo { … … 16 15 template<typename T> inline std::string toBase2 (const T& value, const uint32_t & size) 17 16 { 18 ostringstream res;17 std::ostringstream res; 19 18 T mask = 1<<(size-1); 20 19 -
trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Link/article-07sympa-fr
r59 r75 1 link Documents/article-07sympa/fr1 link ../Documents/article-07sympa/fr -
trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Makefile
r68 r75 423 423 $(RM) $(DIR_SCHEMA_EPS) $(DIR_SCHEMA_PNG) $(DIR_TEX) $(DIR_PACKAGE)/*.aux; \ 424 424 $(RM) $(DVI_FILES) $(PS_FILES) $(PDF_FILES); \ 425 $(RM) a0header.ps; \ 425 426 $(MAKE) clean_rec DIR_CLEAN=. ; 426 427 … … 444 445 $(DIR_CLEAN)/*.nav \ 445 446 $(DIR_CLEAN)/*.snm \ 447 $(DIR_CLEAN)/*.maf \ 446 448 $(DIR_CLEAN)/missfont.log; \ 447 449 for files in `$(LS) $(DIR_CLEAN)`; do \
Note: See TracChangeset
for help on using the changeset viewer.