Changeset 82 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit
- Timestamp:
- May 1, 2008, 6:48:45 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit
- Files:
-
- 2 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/include/test.h"10 #include "Common/include/Test.h"11 12 9 #define NB_ITERATION 1 13 10 //64 14 11 #define CYCLE_MAX (1024*NB_ITERATION) 15 12 16 #define LABEL(str) \ 17 { \ 18 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \ 19 } while(0) 20 21 static uint32_t cycle = 0; 22 23 #define SC_START(cycle_offset) \ 24 do \ 25 { \ 26 /*cout << "SC_START (begin)" << endl;*/ \ 27 \ 28 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \ 29 if (cycle_current != cycle) \ 30 { \ 31 cycle = cycle_current; \ 32 cout << "##########[ cycle "<< cycle << " ]" << endl; \ 33 } \ 34 \ 35 if (cycle_current > CYCLE_MAX) \ 36 { \ 37 TEST_KO("Maximal cycles Reached"); \ 38 } \ 39 sc_start(cycle_offset); \ 40 /*cout << "SC_START (end )" << endl;*/ \ 41 } while(0) 13 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/include/test.h" 14 #include "Common/include/Test.h" 42 15 43 16 void test (string name, … … 54 27 _parameters_statistics, 55 28 #endif 56 _param); 29 _param, 30 USE_ALL); 57 31 58 32 #ifdef SYSTEMC … … 362 336 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) 363 337 { 364 LABEL("Iteration "+toString(iteration));338 LABEL("Iteration %d",iteration); 365 339 int32_t percent_transaction_queue_in = (rand()%45)+30; 366 340 int32_t percent_transaction_queue_out = (rand()%45)+30; … … 518 492 SC_START(0); 519 493 520 LABEL("Test READ_QUEUE_IN : "+toString(READ_QUEUE_IN_VAL->read())+","+toString(READ_QUEUE_IN_ACK->read()));494 LABEL("Test READ_QUEUE_IN : %d,%d",READ_QUEUE_IN_VAL->read(),READ_QUEUE_IN_ACK->read()); 521 495 if ((READ_QUEUE_IN_VAL->read() == 1) and 522 496 (READ_QUEUE_IN_ACK->read() == 1)) 523 497 { 524 LABEL("Accepted READ_QUEUE_IN [ "+toString(request_in)+"]");498 LABEL("Accepted READ_QUEUE_IN [%d]",request_in); 525 499 request_in ++; 526 500 } 527 LABEL("Test READ_QUEUE_OUT : "+toString(READ_QUEUE_OUT_VAL->read())+","+toString(READ_QUEUE_OUT_ACK->read()));501 LABEL("Test READ_QUEUE_OUT : %d,%d",READ_QUEUE_OUT_VAL->read(),READ_QUEUE_OUT_ACK->read()); 528 502 if ((READ_QUEUE_OUT_VAL->read() == 1) and 529 503 (READ_QUEUE_OUT_ACK->read() == 1)) … … 535 509 rob_id = 0; 536 510 Tcontext_t ctxt = _ooo_engine_id [rob_id]; 537 LABEL("Accepted READ_QUEUE_OUT [ "+toString(rob_id)+"]");511 LABEL("Accepted READ_QUEUE_OUT [%d]",rob_id); 538 512 539 513 TEST(uint32_t , rob_id ,request_out); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Read_queue.h
r81 r82 17 17 #include "Common/include/ToString.h" 18 18 #include "Common/include/Debug.h" 19 #include "Behavioural/include/Types.h"20 19 21 20 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Parameters.h" 21 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Types.h" 22 22 #ifdef STATISTICS 23 23 #include "Behavioural/include/Stat.h" … … 27 27 #include "Behavioural/include/Vhdl.h" 28 28 #endif 29 #include "Behavioural/include/Usage.h" 29 30 30 31 namespace morpheo { … … 36 37 namespace read_unit { 37 38 namespace read_queue { 38 39 class Tread_queue_entry_t40 {41 public : Tcontext_t _context_id ;42 public : Tcontext_t _front_end_id ;43 public : Tcontext_t _ooo_engine_id;44 public : Tpacket_t _rob_id ;45 public : Toperation_t _operation ;46 public : Ttype_t _type ;47 public : Tlsq_ptr_t _store_queue_ptr_write;48 public : Tlsq_ptr_t _load_queue_ptr_write;49 public : Tcontrol_t _has_immediat ;50 public : Tgeneral_data_t _immediat ;51 public : Tcontrol_t _read_ra ;52 public : Tgeneral_address_t _num_reg_ra ;53 public : Tcontrol_t _read_rb ;54 public : Tgeneral_address_t _num_reg_rb ;55 public : Tcontrol_t _read_rc ;56 public : Tspecial_address_t _num_reg_rc ;57 public : Tcontrol_t _write_rd ;58 public : Tgeneral_address_t _num_reg_rd ;59 public : Tcontrol_t _write_re ;60 public : Tspecial_address_t _num_reg_re ;61 62 friend std::ostream& operator<< (std::ostream& output_stream,63 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Tread_queue_entry_t & x)64 {65 output_stream << " * _context_id : " << toString(x._context_id ) << std::endl66 << " * _front_end_id : " << toString(x._front_end_id ) << std::endl67 << " * _ooo_engine_id : " << toString(x._ooo_engine_id) << std::endl68 << " * _rob_id : " << toString(x._rob_id ) << std::endl69 << " * _operation : " << toString(x._operation ) << std::endl70 << " * _type : " << toString(x._type ) << std::endl71 << " * _store_queue_ptr_write : " << toString(x._store_queue_ptr_write) << std::endl72 << " * _load_queue_ptr_write : " << toString(x._load_queue_ptr_write ) << std::endl73 << " * _has_immediat : " << toString(x._has_immediat ) << std::endl74 << " * _immediat : " << toString(x._immediat ) << std::endl75 << " * _read_ra : " << toString(x._read_ra ) << std::endl76 << " * _num_reg_ra : " << toString(x._num_reg_ra ) << std::endl77 << " * _read_rb : " << toString(x._read_rb ) << std::endl78 << " * _num_reg_rb : " << toString(x._num_reg_rb ) << std::endl79 << " * _read_rc : " << toString(x._read_rc ) << std::endl80 << " * _num_reg_rc : " << toString(x._num_reg_rc ) << std::endl81 << " * _write_rd : " << toString(x._write_rd ) << std::endl82 << " * _num_reg_rd : " << toString(x._num_reg_rd ) << std::endl83 << " * _write_re : " << toString(x._write_re ) << std::endl84 << " * _num_reg_re : " << toString(x._num_reg_re ) << std::endl;85 86 return output_stream;87 }88 89 };90 91 class Tread_queue_head_entry_t92 {93 public : Tcontext_t _context_id ;94 public : Tcontext_t _front_end_id ;95 public : Tcontext_t _ooo_engine_id;96 public : Tpacket_t _rob_id ;97 public : Toperation_t _operation ;98 public : Ttype_t _type ;99 public : Tlsq_ptr_t _store_queue_ptr_write;100 public : Tlsq_ptr_t _load_queue_ptr_write;101 public : Tcontrol_t _has_immediat ;102 public : Tgeneral_data_t _immediat ;103 public : Tcontrol_t _read_ra ;104 public : Tcontrol_t _read_ra_val ; // 1 : must access at the registerFile (after access, is set at 0)105 public : Tgeneral_address_t _num_reg_ra ;106 public : Tcontrol_t _data_ra_val ; // 1 : the read of registerFile is valid107 public : Tgeneral_data_t _data_ra ;108 public : Tcontrol_t _read_rb ;109 public : Tcontrol_t _read_rb_val ;110 public : Tgeneral_address_t _num_reg_rb ;111 public : Tcontrol_t _data_rb_val ;112 public : Tgeneral_data_t _data_rb ;113 public : Tcontrol_t _read_rc ;114 public : Tcontrol_t _read_rc_val ;115 public : Tspecial_address_t _num_reg_rc ;116 public : Tcontrol_t _data_rc_val ;117 public : Tspecial_data_t _data_rc ;118 public : Tcontrol_t _write_rd ;119 public : Tgeneral_address_t _num_reg_rd ;120 public : Tcontrol_t _write_re ;121 public : Tspecial_address_t _num_reg_re ;122 123 #undef FUNCTION124 #define FUNCTION "Tread_queue_head_entry_t::operator="125 public : Tread_queue_head_entry_t& operator=(Tread_queue_entry_t x)126 {127 log_printf(FUNC,Read_queue,FUNCTION,"Begin");128 129 _context_id = x._context_id ;130 _front_end_id = x._front_end_id ;131 _ooo_engine_id= x._ooo_engine_id;132 _rob_id = x._rob_id ;133 _operation = x._operation ;134 _type = x._type ;135 _store_queue_ptr_write = x._store_queue_ptr_write;136 _load_queue_ptr_write = x._load_queue_ptr_write ;137 _has_immediat = x._has_immediat ;138 _immediat = x._immediat ;139 _read_ra = x._read_ra ;140 _read_ra_val = x._read_ra == 1 ; //if not must read, the registerFile is already access141 _num_reg_ra = x._num_reg_ra ;142 _data_ra_val = x._read_ra == 0 ; //if not must read, the data is already valid143 _data_ra = 0 ;144 _read_rb = x._read_rb ;145 _read_rb_val = x._read_rb == 1 ;146 _num_reg_rb = x._num_reg_rb ;147 _data_rb_val = x._read_rb == 0 ;148 _data_rb = 0 ;149 _read_rc = x._read_rc ;150 _read_rc_val = x._read_rc == 1 ;151 _num_reg_rc = x._num_reg_rc ;152 _data_rc_val = x._read_rc == 0 ;153 _data_rc = 0 ;154 _write_rd = x._write_rd ;155 _num_reg_rd = x._num_reg_rd ;156 _write_re = x._write_re ;157 _num_reg_re = x._num_reg_re ;158 159 log_printf(FUNC,Read_queue,FUNCTION,"End");160 161 return *this;162 }163 164 friend std::ostream& operator<< (std::ostream& output_stream,165 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Tread_queue_head_entry_t & x)166 {167 output_stream << " * _context_id : " << x._context_id << std::endl168 << " * _front_end_id : " << x._front_end_id << std::endl169 << " * _ooo_engine_id : " << x._ooo_engine_id<< std::endl170 << " * _rob_id : " << x._rob_id << std::endl171 << " * _operation : " << x._operation << std::endl172 << " * _type : " << x._type << std::endl173 << " * _store_queue_ptr_write : " << toString(x._store_queue_ptr_write) << std::endl174 << " * _load_queue_ptr_write : " << toString(x._load_queue_ptr_write ) << std::endl175 << " * _has_immediat : " << x._has_immediat << std::endl176 << " * _immediat : " << x._immediat << std::endl177 << " * _read_ra : " << x._read_ra << std::endl178 << " * _read_ra_val : " << x._read_ra_val << std::endl179 << " * _num_reg_ra : " << x._num_reg_ra << std::endl180 << " * _data_ra_val : " << x._data_ra_val << std::endl181 << " * _data_ra : " << x._data_ra << std::endl182 << " * _read_rb : " << x._read_rb << std::endl183 << " * _read_rb_val : " << x._read_rb_val << std::endl184 << " * _num_reg_rb : " << x._num_reg_rb << std::endl185 << " * _data_rb_val : " << x._data_rb_val << std::endl186 << " * _data_rb : " << x._data_rb << std::endl187 << " * _read_rc : " << x._read_rc << std::endl188 << " * _read_rc_val : " << x._read_rc_val << std::endl189 << " * _num_reg_rc : " << x._num_reg_rc << std::endl190 << " * _data_rc_val : " << x._data_rc_val << std::endl191 << " * _data_rc : " << x._data_rc << std::endl192 << " * _write_rd : " << x._write_rd << std::endl193 << " * _num_reg_rd : " << x._num_reg_rd << std::endl194 << " * _write_re : " << x._write_re << std::endl195 << " * _num_reg_re : " << x._num_reg_re << std::endl;196 197 return output_stream;198 }199 };200 39 201 40 class Read_queue … … 206 45 // -----[ fields ]---------------------------------------------------- 207 46 // Parameters 208 protected : const std::string _name; 209 protected : const Parameters * _param; 47 protected : const std::string _name; 48 protected : const Parameters * _param; 49 private : const Tusage_t _usage; 210 50 211 51 #ifdef STATISTICS … … 345 185 morpheo::behavioural::Parameters_Statistics * param_statistics, 346 186 #endif 347 Parameters * param ); 187 Parameters * param, 188 morpheo::behavioural::Tusage_t usage); 348 189 349 190 public : Read_queue (Parameters * param ); … … 381 222 }; // end namespace multi_execute_loop 382 223 }; // end namespace core 383 384 224 }; // end namespace behavioural 385 225 }; // end namespace morpheo -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue.cpp
r81 r82 18 18 19 19 20 #ifdef SYSTEMC 21 Read_queue::Read_queue (sc_module_name name, 20 Read_queue::Read_queue 21 ( 22 #ifdef SYSTEMC 23 sc_module_name name, 22 24 #else 23 Read_queue::Read_queue (string name,25 std::string name, 24 26 #endif 25 27 #ifdef STATISTICS 26 morpheo::behavioural::Parameters_Statistics * param_statistics, 27 #endif 28 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Parameters * param ): 29 _name (name) 30 ,_param (param) 28 morpheo::behavioural::Parameters_Statistics * param_statistics, 29 #endif 30 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Parameters * param, 31 morpheo::behavioural::Tusage_t usage ): 32 _name (name) 33 ,_param (param) 34 ,_usage (usage) 31 35 { 32 36 log_printf(FUNC,Read_queue,"Read_queue","Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_allocation.cpp
r81 r82 23 23 log_printf(FUNC,Read_queue,"allocation","Begin"); 24 24 25 _component = new Component ( );25 _component = new Component (_usage); 26 26 27 27 Entity * entity = _component->set_entity (_name -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/src/test.cpp
r81 r82 6 6 * Test 7 7 */ 8 #define NB_ITERATION 2 9 #define CYCLE_MAX (2048*NB_ITERATION) 8 10 9 11 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/include/test.h" 10 12 #include "Common/include/Test.h" 11 13 #include "Common/include/BitManipulation.h" 12 13 #define NB_ITERATION 214 #define CYCLE_MAX (2048*NB_ITERATION)15 16 #define LABEL(str) \17 { \18 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \19 } while(0)20 21 static uint32_t cycle = 0;22 23 #define SC_START(cycle_offset) \24 do \25 { \26 /*cout << "SC_START (begin)" << endl;*/ \27 \28 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \29 sc_start(cycle_offset); \30 if (cycle_current != cycle) \31 { \32 cycle = cycle_current; \33 cout << "##########[ cycle "<< cycle << " ]" << endl; \34 } \35 \36 if (cycle_current > CYCLE_MAX) \37 { \38 TEST_KO("Maximal cycles Reached"); \39 } \40 /*cout << "SC_START (end )" << endl;*/ \41 } while(0)42 14 43 15 void test (string name, … … 50 22 #endif 51 23 52 Reservation_station * _Reservation_station = new Reservation_station (name.c_str(), 24 Reservation_station * _Reservation_station = new Reservation_station 25 (name.c_str(), 53 26 #ifdef STATISTICS 54 27 _parameters_statistics, 55 28 #endif 56 _param); 29 _param, 30 USE_ALL); 57 31 58 32 #ifdef SYSTEMC … … 354 328 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) 355 329 { 356 LABEL("Iteration "+toString(iteration));330 LABEL("Iteration %d",iteration); 357 331 358 332 int32_t percent_transaction_queue_in = (rand()%50)+25; … … 507 481 if (val) 508 482 { 509 LABEL(" * GPR_WRITE [ "+toString(i)+"] - gpr["+toString(num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(data));483 LABEL(" * GPR_WRITE [%d] - gpr[%d][%d] <- 0x%x",i,num_reg,ooo_engine,data); 510 484 can_gpr_use [ooo_engine][num_reg] = false; 511 485 need_gpr [ooo_engine][num_reg] = false; … … 533 507 if (val == 1) 534 508 { 535 LABEL(" * SPR_WRITE ["+toString(i)+"] - spr["+toString(num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(data)); 509 LABEL(" * SPR_WRITE [%d] - spr[%d][%d] <- 0x%x",i,num_reg,ooo_engine,data); 510 536 511 can_spr_use [ooo_engine][num_reg] = false; 537 512 need_spr[ooo_engine][num_reg] = false; … … 560 535 if (gpr_val) 561 536 { 562 LABEL(" * BYPASS_WRITE [ "+toString(i)+"] - gpr["+toString(gpr_num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(gpr_data));537 LABEL(" * BYPASS_WRITE [%d] - gpr[%d][%d] <- 0x%x",i,gpr_num_reg,ooo_engine,gpr_data); 563 538 can_gpr_use [ooo_engine][gpr_num_reg] = false; 564 539 need_gpr[ooo_engine][gpr_num_reg] = false; … … 580 555 if (spr_val) 581 556 { 582 LABEL(" * BYPASS_WRITE ["+toString(i)+"] - spr["+toString(spr_num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(spr_data)); 557 LABEL(" * BYPASS_WRITE [%d] - spr[%d][%d] <- 0x%x",i,spr_num_reg,ooo_engine,spr_data); 558 583 559 can_spr_use [ooo_engine][spr_num_reg] = false; 584 560 need_spr[ooo_engine][spr_num_reg] = false; … … 608 584 if (val) 609 585 { 610 LABEL(" * BYPASS_MEMORY ["+toString(i)+"] - gpr["+toString(num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(data)); 586 LABEL(" * BYPASS_MEMORY [%d] - spr[%d][%d] <- 0x%x",i,num_reg,ooo_engine,data); 587 611 588 can_gpr_use [ooo_engine][num_reg] = false; 612 589 need_gpr [ooo_engine][num_reg] = false; … … 622 599 (out_INSERT_ACK->read() == 1)) 623 600 { 624 LABEL("Accepted INSERT number : "+toString(request_in));601 LABEL("Accepted INSERT number : %d",request_in); 625 602 request_in ++; 626 603 } … … 628 605 for (uint32_t i=0; i<_param->_nb_inst_retire; i++) 629 606 { 630 LABEL("Test RETIRE "+toString(i)+" : "+toString(out_RETIRE_VAL[i]->read())+","+toString(in_RETIRE_ACK[i]->read()));607 LABEL("Test RETIRE %d : %d,%d",i,out_RETIRE_VAL[i]->read(),in_RETIRE_ACK[i]->read()); 631 608 if ((out_RETIRE_VAL [i]->read() == 1) and 632 609 ( in_RETIRE_ACK [i]->read() == 1)) … … 637 614 else 638 615 rob_id = 0; 639 LABEL("Accepted RETIRE [ "+toString(i)+"] number : "+toString(rob_id)+", request number : "+toString(request_out));616 LABEL("Accepted RETIRE [%d] number : %d, request number : %d",i,rob_id,request_out); 640 617 TEST(bool, request_out_wait [rob_id] , true); 641 618 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Reservation_station.h
r81 r82 21 21 #endif 22 22 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Parameters.h" 23 #include "Behavioural/ include/Types.h"23 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Types.h" 24 24 #ifdef STATISTICS 25 25 #include "Behavioural/include/Stat.h" … … 29 29 #include "Behavioural/include/Vhdl.h" 30 30 #endif 31 #include "Behavioural/include/Usage.h" 31 32 32 33 namespace morpheo { … … 39 40 namespace reservation_station { 40 41 41 class Treservation_station_entry_t42 {43 public : Tcontext_t _context_id ;44 public : Tcontext_t _front_end_id ;45 public : Tcontext_t _ooo_engine_id ;46 public : Tpacket_t _rob_id ;47 public : Toperation_t _operation ;48 public : Ttype_t _type ;49 public : Tlsq_ptr_t _store_queue_ptr_write;50 public : Tlsq_ptr_t _load_queue_ptr_write ;51 public : Tcontrol_t _has_immediat;52 public : Tgeneral_data_t _immediat ;53 //public : Tcontrol_t _read_ra ;54 public : Tgeneral_address_t _num_reg_ra ;55 public : Tcontrol_t _data_ra_val ;56 public : Tgeneral_data_t _data_ra ;57 //public : Tcontrol_t _read_rb ;58 public : Tgeneral_address_t _num_reg_rb ;59 public : Tcontrol_t _data_rb_val ;60 public : Tgeneral_data_t _data_rb ;61 //public : Tcontrol_t _read_rc ;62 public : Tspecial_address_t _num_reg_rc ;63 public : Tcontrol_t _data_rc_val ;64 public : Tspecial_data_t _data_rc ;65 public : Tcontrol_t _write_rd ;66 public : Tgeneral_address_t _num_reg_rd ;67 public : Tcontrol_t _write_re ;68 public : Tspecial_address_t _num_reg_re ;69 70 friend std::ostream& operator<< (std::ostream& output_stream,71 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Treservation_station_entry_t & x)72 {73 output_stream << " * _context_id : " << toString(x._context_id ) << std::endl74 << " * _front_end_id : " << toString(x._front_end_id ) << std::endl75 << " * _ooo_engine_id : " << toString(x._ooo_engine_id ) << std::endl76 << " * _rob_id : " << toString(x._rob_id ) << std::endl77 << " * _operation : " << toString(x._operation ) << std::endl78 << " * _type : " << toString(x._type ) << std::endl79 << " * _store_queue_ptr_write : " << toString(x._store_queue_ptr_write) << std::endl80 << " * _load_queue_ptr_write : " << toString(x._load_queue_ptr_write ) << std::endl81 << " * _has_immediat : " << toString(x._has_immediat ) << std::endl82 << " * _immediat : " << toString(x._immediat ) << std::endl83 // << " * _read_ra : " << toString(x._read_ra ) << std::endl84 << " * _num_reg_ra : " << toString(x._num_reg_ra ) << std::endl85 << " * _data_ra_val : " << toString(x._data_ra_val ) << std::endl86 << " * _data_ra : " << toString(x._data_ra ) << std::endl87 // << " * _read_rb : " << toString(x._read_rb ) << std::endl88 << " * _num_reg_rb : " << toString(x._num_reg_rb ) << std::endl89 << " * _data_rb_val : " << toString(x._data_rb_val ) << std::endl90 << " * _data_rb : " << toString(x._data_rb ) << std::endl91 // << " * _read_rc : " << toString(x._read_rc ) << std::endl92 << " * _num_reg_rc : " << toString(x._num_reg_rc ) << std::endl93 << " * _data_rc_val : " << toString(x._data_rc_val ) << std::endl94 << " * _data_rc : " << toString(x._data_rc ) << std::endl95 << " * _write_rd : " << toString(x._write_rd ) << std::endl96 << " * _num_reg_rd : " << toString(x._num_reg_rd ) << std::endl97 << " * _write_re : " << toString(x._write_re ) << std::endl98 << " * _num_reg_re : " << toString(x._num_reg_re ) << std::endl;99 100 return output_stream;101 }102 };103 104 42 class Reservation_station 105 43 #if SYSTEMC … … 109 47 // -----[ fields ]---------------------------------------------------- 110 48 // Parameters 111 protected : const std::string _name; 112 49 protected : const std::string _name; 113 50 protected : const Parameters * _param; 51 private : const Tusage_t _usage; 114 52 115 53 #ifdef STATISTICS … … 241 179 morpheo::behavioural::Parameters_Statistics * param_statistics, 242 180 #endif 243 Parameters * param ); 181 Parameters * param, 182 morpheo::behavioural::Tusage_t usage ); 183 244 184 public : ~Reservation_station (void); 245 185 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station.cpp
r81 r82 20 20 #undef FUNCTION 21 21 #define FUNCTION "Reservation_station::Reservation_station" 22 23 Reservation_station::Reservation_station 24 ( 22 25 #ifdef SYSTEMC 23 Reservation_station::Reservation_station (sc_module_name name,26 sc_module_name name, 24 27 #else 25 Reservation_station::Reservation_station (string name,28 std::string name, 26 29 #endif 27 30 #ifdef STATISTICS 28 31 morpheo::behavioural::Parameters_Statistics * param_statistics, 29 32 #endif 30 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Parameters * param ): 31 _name (name) 32 ,_param (param) 33 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Parameters * param, 34 morpheo::behavioural::Tusage_t usage ): 35 _name (name) 36 ,_param (param) 37 ,_usage (usage) 33 38 { 34 39 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_allocation.cpp
r81 r82 26 26 log_printf(FUNC,Reservation_station,FUNCTION,"Begin"); 27 27 28 _component = new Component ( );28 _component = new Component (_usage); 29 29 30 30 Entity * entity = _component->set_entity (_name -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 1 10 #define CYCLE_MAX (128*NB_ITERATION) 11 9 12 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 14 #include "Behavioural/include/Allocation.h" 12 13 #define NB_ITERATION 114 #define CYCLE_MAX (128*NB_ITERATION)15 16 #define LABEL(str...) \17 { \18 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \19 msg (str); \20 msg (_("\n")); \21 } while(0)22 23 #define SC_START(cycle_offset) \24 do \25 { \26 /*cout << "SC_START (begin)" << endl;*/ \27 \28 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \29 if (cycle_offset != 0) \30 { \31 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \32 } \33 \34 if (cycle_current > CYCLE_MAX) \35 { \36 TEST_KO("Maximal cycles Reached"); \37 } \38 \39 sc_start(cycle_offset); \40 \41 /*cout << "SC_START (end )" << endl;*/ \42 } while(0)43 15 44 16 void test (string name, … … 51 23 #endif 52 24 53 Read_unit * _Read_unit = new Read_unit (name.c_str(), 25 Read_unit * _Read_unit = new Read_unit 26 (name.c_str(), 54 27 #ifdef STATISTICS 55 _parameters_statistics, 56 #endif 57 _param); 28 _parameters_statistics, 29 #endif 30 _param, 31 USE_ALL); 58 32 59 33 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/include/Read_unit.h
r81 r82 178 178 #endif 179 179 Parameters * param, 180 morpheo::behavioural::Tusage_t usage =USE_ALL180 morpheo::behavioural::Tusage_t usage 181 181 ); 182 182 public : ~Read_unit (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Read_unit_allocation.cpp
r81 r82 184 184 name = _name+"_read_queue"; 185 185 186 _component_read_queue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Read_queue (name.c_str() 186 _component_read_queue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Read_queue 187 (name.c_str() 187 188 #ifdef STATISTICS 188 ,param_statistics 189 #endif 190 ,_param->_param_read_queue); 189 ,param_statistics 190 #endif 191 ,_param->_param_read_queue 192 ,_usage); 191 193 192 194 _component->set_component (_component_read_queue->_component … … 199 201 name = _name+"_reservation_station"; 200 202 201 _component_reservation_station = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Reservation_station (name.c_str() 203 _component_reservation_station = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Reservation_station 204 (name.c_str() 202 205 #ifdef STATISTICS 203 ,param_statistics 204 #endif 205 ,_param->_param_reservation_station); 206 ,param_statistics 207 #endif 208 ,_param->_param_reservation_station 209 ,_usage); 206 210 207 211 _component->set_component (_component_reservation_station->_component
Note: See TracChangeset
for help on using the changeset viewer.