Changeset 75 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit
- Timestamp:
- Jan 31, 2008, 6:46:41 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit
- Files:
-
- 12 deleted
- 23 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
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)
Note: See TracChangeset
for help on using the changeset viewer.