Changeset 82 for trunk/IPs/systemC
- Timestamp:
- May 1, 2008, 6:48:45 PM (17 years ago)
- Location:
- trunk/IPs/systemC
- Files:
-
- 77 added
- 2 deleted
- 294 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/Environment/Makefile.Environment
r81 r82 1 1 include $(MORPHEO_TOPLEVEL)/Makefile.tools 2 include $(MORPHEO_ IPS)/processor/Morpheo/Behavioural/Makefile.flags2 include $(MORPHEO_TOPLEVEL)/IPs/systemC/processor/Morpheo/Behavioural/Makefile.flags 3 3 4 4 #-----[ Directory ]---------------------------------------- -
trunk/IPs/systemC/Environment/TTY/src/TTY.cpp
r81 r82 45 45 46 46 std::cerr << "<Tty> Error in the creation of tty" << std::endl 47 << "Test if environment's variable $PATH is set with ${MORPHEO_ IPS}/Environment/TTY/xtty" << std::endl;47 << "Test if environment's variable $PATH is set with ${MORPHEO_TOPLEVEL}/IPs/systemC/Environment/TTY/xtty" << std::endl; 48 48 exit (1); 49 49 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/configuration.cfg
r81 r82 3 3 1 1 +1 # nb_front_end 4 4 2 2 +1 # nb_ooo_engine 5 1024 1024+1 # nb_packet5 256 256 +1 # nb_packet 6 6 32 32 +1 # size_general_data 7 7 32 32 +1 # nb_general_register -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 1 10 #define CYCLE_MAX (1024*NB_ITERATION) 11 9 12 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 12 #define NB_ITERATION 113 #define CYCLE_MAX (1024*NB_ITERATION)14 15 #define LABEL(str...) \16 { \17 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \18 msg (str); \19 msg (_("\n")); \20 } while(0)21 22 #define SC_START(cycle_offset) \23 do \24 { \25 /*cout << "SC_START (begin)" << endl;*/ \26 \27 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \28 if (cycle_offset != 0) \29 { \30 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \31 } \32 \33 if (cycle_current > CYCLE_MAX) \34 { \35 TEST_KO("Maximal cycles Reached"); \36 } \37 \38 sc_start(cycle_offset); \39 \40 /*cout << "SC_START (end )" << endl;*/ \41 } while(0)42 14 43 15 class execute_transaction … … 121 93 Functionnal_unit * _Functionnal_unit = new Functionnal_unit (name.c_str(), 122 94 #ifdef STATISTICS 123 _parameters_statistics,95 _parameters_statistics, 124 96 #endif 125 _param); 97 _param, 98 USE_ALL); 126 99 127 100 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Functionnal_unit.h
r81 r82 148 148 #endif 149 149 Parameters * param, 150 morpheo::behavioural::Tusage_t usage =USE_ALL150 morpheo::behavioural::Tusage_t usage 151 151 ); 152 152 public : ~Functionnal_unit (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/test.h
r81 r82 7 7 */ 8 8 9 #define CYCLE_MAX 1024 9 10 10 11 #include "Common/include/Time.h" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test1.cpp
r81 r82 7 7 */ 8 8 9 /* 10 9 11 #include <queue> 10 12 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/test.h" 11 12 #define NB_ITERATION 113 #define CYCLE_MAX (1024*NB_ITERATION)14 15 #define LABEL(str) \16 { \17 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \18 } while(0)19 20 #define SC_START(cycle_offset) \21 do \22 { \23 /*cout << "SC_START (begin)" << endl;*/ \24 \25 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \26 if (cycle_offset != 0) \27 { \28 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \29 } \30 \31 if (cycle_current > CYCLE_MAX) \32 { \33 TEST_KO("Maximal cycles Reached"); \34 } \35 sc_start(cycle_offset); \36 /*cout << "SC_START (end )" << endl;*/ \37 } while(0)38 13 39 14 … … 55 30 56 31 #ifdef SYSTEMC 57 /********************************************************************* 58 * Déclarations des signaux 59 *********************************************************************/ 32 60 33 string rename = ""; 61 34 … … 129 102 } 130 103 131 /******************************************************** 132 * Instanciation 133 ********************************************************/ 104 // Instanciation 134 105 135 106 cout << "<" << name << "> Instanciation of _Load_store_unit" << endl; … … 215 186 Time * _time = new Time(); 216 187 217 /******************************************************** 218 * Simulation - Begin 219 ********************************************************/ 188 // Simulation - Begin 220 189 221 190 // Initialisation … … 656 625 } 657 626 658 627 LABEL("DCACHE_RSP : "+toString(in_DCACHE_RSP_VAL->read())+" - "+toString(out_DCACHE_RSP_ACK ->read())); 659 628 if (in_DCACHE_RSP_VAL->read() and out_DCACHE_RSP_ACK->read()) 660 629 { … … 677 646 678 647 679 /******************************************************** 680 * Simulation - End 681 ********************************************************/ 648 // Simulation - End 682 649 683 650 TEST_OK ("End of Simulation"); … … 755 722 #endif 756 723 } 724 */ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test2.cpp
r81 r82 9 9 #include <queue> 10 10 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/test.h" 11 12 #define CYCLE_MAX 102413 14 #define LABEL(str) \15 { \16 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \17 } while(0)18 19 #define SC_START(cycle_offset) \20 do \21 { \22 /*cout << "SC_START (begin)" << endl;*/ \23 \24 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \25 if (cycle_offset != 0) \26 { \27 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \28 } \29 \30 if (cycle_current > CYCLE_MAX) \31 { \32 TEST_KO("Maximal cycles Reached"); \33 } \34 sc_start(cycle_offset); \35 /*cout << "SC_START (end )" << endl;*/ \36 } while(0)37 38 11 39 12 //===================================================================={test} … … 71 44 _parameters_statistics, 72 45 #endif 73 _param); 46 _param, 47 USE_ALL); 74 48 75 49 #ifdef SYSTEMC … … 487 461 SC_START(0); 488 462 489 LABEL("MEMORY_IN : "+toString(in_MEMORY_IN_VAL ->read())+" - "+toString(out_MEMORY_IN_ACK ->read()));463 LABEL("MEMORY_IN : %d - %d",in_MEMORY_IN_VAL ->read(),out_MEMORY_IN_ACK ->read()); 490 464 if ( in_MEMORY_IN_VAL ->read() and out_MEMORY_IN_ACK ->read()) 491 465 { 492 466 Tpacket_t packet_id = in_MEMORY_IN_PACKET_ID->read(); 493 467 494 LABEL(" * Accepted MEMORY_IN : " + toString(packet_id));468 LABEL(" * Accepted MEMORY_IN : %d",packet_id); 495 469 cout << fifo_request.top(); 496 470 … … 509 483 } 510 484 511 LABEL("MEMORY_OUT : "+toString(out_MEMORY_OUT_VAL->read())+" - "+toString(in_MEMORY_OUT_ACK ->read()));485 LABEL("MEMORY_OUT : %d - %d",out_MEMORY_OUT_VAL->read(),in_MEMORY_OUT_ACK ->read()); 512 486 if (out_MEMORY_OUT_VAL->read() and in_MEMORY_OUT_ACK->read()) 513 487 { 514 488 Tpacket_t packet_id = out_MEMORY_OUT_PACKET_ID->read(); 515 489 516 LABEL(" * Accepted MEMORY_OUT : " + toString(packet_id));490 LABEL(" * Accepted MEMORY_OUT : %d",packet_id); 517 491 518 492 if (is_operation_memory_store(tab_request[packet_id]._operation)) … … 650 624 } 651 625 652 LABEL("DCACHE_REQ : "+toString(out_DCACHE_REQ_VAL->read())+" - "+toString(in_DCACHE_REQ_ACK ->read()));626 LABEL("DCACHE_REQ : %d - %d",out_DCACHE_REQ_VAL->read(),in_DCACHE_REQ_ACK ->read()); 653 627 if (out_DCACHE_REQ_VAL->read() and in_DCACHE_REQ_ACK->read()) 654 628 { … … 665 639 packet_id = (out_DCACHE_REQ_PACKET_ID ->read())>>1; 666 640 667 LABEL(" * Accepted DCACHE_REQ : " + toString(packet_id));641 LABEL(" * Accepted DCACHE_REQ : %d",packet_id); 668 642 669 643 if (address >= size_memory) … … 676 650 { 677 651 rdata = _memory->access (context_id, address, out_DCACHE_REQ_TYPE->read(), out_DCACHE_REQ_WDATA->read()); 678 LABEL(" * rdata : " + toString(rdata));652 LABEL(" * rdata : 0x%x",rdata); 679 653 } 680 654 … … 699 673 } 700 674 701 LABEL("DCACHE_RSP : "+toString(in_DCACHE_RSP_VAL->read())+" - "+toString(out_DCACHE_RSP_ACK ->read()));675 LABEL("DCACHE_RSP : %d - %d",in_DCACHE_RSP_VAL->read(),out_DCACHE_RSP_ACK ->read()); 702 676 if (in_DCACHE_RSP_VAL->read() and out_DCACHE_RSP_ACK->read()) 703 677 { -
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
r81 r82 30 30 #include "Behavioural/include/Vhdl.h" 31 31 #endif 32 #include "Behavioural/include/Usage.h" 32 33 33 34 namespace morpheo { … … 48 49 // -----[ fields ]---------------------------------------------------- 49 50 // Parameters 50 protected : const std::string _name; 51 51 protected : const std::string _name; 52 52 protected : const Parameters * _param; 53 private : const Tusage_t _usage; 53 54 54 55 #ifdef STATISTICS … … 202 203 morpheo::behavioural::Parameters_Statistics * param_statistics, 203 204 #endif 204 Parameters * param ); 205 Parameters * param, 206 morpheo::behavioural::Tusage_t usage ); 205 207 public : ~Load_store_unit (void); 206 208 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit.cpp
r81 r82 20 20 #undef FUNCTION 21 21 #define FUNCTION "Load_store_unit::Load_store_unit" 22 Load_store_unit::Load_store_unit 23 ( 22 24 #ifdef SYSTEMC 23 Load_store_unit::Load_store_unit (sc_module_name name,25 sc_module_name name, 24 26 #else 25 Load_store_unit::Load_store_unit (string name,27 std::string name, 26 28 #endif 27 29 #ifdef STATISTICS 28 30 morpheo::behavioural::Parameters_Statistics * param_statistics, 29 31 #endif 30 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters * param ): 31 _name (name) 32 ,_param (param) 32 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters * param , 33 morpheo::behavioural::Tusage_t usage 34 ): 35 _name (name) 36 ,_param (param) 37 ,_usage (usage) 33 38 { 34 39 log_printf(FUNC,Load_store_unit,FUNCTION,"Begin"); -
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
r81 r82 26 26 log_printf(FUNC,Load_store_unit,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/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 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/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_Write_unit/Write_unit/Execute_queue/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 14 #include "Behavioural/include/Allocation.h" 12 15 #include "Common/include/BitManipulation.h" 13 14 #define NB_ITERATION 115 #define CYCLE_MAX (128*NB_ITERATION)16 17 #define LABEL(str...) \18 { \19 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \20 msg (str); \21 msg (_("\n")); \22 } while(0)23 24 #define SC_START(cycle_offset) \25 do \26 { \27 /*cout << "SC_START (begin)" << endl;*/ \28 \29 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \30 if (cycle_offset != 0) \31 { \32 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \33 } \34 \35 if (cycle_current > CYCLE_MAX) \36 { \37 TEST_KO("Maximal cycles Reached"); \38 } \39 \40 sc_start(cycle_offset); \41 \42 /*cout << "SC_START (end )" << endl;*/ \43 } while(0)44 16 45 17 class entry_t … … 109 81 #endif 110 82 111 Execute_queue * _Execute_queue = new Execute_queue (name.c_str(), 83 Execute_queue * _Execute_queue = new Execute_queue 84 (name.c_str(), 112 85 #ifdef STATISTICS 113 86 _parameters_statistics, 114 87 #endif 115 _param); 88 _param, 89 USE_ALL); 116 90 117 91 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_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_Write_unit/Write_unit/Execute_queue/include/Parameters.h" 21 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Types.h" 22 22 #ifdef STATISTICS 23 23 #include "Behavioural/include/Stat.h" … … 31 31 namespace morpheo { 32 32 namespace behavioural { 33 34 33 namespace core { 35 34 namespace multi_execute_loop { … … 38 37 namespace write_unit { 39 38 namespace execute_queue { 40 41 42 class execute_queue_entry_t43 {44 public : Tcontext_t _context_id ;45 public : Tcontext_t _front_end_id ;46 public : Tcontext_t _ooo_engine_id;47 public : Tpacket_t _packet_id ;48 //public : Toperation_t _operation ;49 //public : Ttype_t _type ;50 public : Tspecial_data_t _flags ;51 public : Texception_t _exception ;52 public : Tcontrol_t _no_sequence ;53 public : Tgeneral_data_t _address ;54 55 public : execute_queue_entry_t (Tcontext_t context_id ,56 Tcontext_t front_end_id ,57 Tcontext_t ooo_engine_id,58 Tpacket_t packet_id ,59 //Toperation_t operation ,60 //Ttype_t type ,61 Tspecial_data_t flags ,62 Texception_t exception ,63 Tcontrol_t no_sequence ,64 Tgeneral_data_t address )65 {66 _context_id = context_id ;67 _front_end_id = front_end_id ;68 _ooo_engine_id = ooo_engine_id;69 _packet_id = packet_id ;70 //_operation = operation ;71 //_type = type ;72 _flags = flags ;73 _exception = exception ;74 _no_sequence = no_sequence ;75 _address = address ;76 };77 };78 79 39 80 40 class Execute_queue … … 159 119 #endif 160 120 Parameters * param, 161 morpheo::behavioural::Tusage_t usage =USE_ALL121 morpheo::behavioural::Tusage_t usage 162 122 ); 163 123 public : ~Execute_queue (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_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_Write_unit/Write_unit/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 14 #include "Common/include/BitManipulation.h" 12 15 #include "Behavioural/include/Allocation.h" 13 14 #define NB_ITERATION 115 #define CYCLE_MAX (128*NB_ITERATION)16 17 #define LABEL(str...) \18 { \19 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \20 msg (str); \21 msg (_("\n")); \22 } while(0)23 24 #define SC_START(cycle_offset) \25 do \26 { \27 /*cout << "SC_START (begin)" << endl;*/ \28 \29 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \30 if (cycle_offset != 0) \31 { \32 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \33 } \34 \35 if (cycle_current > CYCLE_MAX) \36 { \37 TEST_KO("Maximal cycles Reached"); \38 } \39 \40 sc_start(cycle_offset); \41 \42 /*cout << "SC_START (end )" << endl;*/ \43 } while(0)44 16 45 17 class entry_t … … 127 99 #endif 128 100 129 Write_unit * _Write_unit = new Write_unit (name.c_str(), 101 Write_unit * _Write_unit = new Write_unit 102 (name.c_str(), 130 103 #ifdef STATISTICS 131 104 _parameters_statistics, 132 105 #endif 133 _param); 106 _param, 107 USE_ALL); 134 108 135 109 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/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_Write_unit/Write_unit/Write_queue/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 14 #include "Common/include/BitManipulation.h" 12 15 #include "Behavioural/include/Allocation.h" 13 14 #define NB_ITERATION 115 #define CYCLE_MAX (128*NB_ITERATION)16 17 #define LABEL(str...) \18 { \19 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \20 msg (str); \21 msg (_("\n")); \22 } while(0)23 24 #define SC_START(cycle_offset) \25 do \26 { \27 /*cout << "SC_START (begin)" << endl;*/ \28 \29 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \30 if (cycle_offset != 0) \31 { \32 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \33 } \34 \35 if (cycle_current > CYCLE_MAX) \36 { \37 TEST_KO("Maximal cycles Reached"); \38 } \39 \40 sc_start(cycle_offset); \41 \42 /*cout << "SC_START (end )" << endl;*/ \43 } while(0)44 16 45 17 class entry_t … … 127 99 128 100 129 Write_queue * _Write_queue = new Write_queue (name.c_str(), 101 Write_queue * _Write_queue = new Write_queue 102 (name.c_str(), 130 103 #ifdef STATISTICS 131 104 _parameters_statistics, 132 105 #endif 133 _param); 106 _param, 107 USE_ALL); 134 108 135 109 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_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_Write_unit/Write_unit/Write_queue/include/Parameters.h" 21 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Types.h" 22 22 23 #ifdef STATISTICS 23 24 #include "Behavioural/include/Stat.h" … … 37 38 namespace write_unit { 38 39 namespace write_queue { 39 40 class write_queue_entry_t41 {42 public : Tcontext_t _context_id ;43 public : Tcontext_t _front_end_id ;44 public : Tcontext_t _ooo_engine_id;45 public : Tpacket_t _packet_id ;46 //public : Toperation_t _operation ;47 public : Ttype_t _type ;48 public : Tcontrol_t _write_rd ;49 public : Tgeneral_address_t _num_reg_rd ;50 public : Tgeneral_data_t _data_rd ;51 public : Tcontrol_t _write_re ;52 public : Tspecial_address_t _num_reg_re ;53 public : Tspecial_data_t _data_re ;54 public : Texception_t _exception ;55 public : Tcontrol_t _no_sequence ;56 public : Tgeneral_data_t _address ;57 58 public : write_queue_entry_t (Tcontext_t context_id ,59 Tcontext_t front_end_id ,60 Tcontext_t ooo_engine_id,61 Tpacket_t packet_id ,62 //Toperation_t operation ,63 Ttype_t type ,64 Tcontrol_t write_rd ,65 Tgeneral_address_t num_reg_rd ,66 Tgeneral_data_t data_rd ,67 Tcontrol_t write_re ,68 Tspecial_address_t num_reg_re ,69 Tspecial_data_t data_re ,70 Texception_t exception ,71 Tcontrol_t no_sequence ,72 Tgeneral_data_t address )73 {74 _context_id = context_id ;75 _front_end_id = front_end_id ;76 _ooo_engine_id = ooo_engine_id;77 _packet_id = packet_id ;78 //_operation = operation ;79 _type = type ;80 _write_rd = write_rd ;81 _num_reg_rd = num_reg_rd ;82 _data_rd = data_rd ;83 _write_re = write_re ;84 _num_reg_re = num_reg_re ;85 _data_re = data_re ;86 _exception = exception ;87 _no_sequence = no_sequence ;88 _address = address ;89 };90 };91 92 40 93 41 class Write_queue … … 204 152 #endif 205 153 Parameters * param, 206 morpheo::behavioural::Tusage_t usage =USE_ALL154 morpheo::behavioural::Tusage_t usage 207 155 ); 208 156 public : ~Write_queue (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/include/Write_unit.h
r81 r82 145 145 #endif 146 146 Parameters * param, 147 morpheo::behavioural::Tusage_t usage =USE_ALL147 morpheo::behavioural::Tusage_t usage 148 148 ); 149 149 public : ~Write_unit (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit_allocation.cpp
r81 r82 139 139 name = _name+"_write_queue"; 140 140 141 component_write_queue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Write_queue (name.c_str() 141 component_write_queue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Write_queue 142 (name.c_str() 142 143 #ifdef STATISTICS 143 ,param_statistics 144 #endif 145 ,_param->_param_write_queue); 144 ,param_statistics 145 #endif 146 ,_param->_param_write_queue 147 ,_usage); 146 148 147 149 _component->set_component (component_write_queue->_component … … 156 158 name = _name+"_execute_queue"; 157 159 158 component_execute_queue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Execute_queue (name.c_str() 160 component_execute_queue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Execute_queue 161 (name.c_str() 159 162 #ifdef STATISTICS 160 ,param_statistics 161 #endif 162 ,_param->_param_execute_queue); 163 ,param_statistics 164 #endif 165 ,_param->_param_execute_queue 166 ,_usage); 163 167 164 168 _component->set_component (component_execute_queue->_component -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_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/Network/Execution_unit_to_Write_unit/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" … … 12 15 #include "Behavioural/include/Allocation.h" 13 16 #include <set> 14 15 #define NB_ITERATION 116 #define CYCLE_MAX (128*NB_ITERATION)17 18 #define LABEL(str...) \19 { \20 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \21 msg (str); \22 msg (_("\n")); \23 } while(0)24 25 #define SC_START(cycle_offset) \26 do \27 { \28 /*cout << "SC_START (begin)" << endl;*/ \29 \30 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \31 if (cycle_offset != 0) \32 { \33 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \34 } \35 \36 if (cycle_current > CYCLE_MAX) \37 { \38 TEST_KO("Maximal cycles Reached"); \39 } \40 \41 sc_start(cycle_offset); \42 \43 /*cout << "SC_START (end )" << endl;*/ \44 } while(0)45 17 46 18 … … 106 78 #endif 107 79 108 Execution_unit_to_Write_unit * _Execution_unit_to_Write_unit = new Execution_unit_to_Write_unit (name.c_str(), 80 Execution_unit_to_Write_unit * _Execution_unit_to_Write_unit = new Execution_unit_to_Write_unit 81 (name.c_str(), 109 82 #ifdef STATISTICS 110 83 _parameters_statistics, 111 84 #endif 112 _param); 85 _param, 86 USE_ALL); 113 87 114 88 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Execution_unit_to_Write_unit.h
r81 r82 126 126 #endif 127 127 Parameters * param, 128 morpheo::behavioural::Tusage_t usage =USE_ALL128 morpheo::behavioural::Tusage_t usage 129 129 ); 130 130 public : ~Execution_unit_to_Write_unit (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_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/Network/Read_unit_to_Execution_unit/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" … … 13 16 #include <list> 14 17 #include <set> 15 16 #define NB_ITERATION 117 #define CYCLE_MAX (128*NB_ITERATION)18 19 #define LABEL(str...) \20 { \21 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \22 msg (str); \23 msg (_("\n")); \24 } while(0)25 26 #define SC_START(cycle_offset) \27 do \28 { \29 /*cout << "SC_START (begin)" << endl;*/ \30 \31 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \32 if (cycle_offset != 0) \33 { \34 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \35 } \36 \37 if (cycle_current > CYCLE_MAX) \38 { \39 TEST_KO("Maximal cycles Reached"); \40 } \41 \42 sc_start(cycle_offset); \43 \44 /*cout << "SC_START (end )" << endl;*/ \45 } while(0)46 47 18 48 19 class entry_t … … 113 84 #endif 114 85 115 Read_unit_to_Execution_unit * _Read_unit_to_Execution_unit = new Read_unit_to_Execution_unit (name.c_str(), 86 Read_unit_to_Execution_unit * _Read_unit_to_Execution_unit = new Read_unit_to_Execution_unit 87 (name.c_str(), 116 88 #ifdef STATISTICS 117 89 _parameters_statistics, 118 90 #endif 119 _param); 91 _param, 92 USE_ALL); 120 93 121 94 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/include/Read_unit_to_Execution_unit.h
r81 r82 130 130 #endif 131 131 Parameters * param, 132 morpheo::behavioural::Tusage_t usage =USE_ALL132 morpheo::behavioural::Tusage_t usage 133 133 ); 134 134 public : ~Read_unit_to_Execution_unit (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 128 10 #define CYCLE_MAX (128*NB_ITERATION) 11 9 12 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 12 #define NB_ITERATION 12813 #define CYCLE_MAX (128*NB_ITERATION)14 15 #define LABEL(str) \16 { \17 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \18 } while(0)19 20 static uint32_t cycle = 0;21 22 #define SC_START(cycle_offset) \23 do \24 { \25 /*cout << "SC_START (begin)" << endl;*/ \26 \27 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \28 if (cycle_current != cycle) \29 { \30 cycle = cycle_current; \31 cout << "##########[ cycle "<< cycle << " ]" << endl; \32 } \33 \34 if (cycle_current > CYCLE_MAX) \35 { \36 TEST_KO("Maximal cycles Reached"); \37 } \38 sc_start(cycle_offset); \39 /*cout << "SC_START (end )" << endl;*/ \40 } while(0)41 14 42 15 void test (string name, … … 49 22 #endif 50 23 51 Register_unit_Glue * _Register_unit_Glue = new Register_unit_Glue (name.c_str(), 24 Register_unit_Glue * _Register_unit_Glue = new Register_unit_Glue 25 (name.c_str(), 52 26 #ifdef STATISTICS 53 27 _parameters_statistics, 54 28 #endif 55 _param); 29 _param, 30 USE_ALL); 56 31 57 32 #ifdef SYSTEMC … … 575 550 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) 576 551 { 577 LABEL("Iteration "+toString(iteration));552 LABEL("Iteration %d",iteration); 578 553 579 554 if (test_read == true) … … 584 559 Tcontrol_t val = (rand()%100)<=percent_transaction; 585 560 586 LABEL("GPR_READ [ "+toString(j)+"] : "+toString(val)+" - " +toString(static_cast<uint32_t>(context)));561 LABEL("GPR_READ [%d] : %d - %d",j,val,context); 587 562 588 563 in_GPR_READ_VAL [j] ->write(val); … … 623 598 Tcontrol_t val = (rand()%100)<=percent_transaction; 624 599 625 LABEL("SPR_READ [ "+toString(j)+"] : "+toString(val)+" - " +toString(static_cast<uint32_t>(context)));600 LABEL("SPR_READ [%d] : %d - %d",j,val,context); 626 601 627 602 in_SPR_READ_VAL [j] ->write(val); … … 666 641 Tcontrol_t val = (rand()%100)<=percent_transaction; 667 642 668 LABEL("GPR_WRITE [ "+toString(j)+"] : "+toString(val)+" - " +toString(static_cast<uint32_t>(context)));669 643 LABEL("GPR_WRITE [%d] : %d - %d",j,val,context); 644 670 645 in_GPR_WRITE_VAL [j] ->write(val); 671 646 in_GPR_WRITE_OOO_ENGINE_ID [j] ->write(context); … … 701 676 Tcontrol_t val = (rand()%100)<=percent_transaction; 702 677 703 LABEL("SPR_WRITE [ "+toString(j)+"] : "+toString(val)+" - " +toString(static_cast<uint32_t>(context)));678 LABEL("SPR_WRITE [%d] : %d - %d",j,val,context); 704 679 705 680 in_SPR_WRITE_VAL [j] ->write(val); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h
r81 r82 169 169 #endif 170 170 Parameters * param, 171 morpheo::behavioural::Tusage_t usage =USE_ALL171 morpheo::behavioural::Tusage_t usage 172 172 ); 173 173 public : ~Register_unit_Glue (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_allocation.cpp
r81 r82 24 24 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 25 25 26 _component = new Component ( );26 _component = new Component (_usage); 27 27 28 28 Entity * entity = _component->set_entity (_name -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 1 10 #define CYCLE_MAX (10240*NB_ITERATION) 11 9 12 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 12 #define NB_ITERATION 113 #define CYCLE_MAX (10240*NB_ITERATION)14 15 #define LABEL(str) \16 { \17 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \18 } while(0)19 20 static uint32_t cycle = 0;21 22 #define SC_START(cycle_offset) \23 do \24 { \25 /*cout << "SC_START (begin)" << endl;*/ \26 \27 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \28 if (cycle_current != cycle) \29 { \30 cycle = cycle_current; \31 cout << "##########[ cycle "<< cycle << " ]" << endl; \32 } \33 \34 if (cycle_current > CYCLE_MAX) \35 { \36 TEST_KO("Maximal cycles Reached"); \37 } \38 sc_start(cycle_offset); \39 /*cout << "SC_START (end )" << endl;*/ \40 } while(0)41 14 42 15 void test (string name, … … 49 22 #endif 50 23 51 Register_unit * _Register_unit = new Register_unit (name.c_str(), 24 Register_unit * _Register_unit = new Register_unit 25 (name.c_str(), 52 26 #ifdef STATISTICS 53 27 _parameters_statistics, 54 28 #endif 55 _param); 29 _param, 30 USE_ALL); 56 31 57 32 #ifdef SYSTEMC … … 406 381 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) 407 382 { 408 LABEL("Iteration "+toString(iteration));383 LABEL("Iteration %d",iteration); 409 384 410 385 LABEL("(GPR) Write default value"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Register_unit.h
r81 r82 142 142 #endif 143 143 Parameters * param, 144 morpheo::behavioural::Tusage_t usage =USE_ALL144 morpheo::behavioural::Tusage_t usage 145 145 ); 146 146 public : ~Register_unit (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_allocation.cpp
r81 r82 29 29 log_printf(FUNC,Register_unit,FUNCTION,"Begin"); 30 30 31 _component = new Component ( );31 _component = new Component (_usage); 32 32 33 33 Entity * entity = _component->set_entity (_name … … 270 270 #endif 271 271 ,_param->_param_gpr [i] 272 ,_usage 272 273 ); 273 274 … … 290 291 #endif 291 292 ,_param->_param_gpr_status [i] 293 ,_usage 292 294 ); 293 295 … … 310 312 #endif 311 313 ,_param->_param_spr [i] 314 ,_usage 312 315 ); 313 316 … … 329 332 #endif 330 333 ,_param->_param_spr_status [i] 334 ,_usage 331 335 ); 332 336 … … 350 354 #endif 351 355 ,_param->_param_glue 356 ,_usage 352 357 ); 353 358 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/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/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 14 #include "Behavioural/include/Allocation.h" 12 15 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 16 44 17 void test (string name, … … 51 24 #endif 52 25 53 Execute_loop * _Execute_loop = new Execute_loop (name.c_str(), 26 Execute_loop * _Execute_loop = new Execute_loop 27 (name.c_str(), 54 28 #ifdef STATISTICS 55 29 _parameters_statistics, 56 30 #endif 57 _param); 31 _param, 32 USE_ALL); 58 33 59 34 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Execute_loop.h
r81 r82 176 176 #endif 177 177 Parameters * param, 178 morpheo::behavioural::Tusage_t usage =USE_ALL178 morpheo::behavioural::Tusage_t usage 179 179 ); 180 180 public : ~Execute_loop (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Execute_loop_allocation.cpp
r81 r82 164 164 ,param_statistics 165 165 #endif 166 ,_param->_param_read_unit[i]); 166 ,_param->_param_read_unit[i] 167 ,_usage); 167 168 168 169 _component->set_component (_component_read_unit [i]->_component … … 184 185 ,param_statistics 185 186 #endif 186 ,_param->_param_functionnal_unit[i]); 187 ,_param->_param_functionnal_unit[i] 188 ,_usage); 187 189 188 190 _component->set_component (_component_functionnal_unit [i]->_component … … 204 206 ,param_statistics 205 207 #endif 206 ,_param->_param_load_store_unit[i]); 208 ,_param->_param_load_store_unit[i] 209 ,_usage); 207 210 208 211 _component->set_component (_component_load_store_unit [i]->_component … … 224 227 ,param_statistics 225 228 #endif 226 ,_param->_param_write_unit[i]); 229 ,_param->_param_write_unit[i] 230 ,_usage); 227 231 228 232 _component->set_component (_component_write_unit [i]->_component … … 242 246 ,param_statistics 243 247 #endif 244 ,_param->_param_read_unit_to_execution_unit); 248 ,_param->_param_read_unit_to_execution_unit 249 ,_usage); 245 250 246 251 _component->set_component (_component_read_unit_to_execution_unit->_component … … 260 265 ,param_statistics 261 266 #endif 262 ,_param->_param_execution_unit_to_write_unit); 267 ,_param->_param_execution_unit_to_write_unit 268 ,_usage); 263 269 264 270 _component->set_component (_component_execution_unit_to_write_unit->_component … … 278 284 ,param_statistics 279 285 #endif 280 ,_param->_param_register_unit); 286 ,_param->_param_register_unit 287 ,_usage); 281 288 282 289 _component->set_component (_component_register_unit->_component -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 1 10 #define CYCLE_MAX (2048*NB_ITERATION) 11 9 12 #include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/include/test.h" 10 13 #include <list> 11 14 #include "Common/include/Test.h" 12 15 #include "Behavioural/include/Allocation.h" 13 14 #define NB_ITERATION 115 #define CYCLE_MAX (2048*NB_ITERATION)16 17 #define LABEL(str...) \18 { \19 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \20 msg (str); \21 msg (_("\n")); \22 } while(0)23 24 #define SC_START(cycle_offset) \25 do \26 { \27 /*cout << "SC_START (begin)" << endl;*/ \28 \29 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \30 if (cycle_offset != 0) \31 { \32 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \33 } \34 \35 if (cycle_current > CYCLE_MAX) \36 { \37 TEST_KO("Maximal cycles Reached"); \38 } \39 \40 sc_start(cycle_offset); \41 \42 /*cout << "SC_START (end )" << endl;*/ \43 } while(0)44 16 45 17 class entry_t … … 151 123 #endif 152 124 153 Decod * _Decod = new Decod (name.c_str(), 125 Decod * _Decod = new Decod 126 (name.c_str(), 154 127 #ifdef STATISTICS 155 128 _parameters_statistics, 156 129 #endif 157 _param); 130 _param, 131 USE_ALL); 158 132 159 133 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Decod.h
r81 r82 159 159 #endif 160 160 Parameters * param, 161 morpheo::behavioural::Tusage_t usage =USE_ALL161 morpheo::behavioural::Tusage_t usage 162 162 ); 163 163 public : ~Decod (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Parameters.h
r81 r82 66 66 public : ~Parameters () ; 67 67 68 public : std::stringmsg_error (void);68 public : Parameters_test msg_error (void); 69 69 70 public : std::string print (uint32_t depth);71 public : friend std::ostream& operator<< (std::ostream& output_stream,72 morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::Parameters & x);70 public : std::string print (uint32_t depth); 71 public : friend std::ostream& operator<< (std::ostream& output_stream, 72 morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::Parameters & x); 73 73 }; 74 74 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Parameters_msg_error.cpp
r81 r82 21 21 #undef FUNCTION 22 22 #define FUNCTION "Decod::msg_error" 23 std::stringParameters::msg_error(void)23 Parameters_test Parameters::msg_error(void) 24 24 { 25 25 log_printf(FUNC,Decod,FUNCTION,"Begin"); 26 27 std::string msg = "";26 27 Parameters_test test("Decod"); 28 28 29 29 if (_nb_inst_decod == 0) 30 msg += " - nb_inst_decod must be > 0.\n";30 test.error(_("nb_inst_decod must be > 0.\n")); 31 31 32 32 if ((_size_general_data != 32) and 33 33 (_size_general_data != 64)) 34 msg += " - size_general_data must be equal at 32 or 64 bits.\n";34 test.error(_("size_general_data must be equal at 32 or 64 bits.\n")); 35 35 36 36 if ((_nb_branch_speculated == 0) or 37 37 (_nb_branch_speculated > _nb_context)) 38 msg += " - nb_branch_speculated must be in [1:nb_context].\n";38 test.error(_("nb_branch_speculated must be in [1:nb_context].\n")); 39 39 40 40 if ((_nb_context_select == 0) or 41 41 (_nb_context_select > _nb_context)) 42 msg += " - nb_context_select must be in [1:nb_context].\n";42 test.error(_("nb_context_select must be in [1:nb_context].\n")); 43 43 44 44 if ((_priority != PRIORITY_ROUND_ROBIN)) 45 msg += " - Unsupported priority scheme. Supported scheme are : "+toString(PRIORITY_ROUND_ROBIN)+".\n";45 test.error(toString(_("Unsupported priority scheme. Supported scheme are : %s.\n"),toString(PRIORITY_ROUND_ROBIN).c_str())); 46 46 47 47 if ((_load_balancing != LOAD_BALANCING_MAXIMUM_FOR_PRIORITY)) 48 msg += " - Unsupported load_balancing scheme. Supported scheme are : "+toString(LOAD_BALANCING_MAXIMUM_FOR_PRIORITY)+".\n";48 test.error(toString(_("Unsupported load_balancing scheme. Supported scheme are : %s.\n"),toString(LOAD_BALANCING_MAXIMUM_FOR_PRIORITY).c_str())); 49 49 50 return msg;50 return test; 51 51 52 52 log_printf(FUNC,Decod,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 10 #define NB_ITERATION 1024 11 #define CYCLE_MAX (128*NB_ITERATION) 12 9 13 #include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/include/test.h" 10 14 #include "Common/include/Test.h" 11 15 #include "Behavioural/include/Allocation.h" 12 13 #define NB_ITERATION 102414 #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 16 44 17 void test (string name, … … 51 24 #endif 52 25 53 Address_management * _Address_management = new Address_management (name.c_str(), 26 Address_management * _Address_management = new Address_management 27 (name.c_str(), 54 28 #ifdef STATISTICS 55 29 _parameters_statistics, 56 30 #endif 57 _param); 31 _param, 32 USE_ALL); 58 33 59 34 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/include/Address_management.h
r81 r82 132 132 #endif 133 133 Parameters * param, 134 morpheo::behavioural::Tusage_t usage =USE_ALL134 morpheo::behavioural::Tusage_t usage 135 135 ); 136 136 public : ~Address_management (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_transition.cpp
r81 r82 79 79 reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID = PORT_READ(in_PREDICT_BRANCH_UPDATE_PREDICTION_ID); 80 80 81 #error "INSTRUCTION_ENABLE : ERROR implémentation, remplacer PC_PREVIOUS par PC_NEXT_NEXT"81 // #error "INSTRUCTION_ENABLE : ERROR implémentation, remplacer PC_PREVIOUS par PC_NEXT_NEXT" 82 82 83 83 for (uint32_t i=0; i<_param->_nb_instruction; i++) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 1 10 #define CYCLE_MAX (2048*NB_ITERATION) 11 9 12 #include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" … … 12 15 #include <list> 13 16 #include <set> 14 15 #define NB_ITERATION 116 #define CYCLE_MAX (2048*NB_ITERATION)17 18 #define LABEL(str...) \19 { \20 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \21 msg (str); \22 msg (_("\n")); \23 } while(0)24 25 #define SC_START(cycle_offset) \26 do \27 { \28 /*cout << "SC_START (begin)" << endl;*/ \29 \30 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \31 if (cycle_offset != 0) \32 { \33 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \34 } \35 \36 if (cycle_current > CYCLE_MAX) \37 { \38 TEST_KO("Maximal cycles Reached"); \39 } \40 \41 sc_start(cycle_offset); \42 \43 /*cout << "SC_START (end )" << endl;*/ \44 } while(0)45 46 17 47 18 class entry_t … … 70 41 #endif 71 42 72 Ifetch_queue * _Ifetch_queue = new Ifetch_queue (name.c_str(), 43 Ifetch_queue * _Ifetch_queue = new Ifetch_queue 44 (name.c_str(), 73 45 #ifdef STATISTICS 74 46 _parameters_statistics, 75 47 #endif 76 _param); 48 _param, 49 USE_ALL); 77 50 78 51 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/include/Ifetch_queue.h
r81 r82 131 131 #endif 132 132 Parameters * param, 133 morpheo::behavioural::Tusage_t usage =USE_ALL133 morpheo::behavioural::Tusage_t usage 134 134 ); 135 135 public : ~Ifetch_queue (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/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_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/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 Ifetch_unit_Glue * _Ifetch_unit_Glue = new Ifetch_unit_Glue (name.c_str(), 25 Ifetch_unit_Glue * _Ifetch_unit_Glue = new Ifetch_unit_Glue 26 (name.c_str(), 54 27 #ifdef STATISTICS 55 28 _parameters_statistics, 56 29 #endif 57 _param); 30 _param, 31 USE_ALL); 58 32 59 33 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/include/Ifetch_unit_Glue.h
r81 r82 105 105 #endif 106 106 Parameters * param, 107 morpheo::behavioural::Tusage_t usage =USE_ALL107 morpheo::behavioural::Tusage_t usage 108 108 ); 109 109 public : ~Ifetch_unit_Glue (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_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_Front_end/Front_end/Ifetch_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 Ifetch_unit * _Ifetch_unit = new Ifetch_unit (name.c_str(), 25 Ifetch_unit * _Ifetch_unit = new Ifetch_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_Front_end/Front_end/Ifetch_unit/include/Ifetch_unit.h
r81 r82 136 136 #endif 137 137 Parameters * param, 138 morpheo::behavioural::Tusage_t usage =USE_ALL138 morpheo::behavioural::Tusage_t usage 139 139 ); 140 140 public : ~Ifetch_unit (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit_allocation.cpp
r81 r82 144 144 ,param_statistics 145 145 #endif 146 ,_param->_param_address_management); 146 ,_param->_param_address_management 147 ,_usage); 147 148 148 149 _component->set_component (_component_address_management->_component … … 162 163 ,param_statistics 163 164 #endif 164 ,_param->_param_ifetch_queue); 165 ,_param->_param_ifetch_queue 166 ,_usage); 165 167 166 168 _component->set_component (_component_ifetch_queue->_component … … 180 182 ,param_statistics 181 183 #endif 182 ,_param->_param_ifetch_unit_glue); 184 ,_param->_param_ifetch_unit_glue 185 ,_usage); 183 186 184 187 _component->set_component (_component_ifetch_unit_glue->_component -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/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_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/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 Branch_Target_Buffer_Glue * _Branch_Target_Buffer_Glue = new Branch_Target_Buffer_Glue (name.c_str(), 25 Branch_Target_Buffer_Glue * _Branch_Target_Buffer_Glue = new Branch_Target_Buffer_Glue 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_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/include/Branch_Target_Buffer_Glue.h
r81 r82 139 139 #endif 140 140 Parameters * param, 141 morpheo::behavioural::Tusage_t usage =USE_ALL141 morpheo::behavioural::Tusage_t usage 142 142 ); 143 143 public : ~Branch_Target_Buffer_Glue (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 1024 10 #define CYCLE_MAX (128*NB_ITERATION) 11 9 12 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 14 #include "Common/include/BitManipulation.h" 12 15 #include "Behavioural/include/Allocation.h" 13 14 #define NB_ITERATION 102415 #define CYCLE_MAX (128*NB_ITERATION)16 17 #define LABEL(str...) \18 { \19 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \20 msg (str); \21 msg (_("\n")); \22 } while(0)23 24 #define SC_START(cycle_offset) \25 do \26 { \27 /*cout << "SC_START (begin)" << endl;*/ \28 \29 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \30 if (cycle_offset != 0) \31 { \32 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \33 } \34 \35 if (cycle_current > CYCLE_MAX) \36 { \37 TEST_KO("Maximal cycles Reached"); \38 } \39 \40 sc_start(cycle_offset); \41 \42 /*cout << "SC_START (end )" << endl;*/ \43 } while(0)44 45 16 46 17 class entry_t … … 120 91 #endif 121 92 122 Branch_Target_Buffer_Register * _Branch_Target_Buffer_Register = new Branch_Target_Buffer_Register (name.c_str(), 93 Branch_Target_Buffer_Register * _Branch_Target_Buffer_Register = new Branch_Target_Buffer_Register 94 (name.c_str(), 123 95 #ifdef STATISTICS 124 96 _parameters_statistics, 125 97 #endif 126 _param); 98 _param, 99 USE_ALL); 127 100 128 101 #ifdef SYSTEMC … … 156 129 ALLOC1_SC_SIGNAL( in_DECOD_LAST_TAKE ," in_DECOD_LAST_TAKE ",Tcontrol_t ,_param->_nb_inst_decod); 157 130 ALLOC1_SC_SIGNAL( in_DECOD_MISS_PREDICTION ," in_DECOD_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_inst_decod); 131 ALLOC1_SC_SIGNAL( in_DECOD_IS_ACCURATE ," in_DECOD_IS_ACCURATE ",Tcontrol_t ,_param->_nb_inst_decod); 158 132 ALLOC1_SC_SIGNAL( in_UPDATE_VAL ," in_UPDATE_VAL ",Tcontrol_t ,_param->_nb_inst_update); 159 133 ALLOC1_SC_SIGNAL(out_UPDATE_ACK ,"out_UPDATE_ACK ",Tcontrol_t ,_param->_nb_inst_update); … … 191 165 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_VAL ,_param->_nb_inst_decod); 192 166 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_DECOD_ACK ,_param->_nb_inst_decod); 167 if (_param->_have_port_victim) 168 { 193 169 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_DECOD_HIT ,_param->_nb_inst_decod); 194 if (_param->_have_port_victim)195 170 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_DECOD_HIT_INDEX ,_param->_nb_inst_decod); 196 if (_param->_have_port_victim)197 171 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_VICTIM ,_param->_nb_inst_decod); 172 } 198 173 if (_param->_have_port_context_id) 199 174 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_CONTEXT_ID ,_param->_nb_inst_decod); … … 203 178 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_LAST_TAKE ,_param->_nb_inst_decod); 204 179 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_MISS_PREDICTION ,_param->_nb_inst_decod); 180 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_IS_ACCURATE ,_param->_nb_inst_decod); 205 181 206 182 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_UPDATE_VAL ,_param->_nb_inst_update); 207 183 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_UPDATE_ACK ,_param->_nb_inst_update); 184 if (_param->_have_port_victim) 185 { 208 186 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_UPDATE_HIT ,_param->_nb_inst_update); 209 if (_param->_have_port_victim)210 187 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_UPDATE_HIT_INDEX ,_param->_nb_inst_update); 211 if (_param->_have_port_victim)212 188 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_UPDATE_VICTIM ,_param->_nb_inst_update); 189 } 213 190 if (_param->_have_port_context_id) 214 191 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_UPDATE_CONTEXT_ID ,_param->_nb_inst_update); … … 297 274 in_DECOD_LAST_TAKE [i]->write(rand()%2); 298 275 in_DECOD_MISS_PREDICTION [i]->write(rand()%2); 276 in_DECOD_IS_ACCURATE [i]->write(rand()%2); 299 277 } 300 278 … … 478 456 delete [] in_DECOD_LAST_TAKE ; 479 457 delete [] in_DECOD_MISS_PREDICTION ; 458 delete [] in_DECOD_IS_ACCURATE ; 480 459 delete [] in_UPDATE_VAL ; 481 460 delete [] out_UPDATE_ACK ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/include/Branch_Target_Buffer_Register.h
r81 r82 87 87 public : SC_IN (Tcontrol_t ) ** in_DECOD_LAST_TAKE ; //[nb_inst_decod] 88 88 public : SC_IN (Tcontrol_t ) ** in_DECOD_MISS_PREDICTION ; //[nb_inst_decod] 89 public : SC_IN (Tcontrol_t ) ** in_DECOD_IS_ACCURATE ; //[nb_inst_decod] 89 90 90 91 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 134 135 #endif 135 136 Parameters * param, 136 morpheo::behavioural::Tusage_t usage =USE_ALL137 morpheo::behavioural::Tusage_t usage 137 138 ); 138 139 public : ~Branch_Target_Buffer_Register (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register.cpp
r81 r82 139 139 # endif 140 140 141 if (_param->_have_port_victim) 142 { 141 143 log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,"Method - genMealy_decod"); 142 144 … … 161 163 (*(out_DECOD_HIT [i])) (*(in_DECOD_CONTEXT_ID [i])); 162 164 163 if (_param->_have_port_victim)164 {165 165 (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_VAL [i])); 166 166 (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_ADDRESS_SRC [i])); 167 167 if (_param->_have_port_context_id) 168 168 (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_CONTEXT_ID [i])); 169 } 170 } 171 #endif 172 169 } 170 } 171 #endif 172 173 if (_param->_have_port_victim) 174 { 173 175 log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,"Method - genMealy_update"); 174 176 … … 193 195 (*(out_UPDATE_HIT [i])) (*(in_UPDATE_CONTEXT_ID [i])); 194 196 195 if (_param->_have_port_victim)196 {197 197 (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_VAL [i])); 198 198 (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_ADDRESS_SRC [i])); 199 199 if (_param->_have_port_context_id) 200 200 (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_CONTEXT_ID [i])); 201 201 } 202 202 } 203 203 # endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_allocation.cpp
r81 r82 84 84 ALLOC1_VALACK_IN ( in_DECOD_VAL ,VAL); 85 85 ALLOC1_VALACK_OUT(out_DECOD_ACK ,ACK); 86 if (_param->_have_port_victim) 87 { 86 88 ALLOC1_SIGNAL_OUT(out_DECOD_HIT ,"hit" ,Tcontrol_t ,1); 87 89 ALLOC1_SIGNAL_OUT(out_DECOD_HIT_INDEX ,"hit_index" ,Tptr_t ,_param->_size_victim); 88 90 ALLOC1_SIGNAL_IN ( in_DECOD_VICTIM ,"victim" ,Tptr_t ,_param->_size_victim); 91 } 89 92 ALLOC1_SIGNAL_IN ( in_DECOD_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id); 90 93 ALLOC1_SIGNAL_IN ( in_DECOD_ADDRESS_SRC ,"address_src" ,Tgeneral_data_t ,_param->_size_address); … … 93 96 ALLOC1_SIGNAL_IN ( in_DECOD_LAST_TAKE ,"last_take" ,Tcontrol_t ,1); 94 97 ALLOC1_SIGNAL_IN ( in_DECOD_MISS_PREDICTION,"miss_prediction",Tcontrol_t ,1); 98 ALLOC1_SIGNAL_IN ( in_DECOD_IS_ACCURATE ,"is_accurate" ,Tcontrol_t ,1); 95 99 } 96 100 … … 101 105 ALLOC1_VALACK_IN ( in_UPDATE_VAL ,VAL); 102 106 ALLOC1_VALACK_OUT(out_UPDATE_ACK ,ACK); 107 if (_param->_have_port_victim) 108 { 103 109 ALLOC1_SIGNAL_OUT(out_UPDATE_HIT ,"hit" ,Tcontrol_t ,1); 104 110 ALLOC1_SIGNAL_OUT(out_UPDATE_HIT_INDEX ,"hit_index" ,Tptr_t ,_param->_size_victim); 105 111 ALLOC1_SIGNAL_IN ( in_UPDATE_VICTIM ,"victim" ,Tptr_t ,_param->_size_victim); 112 } 106 113 ALLOC1_SIGNAL_IN ( in_UPDATE_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id); 107 114 ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS_SRC ,"address_src" ,Tgeneral_data_t ,_param->_size_address); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_deallocation.cpp
r81 r82 54 54 delete [] in_DECOD_LAST_TAKE ; 55 55 delete [] in_DECOD_MISS_PREDICTION ; 56 delete [] in_DECOD_IS_ACCURATE ; 56 57 delete [] in_UPDATE_VAL ; 57 58 delete [] out_UPDATE_ACK ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_decod.cpp
r81 r82 48 48 internal_DECOD_NUM_ENTRY [i] = num_entry; 49 49 50 if (_param->_have_port_victim) 51 { 50 52 PORT_WRITE(out_DECOD_HIT [i], hit); 51 if (_param->_have_port_victim)52 53 PORT_WRITE(out_DECOD_HIT_INDEX [i], num_entry); 54 } 53 55 } 54 56 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_update.cpp
r81 r82 48 48 internal_UPDATE_NUM_ENTRY [i] = num_entry; 49 49 50 if (_param->_have_port_victim) 51 { 50 52 PORT_WRITE(out_UPDATE_HIT [i], hit); 51 if (_param->_have_port_victim)52 53 PORT_WRITE(out_UPDATE_HIT_INDEX [i], num_entry); 54 } 53 55 } 54 56 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_transition.cpp
r81 r82 32 32 else 33 33 { 34 if (not _param->_have_port_victim) 35 { 36 genMealy_decod (); 37 genMealy_update (); 38 } 39 34 40 // ======================================================= 35 41 // =====[ PREDICT ]======================================= … … 66 72 reg_BTB[num_bank][num_entry]._condition = cond; 67 73 reg_BTB[num_bank][num_entry]._last_take = PORT_READ(in_DECOD_LAST_TAKE [i]); 68 reg_BTB[num_bank][num_entry]._accurate = _param->_first_accurate_if_hit;74 reg_BTB[num_bank][num_entry]._accurate = (PORT_READ(in_DECOD_IS_ACCURATE [i]))?_param->_first_accurate_if_hit:_param->_first_accurate_if_miss; 69 75 } 70 76 // else (hit) : no update -> it's not the last result of the branch … … 116 122 117 123 accurate_new = (miss_pred)?_param->_first_accurate_if_miss:_param->_first_accurate_if_hit; 124 125 reg_BTB[num_bank][num_entry]._val = 1; 126 reg_BTB[num_bank][num_entry]._context = (_param->_have_port_context_id)?PORT_READ(in_UPDATE_CONTEXT_ID [i]):0; 127 reg_BTB[num_bank][num_entry]._address_src = PORT_READ(in_UPDATE_ADDRESS_SRC [i]); 128 reg_BTB[num_bank][num_entry]._condition = PORT_READ(in_UPDATE_CONDITION [i]); 129 reg_BTB[num_bank][num_entry]._last_take = PORT_READ(in_UPDATE_LAST_TAKE [i]); 118 130 } 119 131 120 132 // =====[ All Case ] 121 reg_BTB[num_bank][num_entry]._val = 1; 122 reg_BTB[num_bank][num_entry]._context = (_param->_have_port_context_id)?PORT_READ(in_UPDATE_CONTEXT_ID [i]):0; 123 reg_BTB[num_bank][num_entry]._address_src = PORT_READ(in_UPDATE_ADDRESS_SRC [i]); 124 reg_BTB[num_bank][num_entry]._condition = PORT_READ(in_UPDATE_CONDITION [i]); 125 126 reg_BTB[num_bank][num_entry]._address_dest_val = 1; 127 reg_BTB[num_bank][num_entry]._address_dest = PORT_READ(in_UPDATE_ADDRESS_DEST [i]); 128 reg_BTB[num_bank][num_entry]._last_take = PORT_READ(in_UPDATE_LAST_TAKE [i]); 133 if (reg_BTB[num_bank][num_entry]._address_dest_val == 0) 134 { 135 reg_BTB[num_bank][num_entry]._address_dest_val = 1; 136 reg_BTB[num_bank][num_entry]._address_dest = PORT_READ(in_UPDATE_ADDRESS_DEST [i]); 137 } 129 138 reg_BTB[num_bank][num_entry]._accurate = accurate_new; 130 139 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 1024 10 #define CYCLE_MAX (128*NB_ITERATION) 11 9 12 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 14 #include "Behavioural/include/Allocation.h" 12 13 #define NB_ITERATION 102414 #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 Branch_Target_Buffer * _Branch_Target_Buffer = new Branch_Target_Buffer (name.c_str(), 25 Branch_Target_Buffer * _Branch_Target_Buffer = new Branch_Target_Buffer 26 (name.c_str(), 54 27 #ifdef STATISTICS 55 28 _parameters_statistics, 56 29 #endif 57 _param); 30 _param, 31 USE_ALL); 58 32 59 33 #ifdef SYSTEMC … … 84 58 ALLOC1_SC_SIGNAL( in_DECOD_LAST_TAKE ," in_DECOD_LAST_TAKE ",Tcontrol_t ,_param->_nb_inst_decod); 85 59 ALLOC1_SC_SIGNAL( in_DECOD_MISS_PREDICTION ," in_DECOD_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_inst_decod); 60 ALLOC1_SC_SIGNAL( in_DECOD_IS_ACCURATE ," in_DECOD_IS_ACCURATE ",Tcontrol_t ,_param->_nb_inst_decod); 86 61 ALLOC1_SC_SIGNAL( in_UPDATE_VAL ," in_UPDATE_VAL ",Tcontrol_t ,_param->_nb_inst_update); 87 62 ALLOC1_SC_SIGNAL(out_UPDATE_ACK ,"out_UPDATE_ACK ",Tcontrol_t ,_param->_nb_inst_update); … … 122 97 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer, in_DECOD_LAST_TAKE ,_param->_nb_inst_decod); 123 98 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer, in_DECOD_MISS_PREDICTION ,_param->_nb_inst_decod); 99 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer, in_DECOD_IS_ACCURATE ,_param->_nb_inst_decod); 124 100 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer, in_UPDATE_VAL ,_param->_nb_inst_update); 125 101 INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer,out_UPDATE_ACK ,_param->_nb_inst_update); … … 195 171 delete [] in_DECOD_LAST_TAKE ; 196 172 delete [] in_DECOD_MISS_PREDICTION ; 173 delete [] in_DECOD_IS_ACCURATE ; 197 174 198 175 delete [] in_UPDATE_VAL ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/include/Branch_Target_Buffer.h
r81 r82 90 90 public : SC_IN (Tcontrol_t ) ** in_DECOD_LAST_TAKE ; //[nb_inst_decod] 91 91 public : SC_IN (Tcontrol_t ) ** in_DECOD_MISS_PREDICTION ; //[nb_inst_decod] 92 public : SC_IN (Tcontrol_t ) ** in_DECOD_IS_ACCURATE ; //[nb_inst_decod] 92 93 93 94 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 130 131 #endif 131 132 Parameters * param, 132 morpheo::behavioural::Tusage_t usage =USE_ALL133 morpheo::behavioural::Tusage_t usage 133 134 ); 134 135 public : ~Branch_Target_Buffer (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_allocation.cpp
r81 r82 85 85 ALLOC1_SIGNAL_IN ( in_DECOD_LAST_TAKE ,"last_take" ,Tcontrol_t ,1); 86 86 ALLOC1_SIGNAL_IN ( in_DECOD_MISS_PREDICTION,"miss_prediction",Tcontrol_t ,1); 87 ALLOC1_SIGNAL_IN ( in_DECOD_IS_ACCURATE ,"is_accurate" ,Tcontrol_t ,1); 87 88 } 88 89 … … 111 112 { 112 113 name = _name+"_sort_"+toString(i); 113 std::cout << "Create : " << name << std::endl;114 log_printf(INFO,Prediction_unit,FUNCTION,_("Create : %s"),name.c_str()); 114 115 115 116 _component_sort [i] = new morpheo::behavioural::generic::sort::Sort … … 118 119 ,param_statistics 119 120 #endif 120 ,_param->_param_sort); 121 ,_param->_param_sort 122 ,_usage); 121 123 122 124 _component->set_component (_component_sort [i] ->_component … … 129 131 { 130 132 name = _name+"_victim"; 131 std::cout << "Create : " << name << std::endl;133 log_printf(INFO,Prediction_unit,FUNCTION,_("Create : %s"),name.c_str()); 132 134 133 135 _component_victim = new morpheo::behavioural::generic::victim::Victim … … 136 138 ,param_statistics 137 139 #endif 138 ,_param->_param_victim); 140 ,_param->_param_victim 141 ,_usage); 139 142 140 143 _component->set_component (_component_victim->_component … … 148 151 { 149 152 name = _name+"_glue"; 150 std::cout << "Create : " << name << std::endl;153 log_printf(INFO,Prediction_unit,FUNCTION,_("Create : %s"),name.c_str()); 151 154 152 155 _component_branch_target_buffer_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer::branch_target_buffer_glue::Branch_Target_Buffer_Glue … … 155 158 ,param_statistics 156 159 #endif 157 ,_param->_param_branch_target_buffer_glue); 160 ,_param->_param_branch_target_buffer_glue 161 ,_usage); 158 162 159 163 _component->set_component (_component_branch_target_buffer_glue->_component … … 166 170 { 167 171 name = _name+"_register"; 168 std::cout << "Create : " << name << std::endl;172 log_printf(INFO,Prediction_unit,FUNCTION,_("Create : %s"),name.c_str()); 169 173 170 174 _component_branch_target_buffer_register = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer::branch_target_buffer_register::Branch_Target_Buffer_Register … … 173 177 ,param_statistics 174 178 #endif 175 ,_param->_param_branch_target_buffer_register); 179 ,_param->_param_branch_target_buffer_register 180 ,_usage); 176 181 177 182 _component->set_component (_component_branch_target_buffer_register->_component … … 194 199 { 195 200 src = _name+"_sort_"+toString(i); 196 std::cout << "Instance : " << src << std::endl;201 log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str()); 197 202 198 203 { … … 230 235 { 231 236 src = _name+"_victim"; 232 std::cout << "Instance : " << src << std::endl;237 log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str()); 233 238 234 239 { … … 256 261 { 257 262 src = _name+"_glue"; 258 std::cout << "Instance : " << src << std::endl;263 log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str()); 259 264 260 265 { … … 312 317 313 318 COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_HIT" , 314 dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_HIT" );319 dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+ "_HIT" ); 315 320 COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_ADDRESS_SRC" , 316 dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_ADDRESS_SRC" );321 dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+ "_ADDRESS_SRC" ); 317 322 COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_ADDRESS_DEST", 318 dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_ADDRESS_DEST");323 dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+ "_ADDRESS_DEST"); 319 324 COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_CONDITION" , 320 dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_CONDITION" );325 dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+ "_CONDITION" ); 321 326 COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_LAST_TAKE" , 322 dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_LAST_TAKE" );327 dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+ "_LAST_TAKE" ); 323 328 COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_IS_ACCURATE" , 324 dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_IS_ACCURATE" );329 dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+ "_IS_ACCURATE" ); 325 330 } 326 331 … … 460 465 { 461 466 src = _name+"_register"; 462 std::cout << "Instance : " << src << std::endl;467 log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str()); 463 468 464 469 { … … 519 524 PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_MISS_PREDICTION", 520 525 dest, "in_DECOD_"+toString(i)+"_MISS_PREDICTION"); 526 PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_IS_ACCURATE", 527 dest, "in_DECOD_"+toString(i)+"_IS_ACCURATE"); 521 528 522 529 if (_param->_have_component_victim) … … 583 590 } 584 591 // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 585 _component->test_map();592 // _component->test_map(); 586 593 587 594 #ifdef POSITION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_deallocation.cpp
r81 r82 49 49 delete [] in_DECOD_LAST_TAKE ; 50 50 delete [] in_DECOD_MISS_PREDICTION ; 51 delete [] in_DECOD_IS_ACCURATE ; 51 52 52 53 delete [] in_UPDATE_VAL ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 1024 10 #define CYCLE_MAX (128*NB_ITERATION) 11 9 12 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" … … 12 15 #include "Behavioural/include/Allocation.h" 13 16 14 #define NB_ITERATION 102415 #define CYCLE_MAX (128*NB_ITERATION)16 17 #define LABEL(str...) \18 { \19 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \20 msg (str); \21 msg (_("\n")); \22 } while(0)23 24 #define SC_START(cycle_offset) \25 do \26 { \27 /*cout << "SC_START (begin)" << endl;*/ \28 \29 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \30 if (cycle_offset != 0) \31 { \32 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \33 } \34 \35 if (cycle_current > CYCLE_MAX) \36 { \37 TEST_KO("Maximal cycles Reached"); \38 } \39 \40 sc_start(cycle_offset); \41 \42 /*cout << "SC_START (end )" << endl;*/ \43 } while(0)44 45 17 void test (string name, 46 18 morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::direction_glue::Parameters * _param) … … 52 24 #endif 53 25 54 Direction_Glue * _Direction_Glue = new Direction_Glue (name.c_str(), 26 Direction_Glue * _Direction_Glue = new Direction_Glue 27 (name.c_str(), 55 28 #ifdef STATISTICS 56 _parameters_statistics, 57 #endif 58 _param); 29 _parameters_statistics, 30 #endif 31 _param, 32 USE_ALL); 59 33 60 34 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Direction_Glue.h
r81 r82 114 114 #endif 115 115 Parameters * param, 116 morpheo::behavioural::Tusage_t usage =USE_ALL116 morpheo::behavioural::Tusage_t usage 117 117 ); 118 118 public : ~Direction_Glue (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 1024 10 #define CYCLE_MAX (128*NB_ITERATION) 11 9 12 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" … … 12 15 #include "Behavioural/include/Allocation.h" 13 16 14 #define NB_ITERATION 102415 #define CYCLE_MAX (128*NB_ITERATION)16 17 #define LABEL(str...) \18 { \19 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \20 msg (str); \21 msg (_("\n")); \22 } while(0)23 24 #define SC_START(cycle_offset) \25 do \26 { \27 /*cout << "SC_START (begin)" << endl;*/ \28 \29 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \30 if (cycle_offset != 0) \31 { \32 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \33 } \34 \35 if (cycle_current > CYCLE_MAX) \36 { \37 TEST_KO("Maximal cycles Reached"); \38 } \39 \40 sc_start(cycle_offset); \41 \42 /*cout << "SC_START (end )" << endl;*/ \43 } while(0)44 45 17 void test (string name, 46 18 morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::Parameters * _param) … … 52 24 #endif 53 25 54 Direction * _Direction = new Direction (name.c_str(), 26 Direction * _Direction = new Direction 27 (name.c_str(), 55 28 #ifdef STATISTICS 56 _parameters_statistics, 57 #endif 58 _param); 29 _parameters_statistics, 30 #endif 31 _param, 32 USE_ALL); 59 33 60 34 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Direction.h
r81 r82 102 102 #endif 103 103 Parameters * param, 104 morpheo::behavioural::Tusage_t usage =USE_ALL104 morpheo::behavioural::Tusage_t usage 105 105 ); 106 106 public : ~Direction (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_allocation.cpp
r81 r82 21 21 #undef FUNCTION 22 22 #define FUNCTION "Direction::allocation" 23 void Direction::allocation ( 23 void Direction::allocation 24 ( 24 25 #ifdef STATISTICS 25 26 morpheo::behavioural::Parameters_Statistics * param_statistics 26 27 #else 27 28 void 28 29 #endif 29 30 ) 30 31 { 31 32 log_printf(FUNC,Direction,FUNCTION,"Begin"); … … 85 86 { 86 87 name = _name+"_glue"; 87 std::cout << "Create : " << name << std::endl;88 log_printf(INFO,Prediction_unit,FUNCTION,_("Create : %s"),name.c_str()); 88 89 89 90 _component_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::direction_glue::Direction_Glue … … 92 93 ,param_statistics 93 94 #endif 94 ,_param->_param_glue); 95 ,_param->_param_glue 96 ,_usage); 95 97 96 98 _component->set_component (_component_glue->_component … … 106 108 { 107 109 src = _name+"_glue"; 108 std::cout << "Instance : " << src << std::endl;110 log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str()); 109 111 110 112 { … … 177 179 } 178 180 // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 179 _component->test_map();181 // _component->test_map(); 180 182 181 183 #ifdef POSITION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Makefile.deps
r81 r82 25 25 include $(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/Makefile.deps 26 26 endif 27 ifndef Prediction_unit_Glue 28 include $(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/Makefile.deps 29 endif 27 30 28 31 #-----[ Directory ]---------------------------------------- … … 37 40 $(Direction_LIBRARY) \ 38 41 $(Return_Address_Stack_LIBRARY) \ 39 $(Update_Prediction_Table_LIBRARY) 40 42 $(Update_Prediction_Table_LIBRARY) \ 43 $(Prediction_unit_Glue_LIBRARY) 41 44 42 45 Prediction_unit_DIR_LIBRARY = -L$(Prediction_unit_DIR)/lib \ … … 45 48 $(Direction_DIR_LIBRARY) \ 46 49 $(Return_Address_Stack_DIR_LIBRARY) \ 47 $(Update_Prediction_Table_DIR_LIBRARY) 50 $(Update_Prediction_Table_DIR_LIBRARY) \ 51 $(Prediction_unit_Glue_DIR_LIBRARY) 48 52 49 53 … … 57 61 $(MAKE) Return_Address_Stack_library; \ 58 62 $(MAKE) Update_Prediction_Table_library; \ 63 $(MAKE) Prediction_unit_Glue_library; \ 59 64 $(MAKE) --directory=$(Prediction_unit_DIR) --makefile=Makefile; 60 65 … … 66 71 $(MAKE) Return_Address_Stack_library_clean; \ 67 72 $(MAKE) Update_Prediction_Table_library_clean; \ 73 $(MAKE) Prediction_unit_Glue_library_clean; \ 68 74 $(MAKE) --directory=$(Prediction_unit_DIR) --makefile=Makefile clean; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/config_mono_context.cfg
r81 r82 1 1 Prediction_unit_Glue 2 1 1 +1 # nb_context 3 30 30 +32 # size_address 4 1 4 *4 # nb_instruction [0] [nb_context] 5 1 4 *4 # size_depth [0] [nb_context] 6 1 1 *4 # nb_inst_predict 7 4 4 *4 # nb_inst_decod 8 4 4 *4 # nb_inst_update 2 1 1 *4 # nb_context 3 1 1 *4 # nb_decod_unit 4 30 30 +32 # size_address 5 1 1 *4 # nb_instruction [0] [nb_context] 6 1 1 *4 # size_depth [0] [nb_context] 7 4 4 *4 # nb_inst_decod [0] [nb_decod_unit] 8 1 1 *4 # nb_inst_branch_predict 9 4 4 *4 # nb_inst_branch_decod 10 4 4 *4 # nb_inst_branch_update -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/config_multi_context.cfg
r81 r82 1 1 Prediction_unit_Glue 2 4 4 +1 # nb_context 3 30 30 +32 # size_address 2 4 4 *4 # nb_context 3 1 1 *4 # nb_decod_unit 4 30 30 +32 # size_address 4 5 1 1 *4 # nb_instruction [0] [nb_context] 5 6 2 2 *4 # nb_instruction [1] [nb_context] … … 8 9 2 2 *4 # size_depth [0] [nb_context] 9 10 1 1 *4 # size_depth [1] [nb_context] 10 8 8*4 # size_depth [2] [nb_context]11 7 7 *4 # size_depth [2] [nb_context] 11 12 4 4 *4 # size_depth [3] [nb_context] 12 1 4 *4 # nb_inst_predict 13 4 4 *4 # nb_inst_decod 14 4 4 *4 # nb_inst_update 13 4 4 *4 # nb_inst_decod [0] [nb_decod_unit] 14 1 4 *4 # nb_inst_branch_predict 15 4 4 *4 # nb_inst_branch_decod 16 4 4 *4 # nb_inst_branch_update -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/src/main.cpp
r81 r82 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/include/test.h" 9 9 10 #define NB_PARAMS 510 #define NB_PARAMS 6 11 11 12 12 void usage (int argc, char * argv[]) … … 14 14 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 15 15 err (_("list_params is :\n")); 16 err (_(" * nb_context (uint32_t)\n")); 17 err (_(" * size_address (uint32_t)\n")); 18 err (_(" * nb_instruction [nb_context] (uint32_t)\n")); 19 err (_(" * size_depth [nb_context] (uint32_t)\n")); 20 err (_(" * nb_inst_predict (uint32_t)\n")); 21 err (_(" * nb_inst_decod (uint32_t)\n")); 22 err (_(" * nb_inst_update (uint32_t)\n")); 16 err (_(" * nb_context (uint32_t)\n")); 17 err (_(" * nb_decod_unit (uint32_t)\n")); 18 // err (_(" * nb_ooo_engine (uint32_t)\n")); 19 err (_(" * size_address (uint32_t)\n")); 20 err (_(" * nb_instruction [nb_context] (uint32_t)\n")); 21 err (_(" * size_depth [nb_context] (uint32_t)\n")); 22 err (_(" * nb_inst_decod [nb_decod_unit] (uint32_t)\n")); 23 // err (_(" * nb_inst_update [nb_ooo_engine] (uint32_t)\n")); 24 err (_(" * nb_inst_branch_predict (uint32_t)\n")); 25 err (_(" * nb_inst_branch_decod (uint32_t)\n")); 26 err (_(" * nb_inst_branch_update (uint32_t)\n")); 23 27 24 28 exit (1); … … 39 43 40 44 uint32_t _nb_context = fromString<uint32_t>(argv[x++]); 45 uint32_t _nb_decod_unit = fromString<uint32_t>(argv[x++]); 46 // uint32_t _nb_ooo_engine = fromString<uint32_t>(argv[x++]); 41 47 uint32_t _size_address = fromString<uint32_t>(argv[x++]); 42 48 43 if (argc != static_cast<int>(2+NB_PARAMS+2*_nb_context)) 49 if (argc != static_cast<int>(2+NB_PARAMS+2*_nb_context+_nb_decod_unit// +_nb_ooo_engine 50 )) 44 51 usage (argc, argv); 45 52 … … 50 57 for (uint32_t i=0; i<_nb_context; i++) 51 58 _size_depth [i] = fromString<uint32_t>(argv[x++]); 52 uint32_t _nb_inst_predict = fromString<uint32_t>(argv[x++]); 53 uint32_t _nb_inst_decod = fromString<uint32_t>(argv[x++]); 54 uint32_t _nb_inst_update = fromString<uint32_t>(argv[x++]); 59 uint32_t * _nb_inst_decod = new uint32_t [_nb_decod_unit]; 60 for (uint32_t i=0; i<_nb_decod_unit; i++) 61 _nb_inst_decod [i] = fromString<uint32_t>(argv[x++]); 62 // uint32_t * _nb_inst_update = new uint32_t [_nb_ooo_engine]; 63 // for (uint32_t i=0; i<_nb_ooo_engine; i++) 64 // _nb_inst_update [i] = fromString<uint32_t>(argv[x++]); 65 uint32_t _nb_inst_branch_predict = fromString<uint32_t>(argv[x++]); 66 uint32_t _nb_inst_branch_update = fromString<uint32_t>(argv[x++]); 67 uint32_t _nb_inst_branch_decod = fromString<uint32_t>(argv[x++]); 55 68 56 69 int _return = EXIT_SUCCESS; … … 58 71 { 59 72 morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue::Parameters 60 (_nb_context , 61 _size_address , 62 _nb_instruction , 63 _size_depth , 64 _nb_inst_predict, 65 _nb_inst_decod , 66 _nb_inst_update ); 73 (_nb_context , 74 _nb_decod_unit , 75 // _nb_ooo_engine , 76 _size_address , 77 _nb_instruction , 78 _size_depth , 79 _nb_inst_decod , 80 // _nb_inst_update , 81 _nb_inst_branch_predict, 82 _nb_inst_branch_decod , 83 _nb_inst_branch_update ); 67 84 68 85 msg(_("%s"),param->print(1).c_str()); … … 83 100 delete [] _nb_instruction; 84 101 delete [] _size_depth ; 102 delete [] _nb_inst_decod ; 103 // delete [] _nb_inst_update; 85 104 86 105 return (_return); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/src/test.cpp
r81 r82 63 63 ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_STATE ,"out_PREDICT_BRANCH_STATE ",Tbranch_state_t ,_param->_nb_context); 64 64 ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID ,"out_PREDICT_BRANCH_UPDATE_PREDICTION_ID",Tprediction_ptr_t ,_param->_nb_context); 65 ALLOC1_SC_SIGNAL(out_PREDICT_BTB_VAL ,"out_PREDICT_BTB_VAL ",Tcontrol_t ,_param->_nb_inst_ predict);66 ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ACK ," in_PREDICT_BTB_ACK ",Tcontrol_t ,_param->_nb_inst_ predict);67 ALLOC1_SC_SIGNAL(out_PREDICT_BTB_CONTEXT_ID ,"out_PREDICT_BTB_CONTEXT_ID ",Tcontext_t ,_param->_nb_inst_ predict);68 ALLOC1_SC_SIGNAL(out_PREDICT_BTB_ADDRESS ,"out_PREDICT_BTB_ADDRESS ",Taddress_t ,_param->_nb_inst_ predict);69 ALLOC1_SC_SIGNAL( in_PREDICT_BTB_HIT ," in_PREDICT_BTB_HIT ",Tcontrol_t ,_param->_nb_inst_ predict);70 ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC ," in_PREDICT_BTB_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_ predict);71 ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST ," in_PREDICT_BTB_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_ predict);72 ALLOC1_SC_SIGNAL( in_PREDICT_BTB_CONDITION ," in_PREDICT_BTB_CONDITION ",Tbranch_condition_t,_param->_nb_inst_ predict);73 //ALLOC1_SC_SIGNAL( in_PREDICT_BTB_LAST_TAKE ," in_PREDICT_BTB_LAST_TAKE ",Tcontrol_t ,_param->_nb_inst_ predict);74 ALLOC1_SC_SIGNAL( in_PREDICT_BTB_IS_ACCURATE ," in_PREDICT_BTB_IS_ACCURATE ",Tcontrol_t ,_param->_nb_inst_ predict);75 ALLOC1_SC_SIGNAL(out_PREDICT_DIR_VAL ,"out_PREDICT_DIR_VAL ",Tcontrol_t ,_param->_nb_inst_ predict);76 ALLOC1_SC_SIGNAL( in_PREDICT_DIR_ACK ," in_PREDICT_DIR_ACK ",Tcontrol_t ,_param->_nb_inst_ predict);77 ALLOC1_SC_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC ,"out_PREDICT_DIR_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_ predict);78 ALLOC1_SC_SIGNAL(out_PREDICT_DIR_STATIC ,"out_PREDICT_DIR_STATIC ",Tcontrol_t ,_param->_nb_inst_ predict);79 //ALLOC1_SC_SIGNAL(out_PREDICT_DIR_LAST_TAKE ,"out_PREDICT_DIR_LAST_TAKE ",Tcontrol_t ,_param->_nb_inst_ predict);80 //ALLOC1_SC_SIGNAL( in_PREDICT_DIR_HISTORY ," in_PREDICT_DIR_HISTORY ",Thistory_t ,_param->_nb_inst_ predict);81 ALLOC1_SC_SIGNAL( in_PREDICT_DIR_DIRECTION ," in_PREDICT_DIR_DIRECTION ",Tcontrol_t ,_param->_nb_inst_ predict);82 ALLOC1_SC_SIGNAL(out_PREDICT_RAS_VAL ,"out_PREDICT_RAS_VAL ",Tcontrol_t ,_param->_nb_inst_ predict);83 ALLOC1_SC_SIGNAL( in_PREDICT_RAS_ACK ," in_PREDICT_RAS_ACK ",Tcontrol_t ,_param->_nb_inst_ predict);84 ALLOC1_SC_SIGNAL(out_PREDICT_RAS_CONTEXT_ID ,"out_PREDICT_RAS_CONTEXT_ID ",Tcontext_t ,_param->_nb_inst_ predict);85 ALLOC1_SC_SIGNAL( in_PREDICT_RAS_HIT ," in_PREDICT_RAS_HIT ",Tcontrol_t ,_param->_nb_inst_ predict);86 ALLOC1_SC_SIGNAL(out_PREDICT_RAS_PUSH ,"out_PREDICT_RAS_PUSH ",Tcontrol_t ,_param->_nb_inst_ predict);87 ALLOC1_SC_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH ,"out_PREDICT_RAS_ADDRESS_PUSH ",Taddress_t ,_param->_nb_inst_ predict);88 ALLOC1_SC_SIGNAL( in_PREDICT_RAS_ADDRESS_POP ," in_PREDICT_RAS_ADDRESS_POP ",Taddress_t ,_param->_nb_inst_ predict);89 //ALLOC1_SC_SIGNAL( in_PREDICT_RAS_INDEX ," in_PREDICT_RAS_INDEX ",Tptr_t ,_param->_nb_inst_ predict);90 ALLOC1_SC_SIGNAL(out_PREDICT_UPT_VAL ,"out_PREDICT_UPT_VAL ",Tcontrol_t ,_param->_nb_inst_ predict);91 ALLOC1_SC_SIGNAL( in_PREDICT_UPT_ACK ," in_PREDICT_UPT_ACK ",Tcontrol_t ,_param->_nb_inst_ predict);92 ALLOC1_SC_SIGNAL(out_PREDICT_UPT_CONTEXT_ID ,"out_PREDICT_UPT_CONTEXT_ID ",Tcontext_t ,_param->_nb_inst_ predict);93 ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC ,"out_PREDICT_UPT_BTB_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_ predict);94 ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST ,"out_PREDICT_UPT_BTB_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_ predict);95 ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_CONDITION ,"out_PREDICT_UPT_BTB_CONDITION ",Tbranch_condition_t,_param->_nb_inst_ predict);96 ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE ,"out_PREDICT_UPT_BTB_LAST_TAKE ",Tcontrol_t ,_param->_nb_inst_ predict);97 ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE ,"out_PREDICT_UPT_BTB_IS_ACCURATE ",Tcontrol_t ,_param->_nb_inst_ predict);98 //ALLOC1_SC_SIGNAL(out_PREDICT_UPT_DIR_HISTORY ,"out_PREDICT_UPT_DIR_HISTORY ",Thistory_t ,_param->_nb_inst_ predict);99 ALLOC1_SC_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS ,"out_PREDICT_UPT_RAS_ADDRESS ",Taddress_t ,_param->_nb_inst_ predict);100 //ALLOC1_SC_SIGNAL(out_PREDICT_UPT_RAS_INDEX ,"out_PREDICT_UPT_RAS_INDEX ",Tptr_t ,_param->_nb_inst_ predict);65 ALLOC1_SC_SIGNAL(out_PREDICT_BTB_VAL ,"out_PREDICT_BTB_VAL ",Tcontrol_t ,_param->_nb_inst_branch_predict); 66 ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ACK ," in_PREDICT_BTB_ACK ",Tcontrol_t ,_param->_nb_inst_branch_predict); 67 ALLOC1_SC_SIGNAL(out_PREDICT_BTB_CONTEXT_ID ,"out_PREDICT_BTB_CONTEXT_ID ",Tcontext_t ,_param->_nb_inst_branch_predict); 68 ALLOC1_SC_SIGNAL(out_PREDICT_BTB_ADDRESS ,"out_PREDICT_BTB_ADDRESS ",Taddress_t ,_param->_nb_inst_branch_predict); 69 ALLOC1_SC_SIGNAL( in_PREDICT_BTB_HIT ," in_PREDICT_BTB_HIT ",Tcontrol_t ,_param->_nb_inst_branch_predict); 70 ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC ," in_PREDICT_BTB_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_predict); 71 ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST ," in_PREDICT_BTB_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_predict); 72 ALLOC1_SC_SIGNAL( in_PREDICT_BTB_CONDITION ," in_PREDICT_BTB_CONDITION ",Tbranch_condition_t,_param->_nb_inst_branch_predict); 73 //ALLOC1_SC_SIGNAL( in_PREDICT_BTB_LAST_TAKE ," in_PREDICT_BTB_LAST_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_predict); 74 ALLOC1_SC_SIGNAL( in_PREDICT_BTB_IS_ACCURATE ," in_PREDICT_BTB_IS_ACCURATE ",Tcontrol_t ,_param->_nb_inst_branch_predict); 75 ALLOC1_SC_SIGNAL(out_PREDICT_DIR_VAL ,"out_PREDICT_DIR_VAL ",Tcontrol_t ,_param->_nb_inst_branch_predict); 76 ALLOC1_SC_SIGNAL( in_PREDICT_DIR_ACK ," in_PREDICT_DIR_ACK ",Tcontrol_t ,_param->_nb_inst_branch_predict); 77 ALLOC1_SC_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC ,"out_PREDICT_DIR_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_predict); 78 ALLOC1_SC_SIGNAL(out_PREDICT_DIR_STATIC ,"out_PREDICT_DIR_STATIC ",Tcontrol_t ,_param->_nb_inst_branch_predict); 79 //ALLOC1_SC_SIGNAL(out_PREDICT_DIR_LAST_TAKE ,"out_PREDICT_DIR_LAST_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_predict); 80 //ALLOC1_SC_SIGNAL( in_PREDICT_DIR_HISTORY ," in_PREDICT_DIR_HISTORY ",Thistory_t ,_param->_nb_inst_branch_predict); 81 ALLOC1_SC_SIGNAL( in_PREDICT_DIR_DIRECTION ," in_PREDICT_DIR_DIRECTION ",Tcontrol_t ,_param->_nb_inst_branch_predict); 82 ALLOC1_SC_SIGNAL(out_PREDICT_RAS_VAL ,"out_PREDICT_RAS_VAL ",Tcontrol_t ,_param->_nb_inst_branch_predict); 83 ALLOC1_SC_SIGNAL( in_PREDICT_RAS_ACK ," in_PREDICT_RAS_ACK ",Tcontrol_t ,_param->_nb_inst_branch_predict); 84 ALLOC1_SC_SIGNAL(out_PREDICT_RAS_CONTEXT_ID ,"out_PREDICT_RAS_CONTEXT_ID ",Tcontext_t ,_param->_nb_inst_branch_predict); 85 ALLOC1_SC_SIGNAL( in_PREDICT_RAS_HIT ," in_PREDICT_RAS_HIT ",Tcontrol_t ,_param->_nb_inst_branch_predict); 86 ALLOC1_SC_SIGNAL(out_PREDICT_RAS_PUSH ,"out_PREDICT_RAS_PUSH ",Tcontrol_t ,_param->_nb_inst_branch_predict); 87 ALLOC1_SC_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH ,"out_PREDICT_RAS_ADDRESS_PUSH ",Taddress_t ,_param->_nb_inst_branch_predict); 88 ALLOC1_SC_SIGNAL( in_PREDICT_RAS_ADDRESS_POP ," in_PREDICT_RAS_ADDRESS_POP ",Taddress_t ,_param->_nb_inst_branch_predict); 89 //ALLOC1_SC_SIGNAL( in_PREDICT_RAS_INDEX ," in_PREDICT_RAS_INDEX ",Tptr_t ,_param->_nb_inst_branch_predict); 90 ALLOC1_SC_SIGNAL(out_PREDICT_UPT_VAL ,"out_PREDICT_UPT_VAL ",Tcontrol_t ,_param->_nb_inst_branch_predict); 91 ALLOC1_SC_SIGNAL( in_PREDICT_UPT_ACK ," in_PREDICT_UPT_ACK ",Tcontrol_t ,_param->_nb_inst_branch_predict); 92 ALLOC1_SC_SIGNAL(out_PREDICT_UPT_CONTEXT_ID ,"out_PREDICT_UPT_CONTEXT_ID ",Tcontext_t ,_param->_nb_inst_branch_predict); 93 ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC ,"out_PREDICT_UPT_BTB_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_predict); 94 ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST ,"out_PREDICT_UPT_BTB_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_predict); 95 ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_CONDITION ,"out_PREDICT_UPT_BTB_CONDITION ",Tbranch_condition_t,_param->_nb_inst_branch_predict); 96 ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE ,"out_PREDICT_UPT_BTB_LAST_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_predict); 97 ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE ,"out_PREDICT_UPT_BTB_IS_ACCURATE ",Tcontrol_t ,_param->_nb_inst_branch_predict); 98 //ALLOC1_SC_SIGNAL(out_PREDICT_UPT_DIR_HISTORY ,"out_PREDICT_UPT_DIR_HISTORY ",Thistory_t ,_param->_nb_inst_branch_predict); 99 ALLOC1_SC_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS ,"out_PREDICT_UPT_RAS_ADDRESS ",Taddress_t ,_param->_nb_inst_branch_predict); 100 //ALLOC1_SC_SIGNAL(out_PREDICT_UPT_RAS_INDEX ,"out_PREDICT_UPT_RAS_INDEX ",Tptr_t ,_param->_nb_inst_branch_predict); 101 101 ALLOC1_SC_SIGNAL( in_DEPTH_UPT_NB_BRANCH ," in_DEPTH_UPT_NB_BRANCH ",Tdepth_t ,_param->_nb_context); 102 102 ALLOC1_SC_SIGNAL( in_DEPTH_UPT_TAIL ," in_DEPTH_UPT_TAIL ",Tdepth_t ,_param->_nb_context); 103 ALLOC1_SC_SIGNAL(out_DEPTH_NB_BRANCH ,"out_DEPTH_NB_BRANCH ",Tdepth_t ,_param->_nb_context); 104 ALLOC1_SC_SIGNAL(out_DEPTH_TAIL ,"out_DEPTH_TAIL ",Tdepth_t ,_param->_nb_context); 105 106 ALLOC2_SC_SIGNAL( in_DECOD_VAL ," in_DECOD_VAL ",Tcontrol_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 107 ALLOC2_SC_SIGNAL(out_DECOD_ACK ,"out_DECOD_ACK ",Tcontrol_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 108 ALLOC2_SC_SIGNAL( in_DECOD_CONTEXT_ID ," in_DECOD_CONTEXT_ID ",Tcontext_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 109 ALLOC2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR ," in_DECOD_MATCH_INST_IFETCH_PTR ",Tcontrol_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 110 ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_STATE ," in_DECOD_BRANCH_STATE ",Tbranch_state_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 111 ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID," in_DECOD_BRANCH_UPDATE_PREDICTION_ID",Tprediction_ptr_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 112 ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION ," in_DECOD_BRANCH_CONDITION ",Tbranch_condition_t,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 113 ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION ," in_DECOD_BRANCH_DIRECTION ",Tcontrol_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 114 ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_SRC ," in_DECOD_ADDRESS_SRC ",Taddress_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 115 ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_DEST ," in_DECOD_ADDRESS_DEST ",Taddress_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 116 ALLOC1_SC_SIGNAL(out_DECOD_BTB_VAL ,"out_DECOD_BTB_VAL ",Tcontrol_t ,_param->_nb_inst_branch_decod); 117 ALLOC1_SC_SIGNAL( in_DECOD_BTB_ACK ," in_DECOD_BTB_ACK ",Tcontrol_t ,_param->_nb_inst_branch_decod); 118 ALLOC1_SC_SIGNAL(out_DECOD_BTB_CONTEXT_ID ,"out_DECOD_BTB_CONTEXT_ID ",Tcontext_t ,_param->_nb_inst_branch_decod); 119 ALLOC1_SC_SIGNAL(out_DECOD_BTB_ADDRESS_SRC ,"out_DECOD_BTB_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_decod); 120 ALLOC1_SC_SIGNAL(out_DECOD_BTB_ADDRESS_DEST ,"out_DECOD_BTB_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_decod); 121 ALLOC1_SC_SIGNAL(out_DECOD_BTB_CONDITION ,"out_DECOD_BTB_CONDITION ",Tbranch_condition_t,_param->_nb_inst_branch_decod); 122 ALLOC1_SC_SIGNAL(out_DECOD_BTB_LAST_TAKE ,"out_DECOD_BTB_LAST_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_decod); 123 ALLOC1_SC_SIGNAL(out_DECOD_BTB_MISS_PREDICTION ,"out_DECOD_BTB_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_inst_branch_decod); 124 ALLOC1_SC_SIGNAL(out_DECOD_BTB_IS_ACCURATE ,"out_DECOD_BTB_IS_ACCURATE ",Tcontrol_t ,_param->_nb_inst_branch_decod); 125 ALLOC1_SC_SIGNAL(out_DECOD_RAS_VAL ,"out_DECOD_RAS_VAL ",Tcontrol_t ,_param->_nb_inst_branch_decod); 126 ALLOC1_SC_SIGNAL( in_DECOD_RAS_ACK ," in_DECOD_RAS_ACK ",Tcontrol_t ,_param->_nb_inst_branch_decod); 127 ALLOC1_SC_SIGNAL(out_DECOD_RAS_CONTEXT_ID ,"out_DECOD_RAS_CONTEXT_ID ",Tcontext_t ,_param->_nb_inst_branch_decod); 128 ALLOC1_SC_SIGNAL( in_DECOD_RAS_HIT ," in_DECOD_RAS_HIT ",Tcontrol_t ,_param->_nb_inst_branch_decod); 129 ALLOC1_SC_SIGNAL(out_DECOD_RAS_PUSH ,"out_DECOD_RAS_PUSH ",Tcontrol_t ,_param->_nb_inst_branch_decod); 130 ALLOC1_SC_SIGNAL(out_DECOD_RAS_ADDRESS_PUSH ,"out_DECOD_RAS_ADDRESS_PUSH ",Taddress_t ,_param->_nb_inst_branch_decod); 131 ALLOC1_SC_SIGNAL( in_DECOD_RAS_ADDRESS_POP ," in_DECOD_RAS_ADDRESS_POP ",Taddress_t ,_param->_nb_inst_branch_decod); 132 //ALLOC1_SC_SIGNAL( in_DECOD_RAS_INDEX ," in_DECOD_RAS_INDEX ",Tptr_t ,_param->_nb_inst_branch_decod); 133 ALLOC1_SC_SIGNAL(out_DECOD_RAS_MISS_PREDICTION ,"out_DECOD_RAS_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_inst_branch_decod); 134 ALLOC1_SC_SIGNAL(out_DECOD_UPT_VAL ,"out_DECOD_UPT_VAL ",Tcontrol_t ,_param->_nb_inst_branch_decod); 135 ALLOC1_SC_SIGNAL( in_DECOD_UPT_ACK ," in_DECOD_UPT_ACK ",Tcontrol_t ,_param->_nb_inst_branch_decod); 136 ALLOC1_SC_SIGNAL(out_DECOD_UPT_CONTEXT_ID ,"out_DECOD_UPT_CONTEXT_ID ",Tcontext_t ,_param->_nb_inst_branch_decod); 137 ALLOC1_SC_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_SRC ,"out_DECOD_UPT_BTB_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_decod); 138 ALLOC1_SC_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_DEST ,"out_DECOD_UPT_BTB_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_decod); 139 ALLOC1_SC_SIGNAL(out_DECOD_UPT_BTB_CONDITION ,"out_DECOD_UPT_BTB_CONDITION ",Tbranch_condition_t,_param->_nb_inst_branch_decod); 140 ALLOC1_SC_SIGNAL(out_DECOD_UPT_BTB_LAST_TAKE ,"out_DECOD_UPT_BTB_LAST_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_decod); 141 ALLOC1_SC_SIGNAL(out_DECOD_UPT_RAS_ADDRESS ,"out_DECOD_UPT_RAS_ADDRESS ",Taddress_t ,_param->_nb_inst_branch_decod); 142 //ALLOC1_SC_SIGNAL(out_DECOD_UPT_RAS_INDEX ,"out_DECOD_UPT_RAS_INDEX ",Tptr_t ,_param->_nb_inst_branch_decod); 143 ALLOC1_SC_SIGNAL(out_DECOD_UPT_MISS_IFETCH ,"out_DECOD_UPT_MISS_IFETCH ",Tcontrol_t ,_param->_nb_inst_branch_decod); 144 ALLOC1_SC_SIGNAL(out_DECOD_UPT_MISS_DECOD ,"out_DECOD_UPT_MISS_DECOD ",Tcontrol_t ,_param->_nb_inst_branch_decod); 145 ALLOC1_SC_SIGNAL(out_DECOD_UPT_UPDATE_PREDICTION_ID ,"out_DECOD_UPT_UPDATE_PREDICTION_ID ",Tprediction_ptr_t ,_param->_nb_inst_branch_decod); 103 146 147 ALLOC1_SC_SIGNAL(out_UPDATE_BTB_VAL ,"out_UPDATE_BTB_VAL ",Tcontrol_t ,_param->_nb_inst_branch_update); 148 ALLOC1_SC_SIGNAL( in_UPDATE_BTB_ACK ," in_UPDATE_BTB_ACK ",Tcontrol_t ,_param->_nb_inst_branch_update); 149 //ALLOC1_SC_SIGNAL(out_UPDATE_BTB_CONTEXT_ID ,"out_UPDATE_BTB_CONTEXT_ID ",Tcontext_t ,_param->_nb_inst_branch_update); 150 //ALLOC1_SC_SIGNAL(out_UPDATE_BTB_ADDRESS_SRC ,"out_UPDATE_BTB_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_update); 151 //ALLOC1_SC_SIGNAL(out_UPDATE_BTB_ADDRESS_DEST ,"out_UPDATE_BTB_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_update); 152 //ALLOC1_SC_SIGNAL(out_UPDATE_BTB_CONDITION ,"out_UPDATE_BTB_CONDITION ",Tbranch_condition_t,_param->_nb_inst_branch_update); 153 //ALLOC1_SC_SIGNAL(out_UPDATE_BTB_LAST_TAKE ,"out_UPDATE_BTB_LAST_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_update); 154 //ALLOC1_SC_SIGNAL(out_UPDATE_BTB_MISS_PREDICTION ,"out_UPDATE_BTB_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_inst_branch_update); 155 ALLOC1_SC_SIGNAL(out_UPDATE_DIR_VAL ,"out_UPDATE_DIR_VAL ",Tcontrol_t ,_param->_nb_inst_branch_update); 156 ALLOC1_SC_SIGNAL( in_UPDATE_DIR_ACK ," in_UPDATE_DIR_ACK ",Tcontrol_t ,_param->_nb_inst_branch_update); 157 //ALLOC1_SC_SIGNAL(out_UPDATE_DIR_ADDRESS ,"out_UPDATE_DIR_ADDRESS ",Taddress_t ,_param->_nb_inst_branch_update); 158 //ALLOC1_SC_SIGNAL(out_UPDATE_DIR_HISTORY ,"out_UPDATE_DIR_HISTORY ",Thistory_t ,_param->_nb_inst_branch_update); 159 //ALLOC1_SC_SIGNAL(out_UPDATE_DIR_DIRECTION ,"out_UPDATE_DIR_DIRECTION ",Tcontrol_t ,_param->_nb_inst_branch_update); 160 ALLOC1_SC_SIGNAL(out_UPDATE_RAS_VAL ,"out_UPDATE_RAS_VAL ",Tcontrol_t ,_param->_nb_inst_branch_update); 161 ALLOC1_SC_SIGNAL( in_UPDATE_RAS_ACK ," in_UPDATE_RAS_ACK ",Tcontrol_t ,_param->_nb_inst_branch_update); 162 //ALLOC1_SC_SIGNAL(out_UPDATE_RAS_CONTEXT_ID ,"out_UPDATE_RAS_CONTEXT_ID ",Tcontext_t ,_param->_nb_inst_branch_update); 163 //ALLOC1_SC_SIGNAL(out_UPDATE_RAS_PUSH ,"out_UPDATE_RAS_PUSH ",Tcontrol_t ,_param->_nb_inst_branch_update); 164 //ALLOC1_SC_SIGNAL(out_UPDATE_RAS_ADDRESS ,"out_UPDATE_RAS_ADDRESS ",Taddress_t ,_param->_nb_inst_branch_update); 165 //ALLOC1_SC_SIGNAL(out_UPDATE_RAS_INDEX ,"out_UPDATE_RAS_INDEX ",Tptr_t ,_param->_nb_inst_branch_update); 166 //ALLOC1_SC_SIGNAL(out_UPDATE_RAS_MISS_PREDICTION ,"out_UPDATE_RAS_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_inst_branch_update); 167 //ALLOC1_SC_SIGNAL(out_UPDATE_RAS_PREDICTION_IFETCH ,"out_UPDATE_RAS_PREDICTION_IFETCH ",Tcontrol_t ,_param->_nb_inst_branch_update); 168 ALLOC1_SC_SIGNAL( in_UPDATE_UPT_VAL ," in_UPDATE_UPT_VAL ",Tcontrol_t ,_param->_nb_inst_branch_update); 169 ALLOC1_SC_SIGNAL(out_UPDATE_UPT_ACK ,"out_UPDATE_UPT_ACK ",Tcontrol_t ,_param->_nb_inst_branch_update); 170 //ALLOC1_SC_SIGNAL( in_UPDATE_UPT_CONTEXT_ID ," in_UPDATE_UPT_CONTEXT_ID ",Tcontext_t ,_param->_nb_inst_branch_update); 171 //ALLOC1_SC_SIGNAL( in_UPDATE_UPT_MISS_PREDICTION ," in_UPDATE_UPT_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_inst_branch_update); 172 //ALLOC1_SC_SIGNAL( in_UPDATE_UPT_DIRECTION_GOOD ," in_UPDATE_UPT_DIRECTION_GOOD ",Tcontrol_t ,_param->_nb_inst_branch_update); 173 ALLOC1_SC_SIGNAL( in_UPDATE_UPT_BTB_VAL ," in_UPDATE_UPT_BTB_VAL ",Tcontrol_t ,_param->_nb_inst_branch_update); 174 //ALLOC1_SC_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_SRC ," in_UPDATE_UPT_BTB_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_update); 175 //ALLOC1_SC_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_DEST ," in_UPDATE_UPT_BTB_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_update); 176 //ALLOC1_SC_SIGNAL( in_UPDATE_UPT_BTB_CONDITION ," in_UPDATE_UPT_BTB_CONDITION ",Tbranch_condition_t,_param->_nb_inst_branch_update); 177 ALLOC1_SC_SIGNAL( in_UPDATE_UPT_DIR_VAL ," in_UPDATE_UPT_DIR_VAL ",Tcontrol_t ,_param->_nb_inst_branch_update); 178 //ALLOC1_SC_SIGNAL( in_UPDATE_UPT_DIR_HISTORY ," in_UPDATE_UPT_DIR_HISTORY ",Thistory_t ,_param->_nb_inst_branch_update); 179 ALLOC1_SC_SIGNAL( in_UPDATE_UPT_RAS_VAL ," in_UPDATE_UPT_RAS_VAL ",Tcontrol_t ,_param->_nb_inst_branch_update); 180 //ALLOC1_SC_SIGNAL( in_UPDATE_UPT_RAS_PUSH ," in_UPDATE_UPT_RAS_PUSH ",Tcontrol_t ,_param->_nb_inst_branch_update); 181 //ALLOC1_SC_SIGNAL( in_UPDATE_UPT_RAS_ADDRESS ," in_UPDATE_UPT_RAS_ADDRESS ",Taddress_t ,_param->_nb_inst_branch_update); 182 //ALLOC1_SC_SIGNAL( in_UPDATE_UPT_RAS_INDEX ," in_UPDATE_UPT_RAS_INDEX ",Tptr_t ,_param->_nb_inst_branch_update); 183 //ALLOC1_SC_SIGNAL( in_UPDATE_UPT_RAS_PREDICTION_IFETCH," in_UPDATE_UPT_RAS_PREDICTION_IFETCH",Tcontrol_t ,_param->_nb_inst_branch_update); 184 104 185 /******************************************************** 105 186 * Instanciation … … 119 200 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_PC_NEXT_IS_DS_TAKE ,_param->_nb_context); 120 201 INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_INSTRUCTION_ENABLE ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]); 202 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BRANCH_STATE ,_param->_nb_context); 121 203 for (uint32_t i=0; i<_param->_nb_context; i++) 122 204 { … … 126 208 INSTANCE_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i]); 127 209 } 128 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BRANCH_STATE ,_param->_nb_context); 129 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_VAL ,_param->_nb_inst_ predict);130 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ACK ,_param->_nb_inst_ predict);210 211 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_VAL ,_param->_nb_inst_branch_predict); 212 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ACK ,_param->_nb_inst_branch_predict); 131 213 if (_param->_have_port_context_id) 132 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_CONTEXT_ID ,_param->_nb_inst_predict); 133 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_ADDRESS ,_param->_nb_inst_predict); 134 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_HIT ,_param->_nb_inst_predict); 135 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ADDRESS_SRC ,_param->_nb_inst_predict); 136 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ADDRESS_DEST ,_param->_nb_inst_predict); 137 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_CONDITION ,_param->_nb_inst_predict); 138 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_LAST_TAKE ,_param->_nb_inst_predict); 139 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_IS_ACCURATE ,_param->_nb_inst_predict); 140 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_VAL ,_param->_nb_inst_predict); 141 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_ACK ,_param->_nb_inst_predict); 142 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_ADDRESS_SRC ,_param->_nb_inst_predict); 143 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_STATIC ,_param->_nb_inst_predict); 144 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_LAST_TAKE ,_param->_nb_inst_predict); 145 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_HISTORY ,_param->_nb_inst_predict); 146 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_DIRECTION ,_param->_nb_inst_predict); 147 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_VAL ,_param->_nb_inst_predict); 148 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_ACK ,_param->_nb_inst_predict); 214 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_CONTEXT_ID ,_param->_nb_inst_branch_predict); 215 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_ADDRESS ,_param->_nb_inst_branch_predict); 216 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_HIT ,_param->_nb_inst_branch_predict); 217 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_predict); 218 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_predict); 219 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_CONDITION ,_param->_nb_inst_branch_predict); 220 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_LAST_TAKE ,_param->_nb_inst_branch_predict); 221 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_IS_ACCURATE ,_param->_nb_inst_branch_predict); 222 223 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_VAL ,_param->_nb_inst_branch_predict); 224 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_ACK ,_param->_nb_inst_branch_predict); 225 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_ADDRESS_SRC ,_param->_nb_inst_branch_predict); 226 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_STATIC ,_param->_nb_inst_branch_predict); 227 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_LAST_TAKE ,_param->_nb_inst_branch_predict); 228 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_HISTORY ,_param->_nb_inst_branch_predict); 229 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_DIRECTION ,_param->_nb_inst_branch_predict); 230 231 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_VAL ,_param->_nb_inst_branch_predict); 232 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_ACK ,_param->_nb_inst_branch_predict); 233 149 234 if (_param->_have_port_context_id) 150 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_CONTEXT_ID ,_param->_nb_inst_ predict);151 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_HIT ,_param->_nb_inst_ predict);152 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_PUSH ,_param->_nb_inst_ predict);153 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_ADDRESS_PUSH ,_param->_nb_inst_ predict);154 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_ADDRESS_POP ,_param->_nb_inst_ predict);155 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_INDEX ,_param->_nb_inst_ predict);156 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_VAL ,_param->_nb_inst_ predict);157 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_UPT_ACK ,_param->_nb_inst_ predict);235 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_CONTEXT_ID ,_param->_nb_inst_branch_predict); 236 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_HIT ,_param->_nb_inst_branch_predict); 237 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_PUSH ,_param->_nb_inst_branch_predict); 238 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_ADDRESS_PUSH ,_param->_nb_inst_branch_predict); 239 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_ADDRESS_POP ,_param->_nb_inst_branch_predict); 240 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_INDEX ,_param->_nb_inst_branch_predict); 241 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_VAL ,_param->_nb_inst_branch_predict); 242 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_UPT_ACK ,_param->_nb_inst_branch_predict); 158 243 if (_param->_have_port_context_id) 159 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_CONTEXT_ID ,_param->_nb_inst_predict); 160 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_predict); 161 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_predict); 162 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_CONDITION ,_param->_nb_inst_predict); 163 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_LAST_TAKE ,_param->_nb_inst_predict); 164 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_IS_ACCURATE ,_param->_nb_inst_predict); 165 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_DIR_HISTORY ,_param->_nb_inst_predict); 166 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_RAS_ADDRESS ,_param->_nb_inst_predict); 167 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_RAS_INDEX ,_param->_nb_inst_predict); 244 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_CONTEXT_ID ,_param->_nb_inst_branch_predict); 245 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_predict); 246 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_predict); 247 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_CONDITION ,_param->_nb_inst_branch_predict); 248 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_LAST_TAKE ,_param->_nb_inst_branch_predict); 249 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_IS_ACCURATE ,_param->_nb_inst_branch_predict); 250 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_DIR_HISTORY ,_param->_nb_inst_branch_predict); 251 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_RAS_ADDRESS ,_param->_nb_inst_branch_predict); 252 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_RAS_INDEX ,_param->_nb_inst_branch_predict); 253 254 INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_VAL ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 255 INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_ACK ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 256 if (_param->_have_port_context_id) 257 INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_CONTEXT_ID ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 258 INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_MATCH_INST_IFETCH_PTR ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 259 INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BRANCH_STATE ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 260 if (_param->_have_port_max_depth) 261 INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 262 INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BRANCH_CONDITION ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 263 INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BRANCH_DIRECTION ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 264 INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_ADDRESS_SRC ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 265 INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_ADDRESS_DEST ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 266 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_VAL ,_param->_nb_inst_branch_decod); 267 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BTB_ACK ,_param->_nb_inst_branch_decod); 268 if (_param->_have_port_context_id) 269 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_CONTEXT_ID ,_param->_nb_inst_branch_decod); 270 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_decod); 271 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_decod); 272 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_CONDITION ,_param->_nb_inst_branch_decod); 273 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_LAST_TAKE ,_param->_nb_inst_branch_decod); 274 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_MISS_PREDICTION ,_param->_nb_inst_branch_decod); 275 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_IS_ACCURATE ,_param->_nb_inst_branch_decod); 276 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_RAS_VAL ,_param->_nb_inst_branch_decod); 277 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_RAS_ACK ,_param->_nb_inst_branch_decod); 278 if (_param->_have_port_context_id) 279 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_RAS_CONTEXT_ID ,_param->_nb_inst_branch_decod); 280 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_RAS_HIT ,_param->_nb_inst_branch_decod); 281 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_RAS_PUSH ,_param->_nb_inst_branch_decod); 282 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_RAS_ADDRESS_PUSH ,_param->_nb_inst_branch_decod); 283 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_RAS_ADDRESS_POP ,_param->_nb_inst_branch_decod); 284 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_RAS_INDEX ,_param->_nb_inst_branch_decod); 285 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_RAS_MISS_PREDICTION ,_param->_nb_inst_branch_decod); 286 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_VAL ,_param->_nb_inst_branch_decod); 287 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_UPT_ACK ,_param->_nb_inst_branch_decod); 288 if (_param->_have_port_context_id) 289 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_CONTEXT_ID ,_param->_nb_inst_branch_decod); 290 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_decod); 291 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_decod); 292 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_BTB_CONDITION ,_param->_nb_inst_branch_decod); 293 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_BTB_LAST_TAKE ,_param->_nb_inst_branch_decod); 294 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_RAS_ADDRESS ,_param->_nb_inst_branch_decod); 295 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_RAS_INDEX ,_param->_nb_inst_branch_decod); 296 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_MISS_IFETCH ,_param->_nb_inst_branch_decod); 297 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_MISS_DECOD ,_param->_nb_inst_branch_decod); 298 if (_param->_have_port_max_depth) 299 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_UPDATE_PREDICTION_ID ,_param->_nb_inst_branch_decod); 300 301 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_VAL ,_param->_nb_inst_branch_update); 302 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_BTB_ACK ,_param->_nb_inst_branch_update); 303 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_CONTEXT_ID ,_param->_nb_inst_branch_update); 304 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_update); 305 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_update); 306 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_CONDITION ,_param->_nb_inst_branch_update); 307 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_LAST_TAKE ,_param->_nb_inst_branch_update); 308 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_MISS_PREDICTION ,_param->_nb_inst_branch_update); 309 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_DIR_VAL ,_param->_nb_inst_branch_update); 310 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_DIR_ACK ,_param->_nb_inst_branch_update); 311 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_DIR_ADDRESS ,_param->_nb_inst_branch_update); 312 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_DIR_HISTORY ,_param->_nb_inst_branch_update); 313 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_DIR_DIRECTION ,_param->_nb_inst_branch_update); 314 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_VAL ,_param->_nb_inst_branch_update); 315 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_RAS_ACK ,_param->_nb_inst_branch_update); 316 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_CONTEXT_ID ,_param->_nb_inst_branch_update); 317 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_PUSH ,_param->_nb_inst_branch_update); 318 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_ADDRESS ,_param->_nb_inst_branch_update); 319 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_INDEX ,_param->_nb_inst_branch_update); 320 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_MISS_PREDICTION ,_param->_nb_inst_branch_update); 321 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_PREDICTION_IFETCH ,_param->_nb_inst_branch_update); 322 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_VAL ,_param->_nb_inst_branch_update); 323 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_UPT_ACK ,_param->_nb_inst_branch_update); 324 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_CONTEXT_ID ,_param->_nb_inst_branch_update); 325 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_MISS_PREDICTION ,_param->_nb_inst_branch_update); 326 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_DIRECTION_GOOD ,_param->_nb_inst_branch_update); 327 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_BTB_VAL ,_param->_nb_inst_branch_update); 328 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_update); 329 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_update); 330 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_BTB_CONDITION ,_param->_nb_inst_branch_update); 331 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_DIR_VAL ,_param->_nb_inst_branch_update); 332 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_DIR_HISTORY ,_param->_nb_inst_branch_update); 333 INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_RAS_VAL ,_param->_nb_inst_branch_update); 334 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_RAS_PUSH ,_param->_nb_inst_branch_update); 335 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_RAS_ADDRESS ,_param->_nb_inst_branch_update); 336 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_RAS_INDEX ,_param->_nb_inst_branch_update); 337 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_RAS_PREDICTION_IFETCH,_param->_nb_inst_branch_update); 338 168 339 for (uint32_t i=0; i<_param->_nb_context; i++) 169 340 { 170 341 if (_param->_have_port_depth [i]) 171 342 { 343 INSTANCE_SC_SIGNAL(_Prediction_unit_Glue, in_DEPTH_UPT_TAIL [i]); 344 INSTANCE_SC_SIGNAL(_Prediction_unit_Glue,out_DEPTH_TAIL [i]); 345 } 172 346 INSTANCE_SC_SIGNAL(_Prediction_unit_Glue, in_DEPTH_UPT_NB_BRANCH [i]); 173 INSTANCE_SC_SIGNAL(_Prediction_unit_Glue, in_DEPTH_UPT_TAIL [i]); 174 } 347 INSTANCE_SC_SIGNAL(_Prediction_unit_Glue,out_DEPTH_NB_BRANCH [i]); 175 348 } 176 349 … … 191 364 192 365 int32_t percent_transaction_predict = 75; 366 int32_t percent_transaction_decod = 75; 193 367 194 368 SC_START(0); … … 199 373 for (uint32_t i=0; i<_param->_nb_context; i++) 200 374 in_PREDICT_VAL [i]->write(0); 201 for (uint32_t i=0; i<_param->_nb_inst_ predict; i++)375 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 202 376 { 203 377 in_PREDICT_BTB_ACK [i]->write(0); … … 208 382 in_PREDICT_BTB_IS_ACCURATE [i]->write(1); 209 383 } 384 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 385 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 386 in_DECOD_VAL [i][j]->write(0); 210 387 211 388 in_NRESET->write(0); … … 237 414 do 238 415 { 239 for (uint32_t j=0; j<_param->_nb_inst_ predict; j++)416 for (uint32_t j=0; j<_param->_nb_inst_branch_predict; j++) 240 417 in_PREDICT_BTB_ACK [j]->write(0); 241 418 … … 245 422 246 423 uint32_t port; 247 for (port=0; port<_param->_nb_inst_ predict; port++)424 for (port=0; port<_param->_nb_inst_branch_predict; port++) 248 425 { 249 426 if (_param->_have_port_context_id) … … 289 466 for (uint32_t i=0; i<_param->_nb_context; i++) 290 467 in_PREDICT_VAL [i]->write(0); 291 for (uint32_t i=0; i<_param->_nb_inst_ predict; i++)468 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 292 469 { 293 470 in_PREDICT_BTB_ACK [i]->write(0); … … 319 496 do 320 497 { 321 for (uint32_t j=0; j<_param->_nb_inst_ predict; j++)498 for (uint32_t j=0; j<_param->_nb_inst_branch_predict; j++) 322 499 in_PREDICT_BTB_ACK [j]->write(0); 323 500 … … 327 504 328 505 uint32_t port; 329 for (port=0; port<_param->_nb_inst_ predict; port++)506 for (port=0; port<_param->_nb_inst_branch_predict; port++) 330 507 { 331 508 if (_param->_have_port_context_id) … … 355 532 356 533 TEST(Taddress_t ,out_PREDICT_PC_NEXT [context]->read(),addr_dest); 357 // TEST(Tcontrol_t ,out_PREDICT_PC_NEXT_IS_DS_TAKE [context]->read(),0);534 TEST(Tcontrol_t ,out_PREDICT_PC_NEXT_IS_DS_TAKE [context]->read(),i==(_param->_nb_instruction [context]-1)); 358 535 TEST(Tinst_ifetch_ptr_t,out_PREDICT_INST_IFETCH_PTR [context]->read(),i); 359 536 TEST(Tbranch_state_t ,out_PREDICT_BRANCH_STATE [context]->read(),BRANCH_STATE_NSPEC_TAKE); 360 537 // TEST(Tprediction_ptr_t ,out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [context]->read(),0); 361 362 // for (uint32_t j=0; j<i; j++) 363 // TEST(Tcontrol_t ,out_PREDICT_INSTRUCTION_ENABLE [context][j]->read(),0); 364 // for (uint32_t j=i; j<_param->_nb_instruction[context]; j++) 365 // TEST(Tcontrol_t ,out_PREDICT_INSTRUCTION_ENABLE [context][j]->read(),1); 366 538 539 uint32_t k=((addr_src%_param->_nb_instruction[context])==_param->_nb_instruction[context]-1)?_param->_nb_instruction[context]:((addr_src%_param->_nb_instruction[context])+2); 540 LABEL("instruction enable : "); 541 LABEL(" [0:%d[ = 1",k); 542 LABEL(" [%d:%d[ = 1",k,_param->_nb_instruction[context]); 543 for (uint32_t j=0; j<k; j++) 544 TEST(Tcontrol_t ,out_PREDICT_INSTRUCTION_ENABLE [context][j]->read(),1); 545 for (uint32_t j=k; j<_param->_nb_instruction[context]; j++) 546 TEST(Tcontrol_t ,out_PREDICT_INSTRUCTION_ENABLE [context][j]->read(),0); 547 367 548 TEST(Tcontrol_t ,out_PREDICT_BTB_VAL [port]->read(),1); 368 549 TEST(Tcontext_t ,out_PREDICT_BTB_CONTEXT_ID [port]->read(),context); 369 550 TEST(Taddress_t ,out_PREDICT_BTB_ADDRESS [port]->read(),addr); 370 551 } 371 552 372 553 SC_START(1); 373 554 … … 376 557 for (uint32_t i=0; i<_param->_nb_context; i++) 377 558 in_PREDICT_VAL [i]->write(0); 378 for (uint32_t i=0; i<_param->_nb_inst_ predict; i++)559 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 379 560 { 380 561 in_PREDICT_BTB_ACK [i]->write(0); … … 386 567 } 387 568 569 { 570 LABEL("Decod - Ok"); 571 uint32_t decod_unit = rand()%_param->_nb_decod_unit; 572 LABEL("decod_unit : %d",decod_unit); 573 574 for (uint32_t i=0; i<_param->_nb_inst_decod[i];i++) 575 { 576 Tcontext_t context = i%_param->_nb_context; 577 in_DECOD_CONTEXT_ID [decod_unit][i]->write(context); 578 in_DECOD_MATCH_INST_IFETCH_PTR [decod_unit][i]->write(1); 579 in_DECOD_BRANCH_STATE [decod_unit][i]->write(BRANCH_STATE_NSPEC_TAKE); 580 581 bool find = false; 582 do 583 { 584 in_DECOD_VAL [decod_unit][i]->write((rand()%100)<percent_transaction_decod); 585 in_DECOD_BRANCH_UPDATE_PREDICTION_ID [decod_unit][i]->write(rand()%_param->_size_depth[context]); 586 587 in_DECOD_BTB_ACK[0]->write((rand()%100)<percent_transaction_decod); 588 in_DECOD_RAS_ACK[0]->write((rand()%100)<percent_transaction_decod); 589 in_DECOD_UPT_ACK[0]->write((rand()%100)<percent_transaction_decod); 590 591 SC_START(0); 592 593 LABEL("DECOD[%d][%d] - %d %d",decod_unit,i,in_DECOD_VAL[decod_unit][i]->read(),out_DECOD_ACK[decod_unit][i]->read()); 594 if (in_DECOD_VAL[decod_unit][i]->read() and out_DECOD_ACK[decod_unit][i]->read()) 595 { 596 LABEL("DECOD[%d][%d] - Transaction Accepted",decod_unit,i); 597 TEST(Tcontrol_t, in_DECOD_UPT_ACK[0]->read(),1); 598 TEST(Tcontrol_t,out_DECOD_BTB_VAL[0]->read(),0); 599 TEST(Tcontrol_t,out_DECOD_RAS_VAL[0]->read(),0); 600 TEST(Tcontrol_t,out_DECOD_UPT_VAL[0]->read(),1); 601 find = true; 602 } 603 604 SC_START(1); 605 606 } while (not find); 607 608 in_DECOD_VAL [decod_unit][i]->write(0); 609 in_DECOD_BTB_ACK[0]->write(0); 610 in_DECOD_RAS_ACK[0]->write(0); 611 in_DECOD_UPT_ACK[0]->write(0); 612 } 613 } 614 615 { 616 LABEL("Decod - Ko"); 617 uint32_t decod_unit = rand()%_param->_nb_decod_unit; 618 LABEL("decod_unit : %d",decod_unit); 619 620 for (uint32_t i=0; i<_param->_nb_inst_decod[i];i++) 621 { 622 Tcontext_t context = i%_param->_nb_context; 623 in_DECOD_CONTEXT_ID [decod_unit][i]->write(context); 624 in_DECOD_MATCH_INST_IFETCH_PTR [decod_unit][i]->write(0); 625 in_DECOD_BRANCH_STATE [decod_unit][i]->write(BRANCH_STATE_SPEC_TAKE); 626 in_DECOD_BRANCH_UPDATE_PREDICTION_ID [decod_unit][i]->write(i%_param->_max_size_depth); 627 in_DECOD_BRANCH_CONDITION [decod_unit][i]->write(BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK); 628 in_DECOD_BRANCH_DIRECTION [decod_unit][i]->write(1); 629 in_DECOD_ADDRESS_SRC [decod_unit][i]->write(0xdeadbeef+i); 630 in_DECOD_ADDRESS_DEST [decod_unit][i]->write(0x11061979+i); 631 632 633 bool find = false; 634 do 635 { 636 in_DECOD_VAL [decod_unit][i]->write((rand()%100)<percent_transaction_decod); 637 638 in_DECOD_BTB_ACK[0]->write((rand()%100)<percent_transaction_decod); 639 in_DECOD_RAS_ACK[0]->write((rand()%100)<percent_transaction_decod); 640 in_DECOD_UPT_ACK[0]->write((rand()%100)<percent_transaction_decod); 641 642 in_DECOD_RAS_HIT[0]->write(1); 643 in_DECOD_RAS_ADDRESS_POP[0]->write(0xdadedead+i); 644 645 646 SC_START(0); 647 648 LABEL("DECOD[%d][%d] - %d %d",decod_unit,i,in_DECOD_VAL[decod_unit][i]->read(),out_DECOD_ACK[decod_unit][i]->read()); 649 if (in_DECOD_VAL[decod_unit][i]->read() and out_DECOD_ACK[decod_unit][i]->read()) 650 { 651 LABEL("DECOD[%d][%d] - Transaction Accepted",decod_unit,i); 652 TEST(Tcontrol_t , in_DECOD_UPT_ACK [0]->read(),1); 653 TEST(Tcontrol_t ,out_DECOD_BTB_VAL [0]->read(),1); 654 TEST(Tcontrol_t ,out_DECOD_RAS_VAL [0]->read(),1); 655 TEST(Tcontrol_t ,out_DECOD_UPT_VAL [0]->read(),1); 656 657 TEST(Tcontext_t ,out_DECOD_BTB_CONTEXT_ID [0]->read(),context); 658 TEST(Taddress_t ,out_DECOD_BTB_ADDRESS_SRC [0]->read(),0xdeadbeef+i); 659 TEST(Taddress_t ,out_DECOD_BTB_ADDRESS_DEST [0]->read(),0x11061979+i); 660 TEST(Tbranch_condition_t,out_DECOD_BTB_CONDITION [0]->read(),BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK); 661 TEST(Tcontrol_t ,out_DECOD_BTB_LAST_TAKE [0]->read(),1); 662 TEST(Tcontrol_t ,out_DECOD_BTB_MISS_PREDICTION [0]->read(),1); 663 TEST(Tcontrol_t ,out_DECOD_BTB_IS_ACCURATE [0]->read(),0); 664 TEST(Tcontext_t ,out_DECOD_RAS_CONTEXT_ID [0]->read(),context); 665 TEST(Tcontrol_t ,out_DECOD_RAS_PUSH [0]->read(),1); 666 TEST(Taddress_t ,out_DECOD_RAS_ADDRESS_PUSH [0]->read(),0x11061979+i); 667 TEST(Tcontrol_t ,out_DECOD_RAS_MISS_PREDICTION [0]->read(),1); 668 TEST(Tcontext_t ,out_DECOD_UPT_CONTEXT_ID [0]->read(),context); 669 TEST(Taddress_t ,out_DECOD_UPT_BTB_ADDRESS_SRC [0]->read(),0xdeadbeef+i); 670 TEST(Taddress_t ,out_DECOD_UPT_BTB_ADDRESS_DEST [0]->read(),0x11061979+i); 671 TEST(Tbranch_condition_t,out_DECOD_UPT_BTB_CONDITION [0]->read(),BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK); 672 TEST(Tcontrol_t ,out_DECOD_UPT_BTB_LAST_TAKE [0]->read(),1); 673 TEST(Taddress_t ,out_DECOD_UPT_RAS_ADDRESS [0]->read(),0xdadedead+i); 674 TEST(Tcontrol_t ,out_DECOD_UPT_MISS_IFETCH [0]->read(),1); 675 TEST(Tcontrol_t ,out_DECOD_UPT_MISS_DECOD [0]->read(),0); 676 TEST(Tprediction_ptr_t ,out_DECOD_UPT_UPDATE_PREDICTION_ID [0]->read(),i%_param->_max_size_depth); 677 678 find = true; 679 } 680 681 SC_START(1); 682 683 } while (not find); 684 685 in_DECOD_VAL [decod_unit][i]->write(0); 686 in_DECOD_BTB_ACK[0]->write(0); 687 in_DECOD_RAS_ACK[0]->write(0); 688 in_DECOD_UPT_ACK[0]->write(0); 689 } 690 } 388 691 389 692 SC_START(1); … … 413 716 DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_STATE ,_param->_nb_context); 414 717 DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID ,_param->_nb_context); 415 DELETE1_SC_SIGNAL(out_PREDICT_BTB_VAL ,_param->_nb_inst_ predict);416 DELETE1_SC_SIGNAL( in_PREDICT_BTB_ACK ,_param->_nb_inst_ predict);417 DELETE1_SC_SIGNAL(out_PREDICT_BTB_CONTEXT_ID ,_param->_nb_inst_ predict);418 DELETE1_SC_SIGNAL(out_PREDICT_BTB_ADDRESS ,_param->_nb_inst_ predict);419 DELETE1_SC_SIGNAL( in_PREDICT_BTB_HIT ,_param->_nb_inst_ predict);420 DELETE1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC ,_param->_nb_inst_ predict);421 DELETE1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST ,_param->_nb_inst_ predict);422 DELETE1_SC_SIGNAL( in_PREDICT_BTB_CONDITION ,_param->_nb_inst_ predict);423 //DELETE1_SC_SIGNAL( in_PREDICT_BTB_LAST_TAKE ,_param->_nb_inst_ predict);424 DELETE1_SC_SIGNAL( in_PREDICT_BTB_IS_ACCURATE ,_param->_nb_inst_ predict);425 DELETE1_SC_SIGNAL(out_PREDICT_DIR_VAL ,_param->_nb_inst_ predict);426 DELETE1_SC_SIGNAL( in_PREDICT_DIR_ACK ,_param->_nb_inst_ predict);427 DELETE1_SC_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC ,_param->_nb_inst_ predict);428 DELETE1_SC_SIGNAL(out_PREDICT_DIR_STATIC ,_param->_nb_inst_ predict);429 //DELETE1_SC_SIGNAL(out_PREDICT_DIR_LAST_TAKE ,_param->_nb_inst_ predict);430 //DELETE1_SC_SIGNAL( in_PREDICT_DIR_HISTORY ,_param->_nb_inst_ predict);431 DELETE1_SC_SIGNAL( in_PREDICT_DIR_DIRECTION ,_param->_nb_inst_ predict);432 DELETE1_SC_SIGNAL(out_PREDICT_RAS_VAL ,_param->_nb_inst_ predict);433 DELETE1_SC_SIGNAL( in_PREDICT_RAS_ACK ,_param->_nb_inst_ predict);434 DELETE1_SC_SIGNAL(out_PREDICT_RAS_CONTEXT_ID ,_param->_nb_inst_ predict);435 DELETE1_SC_SIGNAL( in_PREDICT_RAS_HIT ,_param->_nb_inst_ predict);436 DELETE1_SC_SIGNAL(out_PREDICT_RAS_PUSH ,_param->_nb_inst_ predict);437 DELETE1_SC_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH ,_param->_nb_inst_ predict);438 DELETE1_SC_SIGNAL( in_PREDICT_RAS_ADDRESS_POP ,_param->_nb_inst_ predict);439 //DELETE1_SC_SIGNAL( in_PREDICT_RAS_INDEX ,_param->_nb_inst_ predict);440 DELETE1_SC_SIGNAL(out_PREDICT_UPT_VAL ,_param->_nb_inst_ predict);441 DELETE1_SC_SIGNAL( in_PREDICT_UPT_ACK ,_param->_nb_inst_ predict);442 DELETE1_SC_SIGNAL(out_PREDICT_UPT_CONTEXT_ID ,_param->_nb_inst_ predict);443 DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_ predict);444 DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_ predict);445 DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_CONDITION ,_param->_nb_inst_ predict);446 DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE ,_param->_nb_inst_ predict);447 DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE ,_param->_nb_inst_ predict);448 //DELETE1_SC_SIGNAL(out_PREDICT_UPT_DIR_HISTORY ,_param->_nb_inst_ predict);449 DELETE1_SC_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS ,_param->_nb_inst_ predict);450 //DELETE1_SC_SIGNAL(out_PREDICT_UPT_RAS_INDEX ,_param->_nb_inst_ predict);718 DELETE1_SC_SIGNAL(out_PREDICT_BTB_VAL ,_param->_nb_inst_branch_predict); 719 DELETE1_SC_SIGNAL( in_PREDICT_BTB_ACK ,_param->_nb_inst_branch_predict); 720 DELETE1_SC_SIGNAL(out_PREDICT_BTB_CONTEXT_ID ,_param->_nb_inst_branch_predict); 721 DELETE1_SC_SIGNAL(out_PREDICT_BTB_ADDRESS ,_param->_nb_inst_branch_predict); 722 DELETE1_SC_SIGNAL( in_PREDICT_BTB_HIT ,_param->_nb_inst_branch_predict); 723 DELETE1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_predict); 724 DELETE1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_predict); 725 DELETE1_SC_SIGNAL( in_PREDICT_BTB_CONDITION ,_param->_nb_inst_branch_predict); 726 //DELETE1_SC_SIGNAL( in_PREDICT_BTB_LAST_TAKE ,_param->_nb_inst_branch_predict); 727 DELETE1_SC_SIGNAL( in_PREDICT_BTB_IS_ACCURATE ,_param->_nb_inst_branch_predict); 728 DELETE1_SC_SIGNAL(out_PREDICT_DIR_VAL ,_param->_nb_inst_branch_predict); 729 DELETE1_SC_SIGNAL( in_PREDICT_DIR_ACK ,_param->_nb_inst_branch_predict); 730 DELETE1_SC_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC ,_param->_nb_inst_branch_predict); 731 DELETE1_SC_SIGNAL(out_PREDICT_DIR_STATIC ,_param->_nb_inst_branch_predict); 732 //DELETE1_SC_SIGNAL(out_PREDICT_DIR_LAST_TAKE ,_param->_nb_inst_branch_predict); 733 //DELETE1_SC_SIGNAL( in_PREDICT_DIR_HISTORY ,_param->_nb_inst_branch_predict); 734 DELETE1_SC_SIGNAL( in_PREDICT_DIR_DIRECTION ,_param->_nb_inst_branch_predict); 735 DELETE1_SC_SIGNAL(out_PREDICT_RAS_VAL ,_param->_nb_inst_branch_predict); 736 DELETE1_SC_SIGNAL( in_PREDICT_RAS_ACK ,_param->_nb_inst_branch_predict); 737 DELETE1_SC_SIGNAL(out_PREDICT_RAS_CONTEXT_ID ,_param->_nb_inst_branch_predict); 738 DELETE1_SC_SIGNAL( in_PREDICT_RAS_HIT ,_param->_nb_inst_branch_predict); 739 DELETE1_SC_SIGNAL(out_PREDICT_RAS_PUSH ,_param->_nb_inst_branch_predict); 740 DELETE1_SC_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH ,_param->_nb_inst_branch_predict); 741 DELETE1_SC_SIGNAL( in_PREDICT_RAS_ADDRESS_POP ,_param->_nb_inst_branch_predict); 742 //DELETE1_SC_SIGNAL( in_PREDICT_RAS_INDEX ,_param->_nb_inst_branch_predict); 743 DELETE1_SC_SIGNAL(out_PREDICT_UPT_VAL ,_param->_nb_inst_branch_predict); 744 DELETE1_SC_SIGNAL( in_PREDICT_UPT_ACK ,_param->_nb_inst_branch_predict); 745 DELETE1_SC_SIGNAL(out_PREDICT_UPT_CONTEXT_ID ,_param->_nb_inst_branch_predict); 746 DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_predict); 747 DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_predict); 748 DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_CONDITION ,_param->_nb_inst_branch_predict); 749 DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE ,_param->_nb_inst_branch_predict); 750 DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE ,_param->_nb_inst_branch_predict); 751 //DELETE1_SC_SIGNAL(out_PREDICT_UPT_DIR_HISTORY ,_param->_nb_inst_branch_predict); 752 DELETE1_SC_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS ,_param->_nb_inst_branch_predict); 753 //DELETE1_SC_SIGNAL(out_PREDICT_UPT_RAS_INDEX ,_param->_nb_inst_branch_predict); 451 754 DELETE1_SC_SIGNAL( in_DEPTH_UPT_NB_BRANCH ,_param->_nb_context); 452 755 DELETE1_SC_SIGNAL( in_DEPTH_UPT_TAIL ,_param->_nb_context); 756 DELETE1_SC_SIGNAL(out_DEPTH_NB_BRANCH ,_param->_nb_context); 757 DELETE1_SC_SIGNAL(out_DEPTH_TAIL ,_param->_nb_context); 758 759 DELETE2_SC_SIGNAL( in_DECOD_VAL ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 760 DELETE2_SC_SIGNAL(out_DECOD_ACK ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 761 DELETE2_SC_SIGNAL( in_DECOD_CONTEXT_ID ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 762 DELETE2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 763 DELETE2_SC_SIGNAL( in_DECOD_BRANCH_STATE ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 764 DELETE2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 765 DELETE2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 766 DELETE2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 767 DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_SRC ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 768 DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_DEST ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 769 DELETE1_SC_SIGNAL(out_DECOD_BTB_VAL ,_param->_nb_inst_branch_decod); 770 DELETE1_SC_SIGNAL( in_DECOD_BTB_ACK ,_param->_nb_inst_branch_decod); 771 DELETE1_SC_SIGNAL(out_DECOD_BTB_CONTEXT_ID ,_param->_nb_inst_branch_decod); 772 DELETE1_SC_SIGNAL(out_DECOD_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_decod); 773 DELETE1_SC_SIGNAL(out_DECOD_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_decod); 774 DELETE1_SC_SIGNAL(out_DECOD_BTB_CONDITION ,_param->_nb_inst_branch_decod); 775 DELETE1_SC_SIGNAL(out_DECOD_BTB_LAST_TAKE ,_param->_nb_inst_branch_decod); 776 DELETE1_SC_SIGNAL(out_DECOD_BTB_MISS_PREDICTION ,_param->_nb_inst_branch_decod); 777 DELETE1_SC_SIGNAL(out_DECOD_BTB_IS_ACCURATE ,_param->_nb_inst_branch_decod); 778 DELETE1_SC_SIGNAL(out_DECOD_RAS_VAL ,_param->_nb_inst_branch_decod); 779 DELETE1_SC_SIGNAL( in_DECOD_RAS_ACK ,_param->_nb_inst_branch_decod); 780 DELETE1_SC_SIGNAL(out_DECOD_RAS_CONTEXT_ID ,_param->_nb_inst_branch_decod); 781 DELETE1_SC_SIGNAL( in_DECOD_RAS_HIT ,_param->_nb_inst_branch_decod); 782 DELETE1_SC_SIGNAL(out_DECOD_RAS_PUSH ,_param->_nb_inst_branch_decod); 783 DELETE1_SC_SIGNAL(out_DECOD_RAS_ADDRESS_PUSH ,_param->_nb_inst_branch_decod); 784 DELETE1_SC_SIGNAL( in_DECOD_RAS_ADDRESS_POP ,_param->_nb_inst_branch_decod); 785 //DELETE1_SC_SIGNAL( in_DECOD_RAS_INDEX ,_param->_nb_inst_branch_decod); 786 DELETE1_SC_SIGNAL(out_DECOD_RAS_MISS_PREDICTION ,_param->_nb_inst_branch_decod); 787 DELETE1_SC_SIGNAL(out_DECOD_UPT_VAL ,_param->_nb_inst_branch_decod); 788 DELETE1_SC_SIGNAL( in_DECOD_UPT_ACK ,_param->_nb_inst_branch_decod); 789 DELETE1_SC_SIGNAL(out_DECOD_UPT_CONTEXT_ID ,_param->_nb_inst_branch_decod); 790 DELETE1_SC_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_decod); 791 DELETE1_SC_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_decod); 792 DELETE1_SC_SIGNAL(out_DECOD_UPT_BTB_CONDITION ,_param->_nb_inst_branch_decod); 793 DELETE1_SC_SIGNAL(out_DECOD_UPT_BTB_LAST_TAKE ,_param->_nb_inst_branch_decod); 794 DELETE1_SC_SIGNAL(out_DECOD_UPT_RAS_ADDRESS ,_param->_nb_inst_branch_decod); 795 //DELETE1_SC_SIGNAL(out_DECOD_UPT_RAS_INDEX ,_param->_nb_inst_branch_decod); 796 DELETE1_SC_SIGNAL(out_DECOD_UPT_MISS_IFETCH ,_param->_nb_inst_branch_decod); 797 DELETE1_SC_SIGNAL(out_DECOD_UPT_MISS_DECOD ,_param->_nb_inst_branch_decod); 798 DELETE1_SC_SIGNAL(out_DECOD_UPT_UPDATE_PREDICTION_ID ,_param->_nb_inst_branch_decod); 799 800 DELETE1_SC_SIGNAL(out_UPDATE_BTB_VAL ,_param->_nb_inst_branch_update); 801 DELETE1_SC_SIGNAL( in_UPDATE_BTB_ACK ,_param->_nb_inst_branch_update); 802 //DELETE1_SC_SIGNAL(out_UPDATE_BTB_CONTEXT_ID ,_param->_nb_inst_branch_update); 803 //DELETE1_SC_SIGNAL(out_UPDATE_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_update); 804 //DELETE1_SC_SIGNAL(out_UPDATE_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_update); 805 //DELETE1_SC_SIGNAL(out_UPDATE_BTB_CONDITION ,_param->_nb_inst_branch_update); 806 //DELETE1_SC_SIGNAL(out_UPDATE_BTB_LAST_TAKE ,_param->_nb_inst_branch_update); 807 //DELETE1_SC_SIGNAL(out_UPDATE_BTB_MISS_PREDICTION ,_param->_nb_inst_branch_update); 808 DELETE1_SC_SIGNAL(out_UPDATE_DIR_VAL ,_param->_nb_inst_branch_update); 809 DELETE1_SC_SIGNAL( in_UPDATE_DIR_ACK ,_param->_nb_inst_branch_update); 810 //DELETE1_SC_SIGNAL(out_UPDATE_DIR_ADDRESS ,_param->_nb_inst_branch_update); 811 //DELETE1_SC_SIGNAL(out_UPDATE_DIR_HISTORY ,_param->_nb_inst_branch_update); 812 //DELETE1_SC_SIGNAL(out_UPDATE_DIR_DIRECTION ,_param->_nb_inst_branch_update); 813 DELETE1_SC_SIGNAL(out_UPDATE_RAS_VAL ,_param->_nb_inst_branch_update); 814 DELETE1_SC_SIGNAL( in_UPDATE_RAS_ACK ,_param->_nb_inst_branch_update); 815 //DELETE1_SC_SIGNAL(out_UPDATE_RAS_CONTEXT_ID ,_param->_nb_inst_branch_update); 816 //DELETE1_SC_SIGNAL(out_UPDATE_RAS_PUSH ,_param->_nb_inst_branch_update); 817 //DELETE1_SC_SIGNAL(out_UPDATE_RAS_ADDRESS ,_param->_nb_inst_branch_update); 818 //DELETE1_SC_SIGNAL(out_UPDATE_RAS_INDEX ,_param->_nb_inst_branch_update); 819 //DELETE1_SC_SIGNAL(out_UPDATE_RAS_MISS_PREDICTION ,_param->_nb_inst_branch_update); 820 //DELETE1_SC_SIGNAL(out_UPDATE_RAS_PREDICTION_IFETCH ,_param->_nb_inst_branch_update); 821 DELETE1_SC_SIGNAL( in_UPDATE_UPT_VAL ,_param->_nb_inst_branch_update); 822 DELETE1_SC_SIGNAL(out_UPDATE_UPT_ACK ,_param->_nb_inst_branch_update); 823 //DELETE1_SC_SIGNAL( in_UPDATE_UPT_CONTEXT_ID ,_param->_nb_inst_branch_update); 824 //DELETE1_SC_SIGNAL( in_UPDATE_UPT_MISS_PREDICTION ,_param->_nb_inst_branch_update); 825 //DELETE1_SC_SIGNAL( in_UPDATE_UPT_DIRECTION_GOOD ,_param->_nb_inst_branch_update); 826 DELETE1_SC_SIGNAL( in_UPDATE_UPT_BTB_VAL ,_param->_nb_inst_branch_update); 827 //DELETE1_SC_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_update); 828 //DELETE1_SC_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_update); 829 //DELETE1_SC_SIGNAL( in_UPDATE_UPT_BTB_CONDITION ,_param->_nb_inst_branch_update); 830 DELETE1_SC_SIGNAL( in_UPDATE_UPT_DIR_VAL ,_param->_nb_inst_branch_update); 831 //DELETE1_SC_SIGNAL( in_UPDATE_UPT_DIR_HISTORY ,_param->_nb_inst_branch_update); 832 DELETE1_SC_SIGNAL( in_UPDATE_UPT_RAS_VAL ,_param->_nb_inst_branch_update); 833 //DELETE1_SC_SIGNAL( in_UPDATE_UPT_RAS_PUSH ,_param->_nb_inst_branch_update); 834 //DELETE1_SC_SIGNAL( in_UPDATE_UPT_RAS_ADDRESS ,_param->_nb_inst_branch_update); 835 //DELETE1_SC_SIGNAL( in_UPDATE_UPT_RAS_INDEX ,_param->_nb_inst_branch_update); 836 //DELETE1_SC_SIGNAL( in_UPDATE_UPT_RAS_PREDICTION_IFETCH,_param->_nb_inst_branch_update); 837 453 838 } 454 839 #endif 455 840 456 841 delete _Prediction_unit_Glue; 842 457 843 #ifdef STATISTICS 458 844 delete _parameters_statistics; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Parameters.h
r81 r82 24 24 { 25 25 //-----[ fields ]------------------------------------------------------------ 26 public : uint32_t _nb_context ; 26 public : uint32_t _nb_context ;// == nb_ifetch_unit 27 public : uint32_t _nb_decod_unit ; 28 //public : uint32_t _nb_ooo_engine ; 27 29 public : uint32_t _size_address ; 28 public : uint32_t * _nb_instruction ; 29 public : uint32_t * _size_depth ; 30 public : uint32_t _nb_inst_predict ; 31 public : uint32_t _nb_inst_decod ; 32 public : uint32_t _nb_inst_update ; 30 public : uint32_t * _nb_instruction ;//[nb_context] 31 public : uint32_t * _size_depth ;//[nb_context] 32 public : uint32_t * _nb_inst_decod ;//[nb_decod_unit] 33 //public : uint32_t * _nb_inst_update ;//[nb_ooo_engine] 34 public : uint32_t _nb_inst_branch_predict ; 35 public : uint32_t _nb_inst_branch_decod ; 36 public : uint32_t _nb_inst_branch_update ; 33 37 //public : uint32_t _nb_inst_branch_complete ; 34 38 35 39 public : uint32_t _size_context_id ; 36 public : uint32_t * _size_inst_ifetch_ptr ; 40 public : uint32_t * _size_inst_ifetch_ptr ;//[nb_context] 41 public : uint32_t _max_size_depth ; 37 42 38 43 public : bool _have_port_context_id ; 39 public : bool * _have_port_depth ; 40 public : bool * _have_port_inst_ifetch_ptr; 44 public : bool _have_port_max_depth ; 45 public : bool * _have_port_depth ;//[nb_context] 46 public : bool * _have_port_inst_ifetch_ptr;//[nb_context] 41 47 42 48 //-----[ methods ]----------------------------------------------------------- 43 public : Parameters (uint32_t nb_context , 44 uint32_t size_address , 45 uint32_t * nb_instruction , 46 uint32_t * size_depth , 47 uint32_t nb_inst_predict, 48 uint32_t nb_inst_decod , 49 uint32_t nb_inst_update ); 49 public : Parameters (uint32_t nb_context , 50 uint32_t nb_decod_unit , 51 // uint32_t nb_ooo_engine , 52 uint32_t size_address , 53 uint32_t * nb_instruction , 54 uint32_t * size_depth , 55 uint32_t * nb_inst_decod , 56 // uint32_t * nb_inst_update , 57 uint32_t nb_inst_branch_predict, 58 uint32_t nb_inst_branch_decod , 59 uint32_t nb_inst_branch_update ); 50 60 // public : Parameters (Parameters & param) ; 51 61 public : ~Parameters () ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Prediction_unit_Glue.h
r81 r82 75 75 public : SC_OUT(Tprediction_ptr_t ) ** out_PREDICT_BRANCH_UPDATE_PREDICTION_ID ; //[nb_context] 76 76 77 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_BTB_VAL ; //[nb_inst_ predict]78 public : SC_IN (Tcontrol_t ) ** in_PREDICT_BTB_ACK ; //[nb_inst_ predict]79 public : SC_OUT(Tcontext_t ) ** out_PREDICT_BTB_CONTEXT_ID ; //[nb_inst_ predict]80 public : SC_OUT(Taddress_t ) ** out_PREDICT_BTB_ADDRESS ; //[nb_inst_ predict]81 public : SC_IN (Tcontrol_t ) ** in_PREDICT_BTB_HIT ; //[nb_inst_ predict]82 public : SC_IN (Taddress_t ) ** in_PREDICT_BTB_ADDRESS_SRC ; //[nb_inst_ predict]83 public : SC_IN (Taddress_t ) ** in_PREDICT_BTB_ADDRESS_DEST ; //[nb_inst_ predict]84 public : SC_IN (Tbranch_condition_t) ** in_PREDICT_BTB_CONDITION ; //[nb_inst_ predict]85 //public : SC_IN (Tcontrol_t ) ** in_PREDICT_BTB_LAST_TAKE ; //[nb_inst_ predict] DIR.LAST_TAKE86 public : SC_IN (Tcontrol_t ) ** in_PREDICT_BTB_IS_ACCURATE ; //[nb_inst_ predict]77 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_BTB_VAL ; //[nb_inst_branch_predict] 78 public : SC_IN (Tcontrol_t ) ** in_PREDICT_BTB_ACK ; //[nb_inst_branch_predict] 79 public : SC_OUT(Tcontext_t ) ** out_PREDICT_BTB_CONTEXT_ID ; //[nb_inst_branch_predict] 80 public : SC_OUT(Taddress_t ) ** out_PREDICT_BTB_ADDRESS ; //[nb_inst_branch_predict] 81 public : SC_IN (Tcontrol_t ) ** in_PREDICT_BTB_HIT ; //[nb_inst_branch_predict] 82 public : SC_IN (Taddress_t ) ** in_PREDICT_BTB_ADDRESS_SRC ; //[nb_inst_branch_predict] 83 public : SC_IN (Taddress_t ) ** in_PREDICT_BTB_ADDRESS_DEST ; //[nb_inst_branch_predict] 84 public : SC_IN (Tbranch_condition_t) ** in_PREDICT_BTB_CONDITION ; //[nb_inst_branch_predict] 85 //public : SC_IN (Tcontrol_t ) ** in_PREDICT_BTB_LAST_TAKE ; //[nb_inst_branch_predict] DIR.LAST_TAKE 86 public : SC_IN (Tcontrol_t ) ** in_PREDICT_BTB_IS_ACCURATE ; //[nb_inst_branch_predict] 87 87 88 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_DIR_VAL ; //[nb_inst_ predict]89 public : SC_IN (Tcontrol_t ) ** in_PREDICT_DIR_ACK ; //[nb_inst_ predict]90 public : SC_OUT(Taddress_t ) ** out_PREDICT_DIR_ADDRESS_SRC ; //[nb_inst_ predict]91 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_DIR_STATIC ; //[nb_inst_ predict]92 //public : SC_OUT(Tcontrol_t ) ** out_PREDICT_DIR_LAST_TAKE ; //[nb_inst_ predict] BTB.LAST_TAKE93 //public : SC_IN (Thistory_t ) ** in_PREDICT_DIR_HISTORY ; //[nb_inst_ predict] UPT.DIR_HISTORY94 public : SC_IN (Tcontrol_t ) ** in_PREDICT_DIR_DIRECTION ; //[nb_inst_ predict]95 96 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_RAS_VAL ; //[nb_inst_ predict]97 public : SC_IN (Tcontrol_t ) ** in_PREDICT_RAS_ACK ; //[nb_inst_ predict]98 public : SC_OUT(Tcontext_t ) ** out_PREDICT_RAS_CONTEXT_ID ; //[nb_inst_ predict]99 public : SC_IN (Tcontrol_t ) ** in_PREDICT_RAS_HIT ; //[nb_inst_ predict]100 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_RAS_PUSH ; //[nb_inst_ predict]101 public : SC_OUT(Taddress_t ) ** out_PREDICT_RAS_ADDRESS_PUSH ; //[nb_inst_ predict]102 public : SC_IN (Taddress_t ) ** in_PREDICT_RAS_ADDRESS_POP ; //[nb_inst_ predict]103 //public : SC_IN (Tptr_t ) ** in_PREDICT_RAS_INDEX ; //[nb_inst_ predict] UPT.RAS_INDEX88 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_DIR_VAL ; //[nb_inst_branch_predict] 89 public : SC_IN (Tcontrol_t ) ** in_PREDICT_DIR_ACK ; //[nb_inst_branch_predict] 90 public : SC_OUT(Taddress_t ) ** out_PREDICT_DIR_ADDRESS_SRC ; //[nb_inst_branch_predict] 91 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_DIR_STATIC ; //[nb_inst_branch_predict] 92 //public : SC_OUT(Tcontrol_t ) ** out_PREDICT_DIR_LAST_TAKE ; //[nb_inst_branch_predict] BTB.LAST_TAKE 93 //public : SC_IN (Thistory_t ) ** in_PREDICT_DIR_HISTORY ; //[nb_inst_branch_predict] UPT.DIR_HISTORY 94 public : SC_IN (Tcontrol_t ) ** in_PREDICT_DIR_DIRECTION ; //[nb_inst_branch_predict] 95 96 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_RAS_VAL ; //[nb_inst_branch_predict] 97 public : SC_IN (Tcontrol_t ) ** in_PREDICT_RAS_ACK ; //[nb_inst_branch_predict] 98 public : SC_OUT(Tcontext_t ) ** out_PREDICT_RAS_CONTEXT_ID ; //[nb_inst_branch_predict] 99 public : SC_IN (Tcontrol_t ) ** in_PREDICT_RAS_HIT ; //[nb_inst_branch_predict] 100 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_RAS_PUSH ; //[nb_inst_branch_predict] 101 public : SC_OUT(Taddress_t ) ** out_PREDICT_RAS_ADDRESS_PUSH ; //[nb_inst_branch_predict] 102 public : SC_IN (Taddress_t ) ** in_PREDICT_RAS_ADDRESS_POP ; //[nb_inst_branch_predict] 103 //public : SC_IN (Tptr_t ) ** in_PREDICT_RAS_INDEX ; //[nb_inst_branch_predict] UPT.RAS_INDEX 104 104 105 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_UPT_VAL ; //[nb_inst_ predict]106 public : SC_IN (Tcontrol_t ) ** in_PREDICT_UPT_ACK ; //[nb_inst_ predict]107 public : SC_OUT(Tcontext_t ) ** out_PREDICT_UPT_CONTEXT_ID ; //[nb_inst_ predict]108 public : SC_OUT(Taddress_t ) ** out_PREDICT_UPT_BTB_ADDRESS_SRC ; //[nb_inst_ predict]* BTB.ADDRESS_SRC109 public : SC_OUT(Taddress_t ) ** out_PREDICT_UPT_BTB_ADDRESS_DEST ; //[nb_inst_ predict]110 public : SC_OUT(Tbranch_condition_t) ** out_PREDICT_UPT_BTB_CONDITION ; //[nb_inst_ predict]* BTB.CONDITION111 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_UPT_BTB_LAST_TAKE ; //[nb_inst_ predict]112 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_UPT_BTB_IS_ACCURATE ; //[nb_inst_ predict]113 //public : SC_OUT(Thistory_t ) ** out_PREDICT_UPT_DIR_HISTORY ; //[nb_inst_ predict] DIR.HISTORY114 public : SC_OUT(Taddress_t ) ** out_PREDICT_UPT_RAS_ADDRESS ; //[nb_inst_ predict]* RAS.ADDRESS_POP115 //public : SC_OUT(Tptr_t ) ** out_PREDICT_UPT_RAS_INDEX ; //[nb_inst_ predict] RAS.INDEX105 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_UPT_VAL ; //[nb_inst_branch_predict] 106 public : SC_IN (Tcontrol_t ) ** in_PREDICT_UPT_ACK ; //[nb_inst_branch_predict] 107 public : SC_OUT(Tcontext_t ) ** out_PREDICT_UPT_CONTEXT_ID ; //[nb_inst_branch_predict] 108 public : SC_OUT(Taddress_t ) ** out_PREDICT_UPT_BTB_ADDRESS_SRC ; //[nb_inst_branch_predict]* BTB.ADDRESS_SRC 109 public : SC_OUT(Taddress_t ) ** out_PREDICT_UPT_BTB_ADDRESS_DEST ; //[nb_inst_branch_predict] 110 public : SC_OUT(Tbranch_condition_t) ** out_PREDICT_UPT_BTB_CONDITION ; //[nb_inst_branch_predict]* BTB.CONDITION 111 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_UPT_BTB_LAST_TAKE ; //[nb_inst_branch_predict] 112 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_UPT_BTB_IS_ACCURATE ; //[nb_inst_branch_predict] 113 //public : SC_OUT(Thistory_t ) ** out_PREDICT_UPT_DIR_HISTORY ; //[nb_inst_branch_predict] DIR.HISTORY 114 public : SC_OUT(Taddress_t ) ** out_PREDICT_UPT_RAS_ADDRESS ; //[nb_inst_branch_predict]* RAS.ADDRESS_POP 115 //public : SC_OUT(Tptr_t ) ** out_PREDICT_UPT_RAS_INDEX ; //[nb_inst_branch_predict] RAS.INDEX 116 116 117 117 // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 118 public : SC_OUT(Tcontrol_t ) ** out_DECOD_BTB_VAL ; //[nb_inst_decod] 119 public : SC_IN (Tcontrol_t ) ** in_DECOD_BTB_ACK ; //[nb_inst_decod] 120 public : SC_OUT(Tcontext_t ) ** out_DECOD_BTB_CONTEXT_ID ; //[nb_inst_decod] 121 public : SC_OUT(Taddress_t ) ** out_DECOD_BTB_ADDRESS_SRC ; //[nb_inst_decod] 122 public : SC_OUT(Taddress_t ) ** out_DECOD_BTB_ADDRESS_DEST ; //[nb_inst_decod] 123 public : SC_OUT(Tbranch_condition_t) ** out_DECOD_BTB_CONDITION ; //[nb_inst_decod] 124 public : SC_OUT(Tcontrol_t ) ** out_DECOD_BTB_LAST_TAKE ; //[nb_inst_decod] 125 public : SC_OUT(Tcontrol_t ) ** out_DECOD_BTB_MISS_PREDICTION ; //[nb_inst_decod] 118 public : SC_IN (Tcontrol_t ) *** in_DECOD_VAL ; //[nb_decod_unit][nb_inst_decod] 119 public : SC_OUT(Tcontrol_t ) *** out_DECOD_ACK ; //[nb_decod_unit][nb_inst_decod] 120 public : SC_IN (Tcontext_t ) *** in_DECOD_CONTEXT_ID ; //[nb_decod_unit][nb_inst_decod] 121 public : SC_IN (Tcontrol_t ) *** in_DECOD_MATCH_INST_IFETCH_PTR ; //[nb_decod_unit][nb_inst_decod] 122 public : SC_IN (Tbranch_state_t ) *** in_DECOD_BRANCH_STATE ; //[nb_decod_unit][nb_inst_decod] 123 public : SC_IN (Tprediction_ptr_t ) *** in_DECOD_BRANCH_UPDATE_PREDICTION_ID ; //[nb_decod_unit][nb_inst_decod] 124 public : SC_IN (Tbranch_condition_t) *** in_DECOD_BRANCH_CONDITION ; //[nb_decod_unit][nb_inst_decod] 125 public : SC_IN (Tcontrol_t ) *** in_DECOD_BRANCH_DIRECTION ; //[nb_decod_unit][nb_inst_decod] 126 public : SC_IN (Taddress_t ) *** in_DECOD_ADDRESS_SRC ; //[nb_decod_unit][nb_inst_decod] 127 public : SC_IN (Taddress_t ) *** in_DECOD_ADDRESS_DEST ; //[nb_decod_unit][nb_inst_decod] 128 129 public : SC_OUT(Tcontrol_t ) ** out_DECOD_BTB_VAL ; //[nb_inst_branch_decod] 130 public : SC_IN (Tcontrol_t ) ** in_DECOD_BTB_ACK ; //[nb_inst_branch_decod] 131 public : SC_OUT(Tcontext_t ) ** out_DECOD_BTB_CONTEXT_ID ; //[nb_inst_branch_decod] 132 public : SC_OUT(Taddress_t ) ** out_DECOD_BTB_ADDRESS_SRC ; //[nb_inst_branch_decod] 133 public : SC_OUT(Taddress_t ) ** out_DECOD_BTB_ADDRESS_DEST ; //[nb_inst_branch_decod] 134 public : SC_OUT(Tbranch_condition_t) ** out_DECOD_BTB_CONDITION ; //[nb_inst_branch_decod] 135 public : SC_OUT(Tcontrol_t ) ** out_DECOD_BTB_LAST_TAKE ; //[nb_inst_branch_decod] 136 public : SC_OUT(Tcontrol_t ) ** out_DECOD_BTB_MISS_PREDICTION ; //[nb_inst_branch_decod] 137 public : SC_OUT(Tcontrol_t ) ** out_DECOD_BTB_IS_ACCURATE ; //[nb_inst_branch_decod] 126 138 127 public : SC_OUT(Tcontrol_t) ** out_DECOD_RAS_VAL ; //[nb_inst_decod] 128 public : SC_IN (Tcontrol_t) ** in_DECOD_RAS_ACK ; //[nb_inst_decod] 129 public : SC_OUT(Tcontext_t) ** out_DECOD_RAS_CONTEXT_ID ; //[nb_inst_decod] 130 public : SC_IN (Tcontrol_t) ** in_DECOD_RAS_HIT ; //[nb_inst_decod] 131 public : SC_OUT(Tcontrol_t) ** out_DECOD_RAS_PUSH ; //[nb_inst_decod] 132 public : SC_OUT(Taddress_t) ** out_DECOD_RAS_ADDRESS_PUSH ; //[nb_inst_decod] 133 public : SC_IN (Taddress_t) ** in_DECOD_RAS_ADDRESS_POP ; //[nb_inst_decod] 134 public : SC_IN (Tptr_t ) ** in_DECOD_RAS_INDEX ; //[nb_inst_decod] 135 public : SC_OUT(Tcontrol_t) ** out_DECOD_RAS_MISS_PREDICTION ; //[nb_inst_decod] 136 137 public : SC_OUT(Tcontrol_t ) ** out_DECOD_UPT_VAL ; //[nb_inst_decod] 138 public : SC_IN (Tcontrol_t ) ** in_DECOD_UPT_ACK ; //[nb_inst_decod] 139 public : SC_OUT(Tcontext_t ) ** out_DECOD_UPT_CONTEXT_ID ; //[nb_inst_decod] 140 public : SC_OUT(Taddress_t ) ** out_DECOD_UPT_BTB_ADDRESS_SRC ; //[nb_inst_decod] 141 public : SC_OUT(Taddress_t ) ** out_DECOD_UPT_BTB_ADDRESS_DEST ; //[nb_inst_decod] 142 public : SC_OUT(Tbranch_condition_t) ** out_DECOD_UPT_BTB_CONDITION ; //[nb_inst_decod] 143 public : SC_OUT(Tcontrol_t ) ** out_DECOD_UPT_BTB_LAST_TAKE ; //[nb_inst_decod] 144 public : SC_OUT(Taddress_t ) ** out_DECOD_UPT_RAS_ADDRESS ; //[nb_inst_decod] 145 public : SC_OUT(Tptr_t ) ** out_DECOD_UPT_RAS_INDEX ; //[nb_inst_decod] 146 public : SC_OUT(Tcontrol_t ) ** out_DECOD_UPT_MISS_PREDICTION ; //[nb_inst_decod] 147 public : SC_OUT(Tprediction_ptr_t ) ** out_DECOD_UPT_UPDATE_PREDICTION_ID ; //[nb_inst_decod] 139 public : SC_OUT(Tcontrol_t ) ** out_DECOD_RAS_VAL ; //[nb_inst_branch_decod] 140 public : SC_IN (Tcontrol_t ) ** in_DECOD_RAS_ACK ; //[nb_inst_branch_decod] 141 public : SC_OUT(Tcontext_t ) ** out_DECOD_RAS_CONTEXT_ID ; //[nb_inst_branch_decod] 142 public : SC_IN (Tcontrol_t ) ** in_DECOD_RAS_HIT ; //[nb_inst_branch_decod] 143 public : SC_OUT(Tcontrol_t ) ** out_DECOD_RAS_PUSH ; //[nb_inst_branch_decod] 144 public : SC_OUT(Taddress_t ) ** out_DECOD_RAS_ADDRESS_PUSH ; //[nb_inst_branch_decod] 145 public : SC_IN (Taddress_t ) ** in_DECOD_RAS_ADDRESS_POP ; //[nb_inst_branch_decod] 146 //public : SC_IN (Tptr_t ) ** in_DECOD_RAS_INDEX ; //[nb_inst_branch_decod] UPT.RAS_INDEX 147 public : SC_OUT(Tcontrol_t ) ** out_DECOD_RAS_MISS_PREDICTION ; //[nb_inst_branch_decod] 148 149 public : SC_OUT(Tcontrol_t ) ** out_DECOD_UPT_VAL ; //[nb_inst_branch_decod] 150 public : SC_IN (Tcontrol_t ) ** in_DECOD_UPT_ACK ; //[nb_inst_branch_decod] 151 public : SC_OUT(Tcontext_t ) ** out_DECOD_UPT_CONTEXT_ID ; //[nb_inst_branch_decod] 152 public : SC_OUT(Taddress_t ) ** out_DECOD_UPT_BTB_ADDRESS_SRC ; //[nb_inst_branch_decod] 153 public : SC_OUT(Taddress_t ) ** out_DECOD_UPT_BTB_ADDRESS_DEST ; //[nb_inst_branch_decod] 154 public : SC_OUT(Tbranch_condition_t) ** out_DECOD_UPT_BTB_CONDITION ; //[nb_inst_branch_decod] 155 public : SC_OUT(Tcontrol_t ) ** out_DECOD_UPT_BTB_LAST_TAKE ; //[nb_inst_branch_decod] 156 public : SC_OUT(Taddress_t ) ** out_DECOD_UPT_RAS_ADDRESS ; //[nb_inst_branch_decod] 157 //public : SC_OUT(Tptr_t ) ** out_DECOD_UPT_RAS_INDEX ; //[nb_inst_branch_decod] RAS.INDEX 158 public : SC_OUT(Tcontrol_t ) ** out_DECOD_UPT_MISS_IFETCH ; //[nb_inst_branch_decod] 159 public : SC_OUT(Tcontrol_t ) ** out_DECOD_UPT_MISS_DECOD ; //[nb_inst_branch_decod] 160 public : SC_OUT(Tprediction_ptr_t ) ** out_DECOD_UPT_UPDATE_PREDICTION_ID ; //[nb_inst_branch_decod] 148 161 149 162 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 150 public : SC_OUT(Tcontrol_t ) ** out_UPDATE_BTB_VAL ; //[nb_inst_update] 151 public : SC_IN (Tcontrol_t ) ** in_UPDATE_BTB_ACK ; //[nb_inst_update] 152 public : SC_OUT(Tcontext_t ) ** out_UPDATE_BTB_CONTEXT_ID ; //[nb_inst_update] 153 public : SC_OUT(Taddress_t ) ** out_UPDATE_BTB_ADDRESS_SRC ; //[nb_inst_update] 154 public : SC_OUT(Taddress_t ) ** out_UPDATE_BTB_ADDRESS_DEST ; //[nb_inst_update] 155 public : SC_OUT(Tbranch_condition_t) ** out_UPDATE_BTB_CONDITION ; //[nb_inst_update] 156 public : SC_OUT(Tcontrol_t ) ** out_UPDATE_BTB_LAST_TAKE ; //[nb_inst_update] 157 public : SC_OUT(Tcontrol_t ) ** out_UPDATE_BTB_MISS_PREDICTION ; //[nb_inst_update] 158 159 public : SC_OUT(Tcontrol_t) ** out_UPDATE_DIR_VAL ; //[nb_inst_update] 160 public : SC_IN (Tcontrol_t) ** in_UPDATE_DIR_ACK ; //[nb_inst_update] 161 public : SC_OUT(Taddress_t) ** out_UPDATE_DIR_ADDRESS ; //[nb_inst_update] 162 public : SC_OUT(Thistory_t) ** out_UPDATE_DIR_HISTORY ; //[nb_inst_update] 163 public : SC_OUT(Tcontrol_t) ** out_UPDATE_DIR_DIRECTION ; //[nb_inst_update] 164 165 public : SC_OUT(Tcontrol_t) ** out_UPDATE_RAS_VAL ; //[nb_inst_update] 166 public : SC_IN (Tcontrol_t) ** in_UPDATE_RAS_ACK ; //[nb_inst_update] 167 public : SC_OUT(Tcontext_t) ** out_UPDATE_RAS_CONTEXT_ID ; //[nb_inst_update] 168 public : SC_OUT(Tcontrol_t) ** out_UPDATE_RAS_PUSH ; //[nb_inst_update] 169 public : SC_OUT(Taddress_t) ** out_UPDATE_RAS_ADDRESS ; //[nb_inst_update] 170 public : SC_OUT(Tptr_t ) ** out_UPDATE_RAS_INDEX ; //[nb_inst_update] 171 public : SC_OUT(Tcontrol_t) ** out_UPDATE_RAS_MISS_PREDICTION ; //[nb_inst_update] 172 public : SC_OUT(Tcontrol_t) ** out_UPDATE_RAS_PREDICTION_IFETCH ; //[nb_inst_update] 173 174 public : SC_IN (Tcontrol_t ) ** in_UPDATE_UPT_VAL ; //[nb_inst_update] 175 public : SC_OUT(Tcontrol_t ) ** out_UPDATE_UPT_ACK ; //[nb_inst_update] 176 public : SC_IN (Tcontext_t ) ** in_UPDATE_UPT_CONTEXT_ID ; //[nb_inst_update] 177 public : SC_IN (Tcontrol_t ) ** in_UPDATE_UPT_MISS_PREDICTION ; //[nb_inst_update] 178 public : SC_IN (Tcontrol_t ) ** in_UPDATE_UPT_DIRECTION_GOOD ; //[nb_inst_update] 179 public : SC_IN (Tcontrol_t ) ** in_UPDATE_UPT_BTB_VAL ; //[nb_inst_update] 180 public : SC_IN (Taddress_t ) ** in_UPDATE_UPT_BTB_ADDRESS_SRC ; //[nb_inst_update] 181 public : SC_IN (Taddress_t ) ** in_UPDATE_UPT_BTB_ADDRESS_DEST ; //[nb_inst_update] 182 public : SC_IN (Tbranch_condition_t) ** in_UPDATE_UPT_BTB_CONDITION ; //[nb_inst_update] 183 public : SC_IN (Tcontrol_t ) ** in_UPDATE_UPT_DIR_VAL ; //[nb_inst_update] 184 public : SC_IN (Thistory_t ) ** in_UPDATE_UPT_DIR_HISTORY ; //[nb_inst_update] 185 public : SC_IN (Tcontrol_t ) ** in_UPDATE_UPT_RAS_VAL ; //[nb_inst_update] 186 public : SC_IN (Taddress_t ) ** in_UPDATE_UPT_RAS_ADDRESS ; //[nb_inst_update] 187 public : SC_IN (Tptr_t ) ** in_UPDATE_UPT_RAS_INDEX ; //[nb_inst_update] 188 public : SC_IN (Tcontrol_t ) ** in_UPDATE_UPT_RAS_PREDICTION_IFETCH ; //[nb_inst_update] 163 public : SC_OUT(Tcontrol_t ) ** out_UPDATE_BTB_VAL ; //[nb_inst_branch_update] 164 public : SC_IN (Tcontrol_t ) ** in_UPDATE_BTB_ACK ; //[nb_inst_branch_update] 165 //public : SC_OUT(Tcontext_t ) ** out_UPDATE_BTB_CONTEXT_ID ; //[nb_inst_branch_update] UPT.CONTEXT_ID 166 //public : SC_OUT(Taddress_t ) ** out_UPDATE_BTB_ADDRESS_SRC ; //[nb_inst_branch_update] UPT.BTB_ADDRESS_SRC 167 //public : SC_OUT(Taddress_t ) ** out_UPDATE_BTB_ADDRESS_DEST ; //[nb_inst_branch_update] UPT.BTB_ADDRESS_DEST 168 //public : SC_OUT(Tbranch_condition_t) ** out_UPDATE_BTB_CONDITION ; //[nb_inst_branch_update]*UPT.BTB_CONDITION 169 //public : SC_OUT(Tcontrol_t ) ** out_UPDATE_BTB_LAST_TAKE ; //[nb_inst_branch_update] UPT.DIRECTION_GOOD 170 //public : SC_OUT(Tcontrol_t ) ** out_UPDATE_BTB_MISS_PREDICTION ; //[nb_inst_branch_update] UPT.MISS_PREDICTION 171 172 public : SC_OUT(Tcontrol_t ) ** out_UPDATE_DIR_VAL ; //[nb_inst_branch_update] 173 public : SC_IN (Tcontrol_t ) ** in_UPDATE_DIR_ACK ; //[nb_inst_branch_update] 174 //public : SC_OUT(Taddress_t ) ** out_UPDATE_DIR_ADDRESS ; //[nb_inst_branch_update] UPT.BTB_ADDRESS_SRC 175 //public : SC_OUT(Thistory_t ) ** out_UPDATE_DIR_HISTORY ; //[nb_inst_branch_update] UPT.DIR_HISTORY 176 //public : SC_OUT(Tcontrol_t ) ** out_UPDATE_DIR_DIRECTION ; //[nb_inst_branch_update] UPT.DIRECTION_GOOD 177 178 public : SC_OUT(Tcontrol_t ) ** out_UPDATE_RAS_VAL ; //[nb_inst_branch_update] 179 public : SC_IN (Tcontrol_t ) ** in_UPDATE_RAS_ACK ; //[nb_inst_branch_update] 180 //public : SC_OUT(Tcontext_t ) ** out_UPDATE_RAS_CONTEXT_ID ; //[nb_inst_branch_update] UPT.CONTEXT_ID 181 //public : SC_OUT(Tcontrol_t ) ** out_UPDATE_RAS_PUSH ; //[nb_inst_branch_update] UPT.RAS_PUSH 182 //public : SC_OUT(Taddress_t ) ** out_UPDATE_RAS_ADDRESS ; //[nb_inst_branch_update] UPT.RAS_ADDRESS 183 //public : SC_OUT(Tptr_t ) ** out_UPDATE_RAS_INDEX ; //[nb_inst_branch_update] UPT.RAS_INDEX 184 //public : SC_OUT(Tcontrol_t ) ** out_UPDATE_RAS_MISS_PREDICTION ; //[nb_inst_branch_update] UPT.MISS_PREDICTION 185 //public : SC_OUT(Tcontrol_t ) ** out_UPDATE_RAS_PREDICTION_IFETCH ; //[nb_inst_branch_update] UPT.RAS_PREDICTION_IFETCH 186 187 public : SC_IN (Tcontrol_t ) ** in_UPDATE_UPT_VAL ; //[nb_inst_branch_update] 188 public : SC_OUT(Tcontrol_t ) ** out_UPDATE_UPT_ACK ; //[nb_inst_branch_update] 189 //public : SC_IN (Tcontext_t ) ** in_UPDATE_UPT_CONTEXT_ID ; //[nb_inst_branch_update] BTB.CONTEXT_ID, RAS.CONTEXT_ID 190 //public : SC_IN (Tcontrol_t ) ** in_UPDATE_UPT_MISS_PREDICTION ; //[nb_inst_branch_update] BTB.MISS_PREDICTION, RAS.MISS_PREDICTION 191 //public : SC_IN (Tcontrol_t ) ** in_UPDATE_UPT_DIRECTION_GOOD ; //[nb_inst_branch_update] BTB.LAST_TAKE, DIR.DIRECTION 192 public : SC_IN (Tcontrol_t ) ** in_UPDATE_UPT_BTB_VAL ; //[nb_inst_branch_update] 193 //public : SC_IN (Taddress_t ) ** in_UPDATE_UPT_BTB_ADDRESS_SRC ; //[nb_inst_branch_update] DIR.ADDRESS, BTB.ADDRESS_SRC 194 //public : SC_IN (Taddress_t ) ** in_UPDATE_UPT_BTB_ADDRESS_DEST ; //[nb_inst_branch_update] BTB.ADDRESS_DEST 195 //public : SC_IN (Tbranch_condition_t) ** in_UPDATE_UPT_BTB_CONDITION ; //[nb_inst_branch_update]*BTB.CONDITION 196 public : SC_IN (Tcontrol_t ) ** in_UPDATE_UPT_DIR_VAL ; //[nb_inst_branch_update] 197 //public : SC_IN (Thistory_t ) ** in_UPDATE_UPT_DIR_HISTORY ; //[nb_inst_branch_update] DIR.HISTORY 198 public : SC_IN (Tcontrol_t ) ** in_UPDATE_UPT_RAS_VAL ; //[nb_inst_branch_update] 199 //public : SC_IN (Taddress_t ) ** in_UPDATE_UPT_RAS_ADDRESS ; //[nb_inst_branch_update] RAS.ADDRESS 200 //public : SC_IN (Tcontrol_t ) ** in_UPDATE_UPT_RAS_PUSH ; //[nb_inst_branch_update] RAS.PUSH 201 //public : SC_IN (Tptr_t ) ** in_UPDATE_UPT_RAS_INDEX ; //[nb_inst_branch_update] RAS.INDEX 202 //public : SC_IN (Tcontrol_t ) ** in_UPDATE_UPT_RAS_PREDICTION_IFETCH ; //[nb_inst_branch_update] RAS.PREDICTION_IFETCH 189 203 190 204 // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 191 205 public : SC_IN (Tdepth_t ) ** in_DEPTH_UPT_NB_BRANCH ; //[nb_context] 192 206 public : SC_IN (Tdepth_t ) ** in_DEPTH_UPT_TAIL ; //[nb_context] 207 public : SC_OUT(Tdepth_t ) ** out_DEPTH_NB_BRANCH ; //[nb_context] 208 public : SC_OUT(Tdepth_t ) ** out_DEPTH_TAIL ; //[nb_context] 193 209 194 210 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 196 212 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 197 213 private : uint32_t reg_PREDICT_PRIORITY; 214 private : uint32_t reg_DECOD_PRIORITY; 198 215 199 216 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 233 250 //public : void genMoore (void); 234 251 public : void genMealy_predict (void); 235 //public : void genMealy_decod (void);236 //public : void genMealy_update (void);252 public : void genMealy_decod (void); 253 public : void genMealy_update (void); 237 254 #endif 238 255 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters.cpp
r81 r82 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Parameters.h" 9 #include "Common/include/Max.h" 9 10 10 11 namespace morpheo { … … 19 20 #undef FUNCTION 20 21 #define FUNCTION "Prediction_unit_Glue::Parameters" 21 Parameters::Parameters (uint32_t nb_context , 22 uint32_t size_address , 23 uint32_t * nb_instruction , 24 uint32_t * size_depth , 25 uint32_t nb_inst_predict, 26 uint32_t nb_inst_decod , 27 uint32_t nb_inst_update ) 22 Parameters::Parameters (uint32_t nb_context , 23 uint32_t nb_decod_unit , 24 // uint32_t nb_ooo_engine , 25 uint32_t size_address , 26 uint32_t * nb_instruction , 27 uint32_t * size_depth , 28 uint32_t * nb_inst_decod , 29 // uint32_t * nb_inst_update , 30 uint32_t nb_inst_branch_predict, 31 uint32_t nb_inst_branch_decod , 32 uint32_t nb_inst_branch_update ) 28 33 { 29 34 log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin"); 30 35 31 _nb_context = nb_context ; 32 _size_address = size_address ; 33 _nb_instruction = nb_instruction ; 34 _size_depth = size_depth ; 35 _nb_inst_predict = nb_inst_predict ; 36 _nb_inst_decod = nb_inst_decod ; 37 _nb_inst_update = nb_inst_update ; 38 36 _nb_context = nb_context ; 37 _size_address = size_address ; 38 _nb_instruction = nb_instruction ; 39 _size_depth = size_depth ; 40 _nb_decod_unit = nb_decod_unit ; 41 _nb_inst_decod = nb_inst_decod ; 42 // _nb_ooo_engine = nb_ooo_engine ; 43 // _nb_inst_update = nb_inst_update ; 44 _nb_inst_branch_predict = nb_inst_branch_predict; 45 _nb_inst_branch_decod = nb_inst_branch_decod ; 46 _nb_inst_branch_update = nb_inst_branch_update ; 47 39 48 _size_context_id = log2(_nb_context); 40 49 _size_inst_ifetch_ptr = new uint32_t [_nb_context]; 50 _max_size_depth = max<uint32_t>(_size_depth,_nb_context); 41 51 42 52 _have_port_context_id = (_size_context_id>0); 53 _have_port_max_depth = (_max_size_depth>0); 43 54 _have_port_depth = new bool [_nb_context]; 44 55 _have_port_inst_ifetch_ptr = new bool [_nb_context]; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters_msg_error.cpp
r81 r82 27 27 Parameters_test test ("Prediction_unit_Glue"); 28 28 29 if (_nb_inst_ predict > _nb_context)29 if (_nb_inst_branch_predict > _nb_context) 30 30 test.error("nb_inst_predict must be <= nb_context\n"); 31 31 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters_print.cpp
r81 r82 27 27 28 28 xml.balise_open("prediction_unit_glue"); 29 xml.singleton_begin("nb_context "); xml.attribut("value",toString(_nb_context )); xml.singleton_end(); 30 xml.singleton_begin("size_address "); xml.attribut("value",toString(_size_address )); xml.singleton_end(); 31 xml.singleton_begin("nb_inst_predict"); xml.attribut("value",toString(_nb_inst_predict)); xml.singleton_end(); 32 xml.singleton_begin("nb_inst_decod "); xml.attribut("value",toString(_nb_inst_decod )); xml.singleton_end(); 33 xml.singleton_begin("nb_inst_update "); xml.attribut("value",toString(_nb_inst_update )); xml.singleton_end(); 29 xml.singleton_begin("nb_context "); xml.attribut("value",toString(_nb_context )); xml.singleton_end(); 30 xml.singleton_begin("nb_decod_unit "); xml.attribut("value",toString(_nb_decod_unit )); xml.singleton_end(); 31 // xml.singleton_begin("nb_ooo_engine "); xml.attribut("value",toString(_nb_ooo_engine )); xml.singleton_end(); 32 xml.singleton_begin("size_address "); xml.attribut("value",toString(_size_address )); xml.singleton_end(); 33 xml.singleton_begin("nb_inst_branch_predict"); xml.attribut("value",toString(_nb_inst_branch_predict)); xml.singleton_end(); 34 xml.singleton_begin("nb_inst_branch_decod "); xml.attribut("value",toString(_nb_inst_branch_decod )); xml.singleton_end(); 35 xml.singleton_begin("nb_inst_branch_update "); xml.attribut("value",toString(_nb_inst_branch_update )); xml.singleton_end(); 36 37 // xml.singleton_begin("nb_inst_decod "); xml.attribut("value",toString(_nb_inst_decod )); xml.singleton_end(); 38 // xml.singleton_begin("nb_inst_update "); xml.attribut("value",toString(_nb_inst_update )); xml.singleton_end(); 34 39 for (uint32_t i=0;i<_nb_context; i++) 35 40 { … … 38 43 xml. attribut("id" ,toString(i)); 39 44 xml. balise_open_end(); 40 xml. singleton_begin("nb_instruction "); xml.attribut("value",toString(_nb_instruction[i])); xml.singleton_end();41 xml. singleton_begin("size_depth "); xml.attribut("value",toString(_size_depth[i])); xml.singleton_end();45 xml. singleton_begin("nb_instruction "); xml.attribut("value",toString(_nb_instruction [i])); xml.singleton_end(); 46 xml. singleton_begin("size_depth "); xml.attribut("value",toString(_size_depth [i])); xml.singleton_end(); 42 47 xml. balise_close(); 43 48 } 49 for (uint32_t i=0;i<_nb_decod_unit; i++) 50 { 51 xml. balise_open_begin("component"); 52 xml. attribut("type","decod_unit"); 53 xml. attribut("id" ,toString(i)); 54 xml. balise_open_end(); 55 xml. singleton_begin("nb_inst_decod "); xml.attribut("value",toString(_nb_inst_decod [i])); xml.singleton_end(); 56 xml. balise_close(); 57 } 58 // for (uint32_t i=0;i<_nb_ooo_engine; i++) 59 // { 60 // xml. balise_open_begin("component"); 61 // xml. attribut("type","ooo_engine"); 62 // xml. attribut("id" ,toString(i)); 63 // xml. balise_open_end(); 64 // xml. singleton_begin("nb_inst_update "); xml.attribut("value",toString(_nb_inst_update [i])); xml.singleton_end(); 65 // xml. balise_close(); 66 // } 67 44 68 xml.balise_close(); 45 69 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue.cpp
r81 r82 92 92 << (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 93 93 } 94 for (uint32_t i=0; i<_param->_nb_inst_ predict; i++)94 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 95 95 { 96 96 sensitive << (*( in_PREDICT_BTB_ACK [i])) … … 110 110 << (*( in_PREDICT_UPT_ACK [i])); 111 111 } 112 for (uint32_t i=0; i<_param->_nb_context; i++) 113 { 114 sensitive << (*(in_DEPTH_UPT_NB_BRANCH [i])); 115 if (_param->_have_port_depth[i]) 116 sensitive << (*(in_DEPTH_UPT_TAIL [i])); 117 } 112 118 113 119 # ifdef SYSTEMCASS_SPECIFIC … … 115 121 for (uint32_t x=0; x<_param->_nb_context; x++) 116 122 { 123 if (_param->_have_port_depth[x]) 124 { 125 (*(out_DEPTH_TAIL [x])) (*( in_DEPTH_UPT_TAIL [x])); 126 } 127 (*(out_DEPTH_NB_BRANCH [x])) (*( in_DEPTH_UPT_NB_BRANCH [x])); 128 117 129 for (uint32_t i=0; i<_param->_nb_context; i++) 118 130 { … … 121 133 (*(out_PREDICT_ACK [x])) (*( in_PREDICT_PC_CURRENT [i])); 122 134 (*(out_PREDICT_ACK [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 123 } 124 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 135 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 136 { 137 (*(out_PREDICT_ACK [x])) (*( in_DEPTH_UPT_TAIL [i])); 138 } 139 (*(out_PREDICT_ACK [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 140 } 141 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 125 142 { 126 143 (*(out_PREDICT_ACK [x])) (*( in_PREDICT_BTB_ACK [i])); … … 147 164 (*(out_PREDICT_PC_NEXT [x])) (*( in_PREDICT_PC_CURRENT [i])); 148 165 (*(out_PREDICT_PC_NEXT [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 149 } 150 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 166 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 167 { 168 (*(out_PREDICT_PC_NEXT [x])) (*( in_DEPTH_UPT_TAIL [i])); 169 } 170 (*(out_PREDICT_PC_NEXT [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 171 } 172 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 151 173 { 152 174 (*(out_PREDICT_PC_NEXT [x])) (*( in_PREDICT_BTB_ACK [i])); … … 173 195 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE [x])) (*( in_PREDICT_PC_CURRENT [i])); 174 196 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 175 } 176 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 197 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 198 { 199 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE [x])) (*( in_DEPTH_UPT_TAIL [i])); 200 } 201 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 202 } 203 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 177 204 { 178 205 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE [x])) (*( in_PREDICT_BTB_ACK [i])); … … 201 228 (*(out_PREDICT_INST_IFETCH_PTR [x])) (*( in_PREDICT_PC_CURRENT [i])); 202 229 (*(out_PREDICT_INST_IFETCH_PTR [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 203 } 204 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 230 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 231 { 232 (*(out_PREDICT_INST_IFETCH_PTR [x])) (*( in_DEPTH_UPT_TAIL [i])); 233 } 234 (*(out_PREDICT_INST_IFETCH_PTR [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 235 } 236 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 205 237 { 206 238 (*(out_PREDICT_INST_IFETCH_PTR [x])) (*( in_PREDICT_BTB_ACK [i])); … … 228 260 (*(out_PREDICT_BRANCH_STATE [x]))(*( in_PREDICT_PC_CURRENT [i])); 229 261 (*(out_PREDICT_BRANCH_STATE [x]))(*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 230 } 231 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 262 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 263 { 264 (*(out_PREDICT_BRANCH_STATE [x]))(*( in_DEPTH_UPT_TAIL [i])); 265 } 266 (*(out_PREDICT_BRANCH_STATE [x]))(*( in_DEPTH_UPT_NB_BRANCH [i])); 267 } 268 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 232 269 { 233 270 (*(out_PREDICT_BRANCH_STATE [x])) (*( in_PREDICT_BTB_ACK [i])); … … 256 293 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_PC_CURRENT [i])); 257 294 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 258 } 259 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 295 if (_param->_have_port_depth [i]) 296 { 297 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_DEPTH_UPT_TAIL [i])); 298 } 299 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 300 } 301 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 260 302 { 261 303 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_BTB_ACK [i])); … … 285 327 (*(out_PREDICT_INSTRUCTION_ENABLE [x][y])) (*( in_PREDICT_PC_CURRENT [i])); 286 328 (*(out_PREDICT_INSTRUCTION_ENABLE [x][y])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 287 } 288 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 329 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 330 { 331 (*(out_PREDICT_INSTRUCTION_ENABLE [x][y])) (*( in_DEPTH_UPT_TAIL [i])); 332 } 333 (*(out_PREDICT_INSTRUCTION_ENABLE [x][y])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 334 } 335 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 289 336 { 290 337 (*(out_PREDICT_INSTRUCTION_ENABLE [x][y])) (*( in_PREDICT_BTB_ACK [i])); … … 307 354 } 308 355 309 for (uint32_t x=0; x<_param->_nb_inst_ predict; x++)356 for (uint32_t x=0; x<_param->_nb_inst_branch_predict; x++) 310 357 { 311 358 for (uint32_t i=0; i<_param->_nb_context; i++) … … 315 362 (*(out_PREDICT_BTB_VAL [x])) (*( in_PREDICT_PC_CURRENT [i])); 316 363 (*(out_PREDICT_BTB_VAL [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 317 } 318 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 364 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 365 { 366 (*(out_PREDICT_BTB_VAL [x])) (*( in_DEPTH_UPT_TAIL [i])); 367 } 368 (*(out_PREDICT_BTB_VAL [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 369 } 370 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 319 371 { 320 372 (*(out_PREDICT_BTB_VAL [x])) (*( in_PREDICT_BTB_ACK [i])); … … 343 395 (*(out_PREDICT_BTB_CONTEXT_ID [x])) (*( in_PREDICT_PC_CURRENT [i])); 344 396 (*(out_PREDICT_BTB_CONTEXT_ID [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 345 } 346 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 397 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 398 { 399 (*(out_PREDICT_BTB_CONTEXT_ID [x])) (*( in_DEPTH_UPT_TAIL [i])); 400 } 401 (*(out_PREDICT_BTB_CONTEXT_ID [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 402 } 403 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 347 404 { 348 405 (*(out_PREDICT_BTB_CONTEXT_ID [x])) (*( in_PREDICT_BTB_ACK [i])); … … 370 427 (*(out_PREDICT_BTB_ADDRESS [x])) (*( in_PREDICT_PC_CURRENT [i])); 371 428 (*(out_PREDICT_BTB_ADDRESS [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 372 } 373 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 429 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 430 { 431 (*(out_PREDICT_BTB_ADDRESS [x])) (*( in_DEPTH_UPT_TAIL [i])); 432 } 433 (*(out_PREDICT_BTB_ADDRESS [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 434 } 435 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 374 436 { 375 437 (*(out_PREDICT_BTB_ADDRESS [x])) (*( in_PREDICT_BTB_ACK [i])); … … 396 458 (*(out_PREDICT_DIR_VAL [x])) (*( in_PREDICT_PC_CURRENT [i])); 397 459 (*(out_PREDICT_DIR_VAL [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 398 } 399 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 460 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 461 { 462 (*(out_PREDICT_DIR_VAL [x])) (*( in_DEPTH_UPT_TAIL [i])); 463 } 464 (*(out_PREDICT_DIR_VAL [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 465 } 466 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 400 467 { 401 468 (*(out_PREDICT_DIR_VAL [x])) (*( in_PREDICT_BTB_ACK [i])); … … 422 489 (*(out_PREDICT_DIR_ADDRESS_SRC [x])) (*( in_PREDICT_PC_CURRENT [i])); 423 490 (*(out_PREDICT_DIR_ADDRESS_SRC [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 424 } 425 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 491 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 492 { 493 (*(out_PREDICT_DIR_ADDRESS_SRC [x])) (*( in_DEPTH_UPT_TAIL [i])); 494 } 495 (*(out_PREDICT_DIR_ADDRESS_SRC [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 496 } 497 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 426 498 { 427 499 (*(out_PREDICT_DIR_ADDRESS_SRC [x])) (*( in_PREDICT_BTB_ACK [i])); … … 448 520 (*(out_PREDICT_DIR_STATIC [x])) (*( in_PREDICT_PC_CURRENT [i])); 449 521 (*(out_PREDICT_DIR_STATIC [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 450 } 451 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 522 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 523 { 524 (*(out_PREDICT_DIR_STATIC [x])) (*( in_DEPTH_UPT_TAIL [i])); 525 } 526 (*(out_PREDICT_DIR_STATIC [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 527 } 528 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 452 529 { 453 530 (*(out_PREDICT_DIR_STATIC [x])) (*( in_PREDICT_BTB_ACK [i])); … … 474 551 // (*(out_PREDICT_DIR_LAST_TAKE [x])) (*( in_PREDICT_PC_CURRENT [i])); 475 552 // (*(out_PREDICT_DIR_LAST_TAKE [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 553 // if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 554 // { 555 // (*(out_PREDICT_DIR_LAST_TAKE [x])) (*( in_DEPTH_UPT_TAIL [i])); 556 // } 557 // (*(out_PREDICT_DIR_LAST_TAKE [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 476 558 // } 477 // for (uint32_t i=0; i<_param->_nb_inst_ predict; i++)559 // for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 478 560 // { 479 561 // (*(out_PREDICT_DIR_LAST_TAKE [x])) (*( in_PREDICT_BTB_ACK [i])); … … 500 582 (*(out_PREDICT_RAS_VAL [x])) (*( in_PREDICT_PC_CURRENT [i])); 501 583 (*(out_PREDICT_RAS_VAL [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 502 } 503 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 584 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 585 { 586 (*(out_PREDICT_RAS_VAL [x])) (*( in_DEPTH_UPT_TAIL [i])); 587 } 588 (*(out_PREDICT_RAS_VAL [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 589 } 590 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 504 591 { 505 592 (*(out_PREDICT_RAS_VAL [x])) (*( in_PREDICT_BTB_ACK [i])); … … 528 615 (*(out_PREDICT_RAS_CONTEXT_ID [x])) (*( in_PREDICT_PC_CURRENT [i])); 529 616 (*(out_PREDICT_RAS_CONTEXT_ID [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 530 } 531 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 617 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 618 { 619 (*(out_PREDICT_RAS_CONTEXT_ID [x])) (*( in_DEPTH_UPT_TAIL [i])); 620 } 621 (*(out_PREDICT_RAS_CONTEXT_ID [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 622 } 623 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 532 624 { 533 625 (*(out_PREDICT_RAS_CONTEXT_ID [x])) (*( in_PREDICT_BTB_ACK [i])); … … 555 647 (*(out_PREDICT_RAS_PUSH [x])) (*( in_PREDICT_PC_CURRENT [i])); 556 648 (*(out_PREDICT_RAS_PUSH [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 557 } 558 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 649 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 650 { 651 (*(out_PREDICT_RAS_PUSH [x])) (*( in_DEPTH_UPT_TAIL [i])); 652 } 653 (*(out_PREDICT_RAS_PUSH [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 654 } 655 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 559 656 { 560 657 (*(out_PREDICT_RAS_PUSH [x])) (*( in_PREDICT_BTB_ACK [i])); … … 581 678 (*(out_PREDICT_RAS_ADDRESS_PUSH [x])) (*( in_PREDICT_PC_CURRENT [i])); 582 679 (*(out_PREDICT_RAS_ADDRESS_PUSH [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 583 } 584 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 680 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 681 { 682 (*(out_PREDICT_RAS_ADDRESS_PUSH [x])) (*( in_DEPTH_UPT_TAIL [i])); 683 } 684 (*(out_PREDICT_RAS_ADDRESS_PUSH [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 685 } 686 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 585 687 { 586 688 (*(out_PREDICT_RAS_ADDRESS_PUSH [x])) (*( in_PREDICT_BTB_ACK [i])); … … 607 709 (*(out_PREDICT_UPT_VAL [x])) (*( in_PREDICT_PC_CURRENT [i])); 608 710 (*(out_PREDICT_UPT_VAL [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 609 } 610 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 711 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 712 { 713 (*(out_PREDICT_UPT_VAL [x])) (*( in_DEPTH_UPT_TAIL [i])); 714 } 715 (*(out_PREDICT_UPT_VAL [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 716 } 717 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 611 718 { 612 719 (*(out_PREDICT_UPT_VAL [x])) (*( in_PREDICT_BTB_ACK [i])); … … 635 742 (*(out_PREDICT_UPT_CONTEXT_ID [x])) (*( in_PREDICT_PC_CURRENT [i])); 636 743 (*(out_PREDICT_UPT_CONTEXT_ID [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 637 } 638 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 744 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 745 { 746 (*(out_PREDICT_UPT_CONTEXT_ID [x])) (*( in_DEPTH_UPT_TAIL [i])); 747 } 748 (*(out_PREDICT_UPT_CONTEXT_ID [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 749 } 750 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 639 751 { 640 752 (*(out_PREDICT_UPT_CONTEXT_ID [x])) (*( in_PREDICT_BTB_ACK [i])); … … 662 774 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC [x])) (*( in_PREDICT_PC_CURRENT [i])); 663 775 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 664 } 665 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 776 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 777 { 778 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC [x])) (*( in_DEPTH_UPT_TAIL [i])); 779 } 780 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 781 } 782 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 666 783 { 667 784 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC [x])) (*( in_PREDICT_BTB_ACK [i])); … … 688 805 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_PC_CURRENT [i])); 689 806 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 690 } 691 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 807 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 808 { 809 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_DEPTH_UPT_TAIL [i])); 810 } 811 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 812 } 813 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 692 814 { 693 815 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_BTB_ACK [i])); … … 714 836 (*(out_PREDICT_UPT_BTB_CONDITION [x])) (*( in_PREDICT_PC_CURRENT [i])); 715 837 (*(out_PREDICT_UPT_BTB_CONDITION [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 716 } 717 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 838 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 839 { 840 (*(out_PREDICT_UPT_BTB_CONDITION [x])) (*( in_DEPTH_UPT_TAIL [i])); 841 } 842 (*(out_PREDICT_UPT_BTB_CONDITION [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 843 } 844 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 718 845 { 719 846 (*(out_PREDICT_UPT_BTB_CONDITION [x])) (*( in_PREDICT_BTB_ACK [i])); … … 740 867 (*(out_PREDICT_UPT_BTB_LAST_TAKE [x])) (*( in_PREDICT_PC_CURRENT [i])); 741 868 (*(out_PREDICT_UPT_BTB_LAST_TAKE [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 742 } 743 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 869 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 870 { 871 (*(out_PREDICT_UPT_BTB_LAST_TAKE [x])) (*( in_DEPTH_UPT_TAIL [i])); 872 } 873 (*(out_PREDICT_UPT_BTB_LAST_TAKE [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 874 } 875 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 744 876 { 745 877 (*(out_PREDICT_UPT_BTB_LAST_TAKE [x])) (*( in_PREDICT_BTB_ACK [i])); … … 766 898 (*(out_PREDICT_UPT_BTB_IS_ACCURATE [x])) (*( in_PREDICT_PC_CURRENT [i])); 767 899 (*(out_PREDICT_UPT_BTB_IS_ACCURATE [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 768 } 769 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 900 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 901 { 902 (*(out_PREDICT_UPT_BTB_IS_ACCURATE [x])) (*( in_DEPTH_UPT_TAIL [i])); 903 } 904 (*(out_PREDICT_UPT_BTB_IS_ACCURATE [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 905 } 906 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 770 907 { 771 908 (*(out_PREDICT_UPT_BTB_IS_ACCURATE [x])) (*( in_PREDICT_BTB_ACK [i])); … … 792 929 // (*(out_PREDICT_UPT_DIR_HISTORY [x])) (*( in_PREDICT_PC_CURRENT [i])); 793 930 // (*(out_PREDICT_UPT_DIR_HISTORY [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 931 // if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 932 // { 933 // (*(out_PREDICT_UPT_DIR_HISTORY [x])) (*( in_DEPTH_UPT_TAIL [i])); 934 // } 935 // (*(out_PREDICT_UPT_DIR_HISTORY [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 794 936 // } 795 // for (uint32_t i=0; i<_param->_nb_inst_ predict; i++)937 // for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 796 938 // { 797 939 // (*(out_PREDICT_UPT_DIR_HISTORY [x])) (*( in_PREDICT_BTB_ACK [i])); … … 818 960 (*(out_PREDICT_UPT_RAS_ADDRESS [x])) (*( in_PREDICT_PC_CURRENT [i])); 819 961 (*(out_PREDICT_UPT_RAS_ADDRESS [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 820 } 821 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 962 if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 963 { 964 (*(out_PREDICT_UPT_RAS_ADDRESS [x])) (*( in_DEPTH_UPT_TAIL [i])); 965 } 966 (*(out_PREDICT_UPT_RAS_ADDRESS [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 967 } 968 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 822 969 { 823 970 (*(out_PREDICT_UPT_RAS_ADDRESS [x])) (*( in_PREDICT_BTB_ACK [i])); … … 844 991 // (*(out_PREDICT_UPT_RAS_INDEX [x])) (*( in_PREDICT_PC_CURRENT [i])); 845 992 // (*(out_PREDICT_UPT_RAS_INDEX [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE [i])); 993 // if (_param->_have_port_depth[x] and _param->_have_port_depth[i]) 994 // { 995 // (*(out_PREDICT_UPT_RAS_INDEX [x])) (*( in_DEPTH_UPT_TAIL [i])); 996 // } 997 // (*(out_PREDICT_UPT_RAS_INDEX [x])) (*( in_DEPTH_UPT_NB_BRANCH [i])); 846 998 // } 847 // for (uint32_t i=0; i<_param->_nb_inst_ predict; i++)999 // for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 848 1000 // { 849 1001 // (*(out_PREDICT_UPT_RAS_INDEX [x])) (*( in_PREDICT_BTB_ACK [i])); … … 865 1017 } 866 1018 # endif 1019 1020 log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Method - genMealy_decod"); 1021 1022 SC_METHOD (genMealy_decod); 1023 dont_initialize (); 1024 sensitive << (*(in_CLOCK)).neg(); // use internal register 1025 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1026 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1027 { 1028 sensitive << (*(in_DECOD_VAL [i][j])) 1029 << (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])) 1030 << (*(in_DECOD_BRANCH_STATE [i][j])) 1031 << (*(in_DECOD_BRANCH_CONDITION [i][j])) 1032 << (*(in_DECOD_BRANCH_DIRECTION [i][j])) 1033 << (*(in_DECOD_ADDRESS_SRC [i][j])) 1034 << (*(in_DECOD_ADDRESS_DEST [i][j])); 1035 1036 if (_param->_have_port_context_id) 1037 sensitive << (*(in_DECOD_CONTEXT_ID [i][j])); 1038 if (_param->_have_port_max_depth) 1039 sensitive << (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1040 } 1041 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1042 { 1043 sensitive << (*(in_DECOD_BTB_ACK [i] )) 1044 << (*(in_DECOD_RAS_ACK [i] )) 1045 << (*(in_DECOD_RAS_HIT [i] )) 1046 << (*(in_DECOD_RAS_ADDRESS_POP [i] )) 1047 // << (*(in_DECOD_RAS_INDEX [i] )) 1048 << (*(in_DECOD_UPT_ACK [i] )) ; 1049 } 1050 1051 # ifdef SYSTEMCASS_SPECIFIC 1052 // List dependency information 867 1053 1054 for (uint32_t x=0; x<_param->_nb_decod_unit; x++) 1055 for (uint32_t y=0; y<_param->_nb_inst_decod[x]; y++) 1056 { 1057 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1058 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1059 { 1060 (*(out_DECOD_ACK [x][y])) (*(in_DECOD_VAL [i][j])); 1061 if (_param->_have_port_context_id) 1062 (*(out_DECOD_ACK [x][y])) (*(in_DECOD_CONTEXT_ID [i][j])); 1063 (*(out_DECOD_ACK [x][y])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1064 (*(out_DECOD_ACK [x][y])) (*(in_DECOD_BRANCH_STATE [i][j])); 1065 if (_param->_have_port_max_depth) 1066 (*(out_DECOD_ACK [x][y])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1067 (*(out_DECOD_ACK [x][y])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1068 (*(out_DECOD_ACK [x][y])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1069 (*(out_DECOD_ACK [x][y])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1070 (*(out_DECOD_ACK [x][y])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1071 } 1072 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1073 { 1074 (*(out_DECOD_ACK [x][y])) (*(in_DECOD_BTB_ACK [i] )); 1075 (*(out_DECOD_ACK [x][y])) (*(in_DECOD_RAS_ACK [i] )); 1076 (*(out_DECOD_ACK [x][y])) (*(in_DECOD_RAS_HIT [i] )); 1077 (*(out_DECOD_ACK [x][y])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1078 // (*(out_DECOD_ACK [x][y])) (*(in_DECOD_RAS_INDEX [i] )); 1079 (*(out_DECOD_ACK [x][y])) (*(in_DECOD_UPT_ACK [i] )); 1080 } 1081 } 1082 1083 for (uint32_t x=0; x<_param->_nb_inst_branch_decod; x++) 1084 { 1085 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1086 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1087 { 1088 (*(out_DECOD_BTB_VAL [x])) (*(in_DECOD_VAL [i][j])); 1089 if (_param->_have_port_context_id) 1090 (*(out_DECOD_BTB_VAL [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1091 (*(out_DECOD_BTB_VAL [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1092 (*(out_DECOD_BTB_VAL [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1093 if (_param->_have_port_max_depth) 1094 (*(out_DECOD_BTB_VAL [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1095 (*(out_DECOD_BTB_VAL [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1096 (*(out_DECOD_BTB_VAL [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1097 (*(out_DECOD_BTB_VAL [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1098 (*(out_DECOD_BTB_VAL [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1099 } 1100 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1101 { 1102 (*(out_DECOD_BTB_VAL [x])) (*(in_DECOD_BTB_ACK [i] )); 1103 (*(out_DECOD_BTB_VAL [x])) (*(in_DECOD_RAS_ACK [i] )); 1104 (*(out_DECOD_BTB_VAL [x])) (*(in_DECOD_RAS_HIT [i] )); 1105 (*(out_DECOD_BTB_VAL [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1106 // (*(out_DECOD_BTB_VAL [x])) (*(in_DECOD_RAS_INDEX [i] )); 1107 (*(out_DECOD_BTB_VAL [x])) (*(in_DECOD_UPT_ACK [i] )); 1108 } 1109 1110 if (_param->_have_port_context_id) 1111 { 1112 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1113 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1114 { 1115 (*(out_DECOD_BTB_CONTEXT_ID [x])) (*(in_DECOD_VAL [i][j])); 1116 (*(out_DECOD_BTB_CONTEXT_ID [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1117 (*(out_DECOD_BTB_CONTEXT_ID [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1118 (*(out_DECOD_BTB_CONTEXT_ID [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1119 if (_param->_have_port_max_depth) 1120 (*(out_DECOD_BTB_CONTEXT_ID [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1121 (*(out_DECOD_BTB_CONTEXT_ID [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1122 (*(out_DECOD_BTB_CONTEXT_ID [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1123 (*(out_DECOD_BTB_CONTEXT_ID [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1124 (*(out_DECOD_BTB_CONTEXT_ID [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1125 } 1126 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1127 { 1128 (*(out_DECOD_BTB_CONTEXT_ID [x])) (*(in_DECOD_BTB_ACK [i] )); 1129 (*(out_DECOD_BTB_CONTEXT_ID [x])) (*(in_DECOD_RAS_ACK [i] )); 1130 (*(out_DECOD_BTB_CONTEXT_ID [x])) (*(in_DECOD_RAS_HIT [i] )); 1131 (*(out_DECOD_BTB_CONTEXT_ID [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1132 // (*(out_DECOD_BTB_CONTEXT_ID [x])) (*(in_DECOD_RAS_INDEX [i] )); 1133 (*(out_DECOD_BTB_CONTEXT_ID [x])) (*(in_DECOD_UPT_ACK [i] )); 1134 } 1135 } 1136 1137 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1138 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1139 { 1140 (*(out_DECOD_BTB_ADDRESS_SRC [x])) (*(in_DECOD_VAL [i][j])); 1141 if (_param->_have_port_context_id) 1142 (*(out_DECOD_BTB_ADDRESS_SRC [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1143 (*(out_DECOD_BTB_ADDRESS_SRC [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1144 (*(out_DECOD_BTB_ADDRESS_SRC [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1145 if (_param->_have_port_max_depth) 1146 (*(out_DECOD_BTB_ADDRESS_SRC [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1147 (*(out_DECOD_BTB_ADDRESS_SRC [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1148 (*(out_DECOD_BTB_ADDRESS_SRC [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1149 (*(out_DECOD_BTB_ADDRESS_SRC [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1150 (*(out_DECOD_BTB_ADDRESS_SRC [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1151 } 1152 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1153 { 1154 (*(out_DECOD_BTB_ADDRESS_SRC [x])) (*(in_DECOD_BTB_ACK [i] )); 1155 (*(out_DECOD_BTB_ADDRESS_SRC [x])) (*(in_DECOD_RAS_ACK [i] )); 1156 (*(out_DECOD_BTB_ADDRESS_SRC [x])) (*(in_DECOD_RAS_HIT [i] )); 1157 (*(out_DECOD_BTB_ADDRESS_SRC [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1158 // (*(out_DECOD_BTB_ADDRESS_SRC [x])) (*(in_DECOD_RAS_INDEX [i] )); 1159 (*(out_DECOD_BTB_ADDRESS_SRC [x])) (*(in_DECOD_UPT_ACK [i] )); 1160 } 1161 1162 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1163 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1164 { 1165 (*(out_DECOD_BTB_ADDRESS_DEST [x])) (*(in_DECOD_VAL [i][j])); 1166 if (_param->_have_port_context_id) 1167 (*(out_DECOD_BTB_ADDRESS_DEST [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1168 (*(out_DECOD_BTB_ADDRESS_DEST [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1169 (*(out_DECOD_BTB_ADDRESS_DEST [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1170 if (_param->_have_port_max_depth) 1171 (*(out_DECOD_BTB_ADDRESS_DEST [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1172 (*(out_DECOD_BTB_ADDRESS_DEST [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1173 (*(out_DECOD_BTB_ADDRESS_DEST [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1174 (*(out_DECOD_BTB_ADDRESS_DEST [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1175 (*(out_DECOD_BTB_ADDRESS_DEST [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1176 } 1177 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1178 { 1179 (*(out_DECOD_BTB_ADDRESS_DEST [x])) (*(in_DECOD_BTB_ACK [i] )); 1180 (*(out_DECOD_BTB_ADDRESS_DEST [x])) (*(in_DECOD_RAS_ACK [i] )); 1181 (*(out_DECOD_BTB_ADDRESS_DEST [x])) (*(in_DECOD_RAS_HIT [i] )); 1182 (*(out_DECOD_BTB_ADDRESS_DEST [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1183 // (*(out_DECOD_BTB_ADDRESS_DEST [x])) (*(in_DECOD_RAS_INDEX [i] )); 1184 (*(out_DECOD_BTB_ADDRESS_DEST [x])) (*(in_DECOD_UPT_ACK [i] )); 1185 } 1186 1187 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1188 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1189 { 1190 (*(out_DECOD_BTB_CONDITION [x])) (*(in_DECOD_VAL [i][j])); 1191 if (_param->_have_port_context_id) 1192 (*(out_DECOD_BTB_CONDITION [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1193 (*(out_DECOD_BTB_CONDITION [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1194 (*(out_DECOD_BTB_CONDITION [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1195 if (_param->_have_port_max_depth) 1196 (*(out_DECOD_BTB_CONDITION [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1197 (*(out_DECOD_BTB_CONDITION [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1198 (*(out_DECOD_BTB_CONDITION [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1199 (*(out_DECOD_BTB_CONDITION [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1200 (*(out_DECOD_BTB_CONDITION [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1201 } 1202 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1203 { 1204 (*(out_DECOD_BTB_CONDITION [x])) (*(in_DECOD_BTB_ACK [i] )); 1205 (*(out_DECOD_BTB_CONDITION [x])) (*(in_DECOD_RAS_ACK [i] )); 1206 (*(out_DECOD_BTB_CONDITION [x])) (*(in_DECOD_RAS_HIT [i] )); 1207 (*(out_DECOD_BTB_CONDITION [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1208 // (*(out_DECOD_BTB_CONDITION [x])) (*(in_DECOD_RAS_INDEX [i] )); 1209 (*(out_DECOD_BTB_CONDITION [x])) (*(in_DECOD_UPT_ACK [i] )); 1210 } 1211 1212 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1213 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1214 { 1215 (*(out_DECOD_BTB_LAST_TAKE [x])) (*(in_DECOD_VAL [i][j])); 1216 if (_param->_have_port_context_id) 1217 (*(out_DECOD_BTB_LAST_TAKE [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1218 (*(out_DECOD_BTB_LAST_TAKE [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1219 (*(out_DECOD_BTB_LAST_TAKE [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1220 if (_param->_have_port_max_depth) 1221 (*(out_DECOD_BTB_LAST_TAKE [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1222 (*(out_DECOD_BTB_LAST_TAKE [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1223 (*(out_DECOD_BTB_LAST_TAKE [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1224 (*(out_DECOD_BTB_LAST_TAKE [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1225 (*(out_DECOD_BTB_LAST_TAKE [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1226 } 1227 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1228 { 1229 (*(out_DECOD_BTB_LAST_TAKE [x])) (*(in_DECOD_BTB_ACK [i] )); 1230 (*(out_DECOD_BTB_LAST_TAKE [x])) (*(in_DECOD_RAS_ACK [i] )); 1231 (*(out_DECOD_BTB_LAST_TAKE [x])) (*(in_DECOD_RAS_HIT [i] )); 1232 (*(out_DECOD_BTB_LAST_TAKE [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1233 // (*(out_DECOD_BTB_LAST_TAKE [x])) (*(in_DECOD_RAS_INDEX [i] )); 1234 (*(out_DECOD_BTB_LAST_TAKE [x])) (*(in_DECOD_UPT_ACK [i] )); 1235 } 1236 1237 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1238 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1239 { 1240 (*(out_DECOD_BTB_MISS_PREDICTION [x])) (*(in_DECOD_VAL [i][j])); 1241 if (_param->_have_port_context_id) 1242 (*(out_DECOD_BTB_MISS_PREDICTION [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1243 (*(out_DECOD_BTB_MISS_PREDICTION [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1244 (*(out_DECOD_BTB_MISS_PREDICTION [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1245 if (_param->_have_port_max_depth) 1246 (*(out_DECOD_BTB_MISS_PREDICTION [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1247 (*(out_DECOD_BTB_MISS_PREDICTION [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1248 (*(out_DECOD_BTB_MISS_PREDICTION [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1249 (*(out_DECOD_BTB_MISS_PREDICTION [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1250 (*(out_DECOD_BTB_MISS_PREDICTION [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1251 } 1252 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1253 { 1254 (*(out_DECOD_BTB_MISS_PREDICTION [x])) (*(in_DECOD_BTB_ACK [i] )); 1255 (*(out_DECOD_BTB_MISS_PREDICTION [x])) (*(in_DECOD_RAS_ACK [i] )); 1256 (*(out_DECOD_BTB_MISS_PREDICTION [x])) (*(in_DECOD_RAS_HIT [i] )); 1257 (*(out_DECOD_BTB_MISS_PREDICTION [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1258 // (*(out_DECOD_BTB_MISS_PREDICTION [x])) (*(in_DECOD_RAS_INDEX [i] )); 1259 (*(out_DECOD_BTB_MISS_PREDICTION [x])) (*(in_DECOD_UPT_ACK [i] )); 1260 } 1261 1262 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1263 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1264 { 1265 (*(out_DECOD_BTB_IS_ACCURATE [x])) (*(in_DECOD_VAL [i][j])); 1266 if (_param->_have_port_context_id) 1267 (*(out_DECOD_BTB_IS_ACCURATE [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1268 (*(out_DECOD_BTB_IS_ACCURATE [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1269 (*(out_DECOD_BTB_IS_ACCURATE [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1270 if (_param->_have_port_max_depth) 1271 (*(out_DECOD_BTB_IS_ACCURATE [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1272 (*(out_DECOD_BTB_IS_ACCURATE [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1273 (*(out_DECOD_BTB_IS_ACCURATE [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1274 (*(out_DECOD_BTB_IS_ACCURATE [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1275 (*(out_DECOD_BTB_IS_ACCURATE [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1276 } 1277 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1278 { 1279 (*(out_DECOD_BTB_IS_ACCURATE [x])) (*(in_DECOD_BTB_ACK [i] )); 1280 (*(out_DECOD_BTB_IS_ACCURATE [x])) (*(in_DECOD_RAS_ACK [i] )); 1281 (*(out_DECOD_BTB_IS_ACCURATE [x])) (*(in_DECOD_RAS_HIT [i] )); 1282 (*(out_DECOD_BTB_IS_ACCURATE [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1283 // (*(out_DECOD_BTB_IS_ACCURATE [x])) (*(in_DECOD_RAS_INDEX [i] )); 1284 (*(out_DECOD_BTB_IS_ACCURATE [x])) (*(in_DECOD_UPT_ACK [i] )); 1285 } 1286 1287 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1288 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1289 { 1290 (*(out_DECOD_RAS_VAL [x])) (*(in_DECOD_VAL [i][j])); 1291 if (_param->_have_port_context_id) 1292 (*(out_DECOD_RAS_VAL [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1293 (*(out_DECOD_RAS_VAL [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1294 (*(out_DECOD_RAS_VAL [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1295 if (_param->_have_port_max_depth) 1296 (*(out_DECOD_RAS_VAL [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1297 (*(out_DECOD_RAS_VAL [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1298 (*(out_DECOD_RAS_VAL [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1299 (*(out_DECOD_RAS_VAL [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1300 (*(out_DECOD_RAS_VAL [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1301 } 1302 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1303 { 1304 (*(out_DECOD_RAS_VAL [x])) (*(in_DECOD_BTB_ACK [i] )); 1305 (*(out_DECOD_RAS_VAL [x])) (*(in_DECOD_RAS_ACK [i] )); 1306 (*(out_DECOD_RAS_VAL [x])) (*(in_DECOD_RAS_HIT [i] )); 1307 (*(out_DECOD_RAS_VAL [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1308 // (*(out_DECOD_RAS_VAL [x])) (*(in_DECOD_RAS_INDEX [i] )); 1309 (*(out_DECOD_RAS_VAL [x])) (*(in_DECOD_UPT_ACK [i] )); 1310 } 1311 1312 if (_param->_have_port_context_id) 1313 { 1314 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1315 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1316 { 1317 (*(out_DECOD_RAS_CONTEXT_ID [x])) (*(in_DECOD_VAL [i][j])); 1318 (*(out_DECOD_RAS_CONTEXT_ID [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1319 (*(out_DECOD_RAS_CONTEXT_ID [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1320 (*(out_DECOD_RAS_CONTEXT_ID [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1321 if (_param->_have_port_max_depth) 1322 (*(out_DECOD_RAS_CONTEXT_ID [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1323 (*(out_DECOD_RAS_CONTEXT_ID [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1324 (*(out_DECOD_RAS_CONTEXT_ID [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1325 (*(out_DECOD_RAS_CONTEXT_ID [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1326 (*(out_DECOD_RAS_CONTEXT_ID [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1327 } 1328 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1329 { 1330 (*(out_DECOD_RAS_CONTEXT_ID [x])) (*(in_DECOD_BTB_ACK [i] )); 1331 (*(out_DECOD_RAS_CONTEXT_ID [x])) (*(in_DECOD_RAS_ACK [i] )); 1332 (*(out_DECOD_RAS_CONTEXT_ID [x])) (*(in_DECOD_RAS_HIT [i] )); 1333 (*(out_DECOD_RAS_CONTEXT_ID [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1334 // (*(out_DECOD_RAS_CONTEXT_ID [x])) (*(in_DECOD_RAS_INDEX [i] )); 1335 (*(out_DECOD_RAS_CONTEXT_ID [x])) (*(in_DECOD_UPT_ACK [i] )); 1336 } 1337 } 1338 1339 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1340 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1341 { 1342 (*(out_DECOD_RAS_PUSH [x])) (*(in_DECOD_VAL [i][j])); 1343 if (_param->_have_port_context_id) 1344 (*(out_DECOD_RAS_PUSH [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1345 (*(out_DECOD_RAS_PUSH [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1346 (*(out_DECOD_RAS_PUSH [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1347 if (_param->_have_port_max_depth) 1348 (*(out_DECOD_RAS_PUSH [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1349 (*(out_DECOD_RAS_PUSH [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1350 (*(out_DECOD_RAS_PUSH [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1351 (*(out_DECOD_RAS_PUSH [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1352 (*(out_DECOD_RAS_PUSH [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1353 } 1354 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1355 { 1356 (*(out_DECOD_RAS_PUSH [x])) (*(in_DECOD_BTB_ACK [i] )); 1357 (*(out_DECOD_RAS_PUSH [x])) (*(in_DECOD_RAS_ACK [i] )); 1358 (*(out_DECOD_RAS_PUSH [x])) (*(in_DECOD_RAS_HIT [i] )); 1359 (*(out_DECOD_RAS_PUSH [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1360 // (*(out_DECOD_RAS_PUSH [x])) (*(in_DECOD_RAS_INDEX [i] )); 1361 (*(out_DECOD_RAS_PUSH [x])) (*(in_DECOD_UPT_ACK [i] )); 1362 } 1363 1364 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1365 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1366 { 1367 (*(out_DECOD_RAS_ADDRESS_PUSH [x])) (*(in_DECOD_VAL [i][j])); 1368 if (_param->_have_port_context_id) 1369 (*(out_DECOD_RAS_ADDRESS_PUSH [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1370 (*(out_DECOD_RAS_ADDRESS_PUSH [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1371 (*(out_DECOD_RAS_ADDRESS_PUSH [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1372 if (_param->_have_port_max_depth) 1373 (*(out_DECOD_RAS_ADDRESS_PUSH [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1374 (*(out_DECOD_RAS_ADDRESS_PUSH [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1375 (*(out_DECOD_RAS_ADDRESS_PUSH [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1376 (*(out_DECOD_RAS_ADDRESS_PUSH [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1377 (*(out_DECOD_RAS_ADDRESS_PUSH [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1378 } 1379 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1380 { 1381 (*(out_DECOD_RAS_ADDRESS_PUSH [x])) (*(in_DECOD_BTB_ACK [i] )); 1382 (*(out_DECOD_RAS_ADDRESS_PUSH [x])) (*(in_DECOD_RAS_ACK [i] )); 1383 (*(out_DECOD_RAS_ADDRESS_PUSH [x])) (*(in_DECOD_RAS_HIT [i] )); 1384 (*(out_DECOD_RAS_ADDRESS_PUSH [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1385 // (*(out_DECOD_RAS_ADDRESS_PUSH [x])) (*(in_DECOD_RAS_INDEX [i] )); 1386 (*(out_DECOD_RAS_ADDRESS_PUSH [x])) (*(in_DECOD_UPT_ACK [i] )); 1387 } 1388 1389 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1390 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1391 { 1392 (*(out_DECOD_RAS_MISS_PREDICTION [x])) (*(in_DECOD_VAL [i][j])); 1393 if (_param->_have_port_context_id) 1394 (*(out_DECOD_RAS_MISS_PREDICTION [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1395 (*(out_DECOD_RAS_MISS_PREDICTION [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1396 (*(out_DECOD_RAS_MISS_PREDICTION [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1397 if (_param->_have_port_max_depth) 1398 (*(out_DECOD_RAS_MISS_PREDICTION [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1399 (*(out_DECOD_RAS_MISS_PREDICTION [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1400 (*(out_DECOD_RAS_MISS_PREDICTION [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1401 (*(out_DECOD_RAS_MISS_PREDICTION [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1402 (*(out_DECOD_RAS_MISS_PREDICTION [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1403 } 1404 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1405 { 1406 (*(out_DECOD_RAS_MISS_PREDICTION [x])) (*(in_DECOD_BTB_ACK [i] )); 1407 (*(out_DECOD_RAS_MISS_PREDICTION [x])) (*(in_DECOD_RAS_ACK [i] )); 1408 (*(out_DECOD_RAS_MISS_PREDICTION [x])) (*(in_DECOD_RAS_HIT [i] )); 1409 (*(out_DECOD_RAS_MISS_PREDICTION [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1410 // (*(out_DECOD_RAS_MISS_PREDICTION [x])) (*(in_DECOD_RAS_INDEX [i] )); 1411 (*(out_DECOD_RAS_MISS_PREDICTION [x])) (*(in_DECOD_UPT_ACK [i] )); 1412 } 1413 1414 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1415 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1416 { 1417 (*(out_DECOD_UPT_VAL [x])) (*(in_DECOD_VAL [i][j])); 1418 if (_param->_have_port_context_id) 1419 (*(out_DECOD_UPT_VAL [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1420 (*(out_DECOD_UPT_VAL [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1421 (*(out_DECOD_UPT_VAL [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1422 if (_param->_have_port_max_depth) 1423 (*(out_DECOD_UPT_VAL [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1424 (*(out_DECOD_UPT_VAL [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1425 (*(out_DECOD_UPT_VAL [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1426 (*(out_DECOD_UPT_VAL [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1427 (*(out_DECOD_UPT_VAL [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1428 } 1429 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1430 { 1431 (*(out_DECOD_UPT_VAL [x])) (*(in_DECOD_BTB_ACK [i] )); 1432 (*(out_DECOD_UPT_VAL [x])) (*(in_DECOD_RAS_ACK [i] )); 1433 (*(out_DECOD_UPT_VAL [x])) (*(in_DECOD_RAS_HIT [i] )); 1434 (*(out_DECOD_UPT_VAL [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1435 // (*(out_DECOD_UPT_VAL [x])) (*(in_DECOD_RAS_INDEX [i] )); 1436 (*(out_DECOD_UPT_VAL [x])) (*(in_DECOD_UPT_ACK [i] )); 1437 } 1438 1439 if (_param->_have_port_context_id) 1440 { 1441 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1442 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1443 { 1444 (*(out_DECOD_UPT_CONTEXT_ID [x])) (*(in_DECOD_VAL [i][j])); 1445 (*(out_DECOD_UPT_CONTEXT_ID [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1446 (*(out_DECOD_UPT_CONTEXT_ID [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1447 (*(out_DECOD_UPT_CONTEXT_ID [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1448 if (_param->_have_port_max_depth) 1449 (*(out_DECOD_UPT_CONTEXT_ID [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1450 (*(out_DECOD_UPT_CONTEXT_ID [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1451 (*(out_DECOD_UPT_CONTEXT_ID [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1452 (*(out_DECOD_UPT_CONTEXT_ID [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1453 (*(out_DECOD_UPT_CONTEXT_ID [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1454 } 1455 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1456 { 1457 (*(out_DECOD_UPT_CONTEXT_ID [x])) (*(in_DECOD_BTB_ACK [i] )); 1458 (*(out_DECOD_UPT_CONTEXT_ID [x])) (*(in_DECOD_RAS_ACK [i] )); 1459 (*(out_DECOD_UPT_CONTEXT_ID [x])) (*(in_DECOD_RAS_HIT [i] )); 1460 (*(out_DECOD_UPT_CONTEXT_ID [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1461 // (*(out_DECOD_UPT_CONTEXT_ID [x])) (*(in_DECOD_RAS_INDEX [i] )); 1462 (*(out_DECOD_UPT_CONTEXT_ID [x])) (*(in_DECOD_UPT_ACK [i] )); 1463 } 1464 } 1465 1466 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1467 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1468 { 1469 (*(out_DECOD_UPT_BTB_ADDRESS_SRC [x])) (*(in_DECOD_VAL [i][j])); 1470 if (_param->_have_port_context_id) 1471 (*(out_DECOD_UPT_BTB_ADDRESS_SRC [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1472 (*(out_DECOD_UPT_BTB_ADDRESS_SRC [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1473 (*(out_DECOD_UPT_BTB_ADDRESS_SRC [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1474 if (_param->_have_port_max_depth) 1475 (*(out_DECOD_UPT_BTB_ADDRESS_SRC [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1476 (*(out_DECOD_UPT_BTB_ADDRESS_SRC [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1477 (*(out_DECOD_UPT_BTB_ADDRESS_SRC [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1478 (*(out_DECOD_UPT_BTB_ADDRESS_SRC [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1479 (*(out_DECOD_UPT_BTB_ADDRESS_SRC [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1480 } 1481 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1482 { 1483 (*(out_DECOD_UPT_BTB_ADDRESS_SRC [x])) (*(in_DECOD_BTB_ACK [i] )); 1484 (*(out_DECOD_UPT_BTB_ADDRESS_SRC [x])) (*(in_DECOD_RAS_ACK [i] )); 1485 (*(out_DECOD_UPT_BTB_ADDRESS_SRC [x])) (*(in_DECOD_RAS_HIT [i] )); 1486 (*(out_DECOD_UPT_BTB_ADDRESS_SRC [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1487 // (*(out_DECOD_UPT_BTB_ADDRESS_SRC [x])) (*(in_DECOD_RAS_INDEX [i] )); 1488 (*(out_DECOD_UPT_BTB_ADDRESS_SRC [x])) (*(in_DECOD_UPT_ACK [i] )); 1489 } 1490 1491 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1492 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1493 { 1494 (*(out_DECOD_UPT_BTB_ADDRESS_DEST [x])) (*(in_DECOD_VAL [i][j])); 1495 if (_param->_have_port_context_id) 1496 (*(out_DECOD_UPT_BTB_ADDRESS_DEST [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1497 (*(out_DECOD_UPT_BTB_ADDRESS_DEST [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1498 (*(out_DECOD_UPT_BTB_ADDRESS_DEST [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1499 if (_param->_have_port_max_depth) 1500 (*(out_DECOD_UPT_BTB_ADDRESS_DEST [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1501 (*(out_DECOD_UPT_BTB_ADDRESS_DEST [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1502 (*(out_DECOD_UPT_BTB_ADDRESS_DEST [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1503 (*(out_DECOD_UPT_BTB_ADDRESS_DEST [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1504 (*(out_DECOD_UPT_BTB_ADDRESS_DEST [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1505 } 1506 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1507 { 1508 (*(out_DECOD_UPT_BTB_ADDRESS_DEST [x])) (*(in_DECOD_BTB_ACK [i] )); 1509 (*(out_DECOD_UPT_BTB_ADDRESS_DEST [x])) (*(in_DECOD_RAS_ACK [i] )); 1510 (*(out_DECOD_UPT_BTB_ADDRESS_DEST [x])) (*(in_DECOD_RAS_HIT [i] )); 1511 (*(out_DECOD_UPT_BTB_ADDRESS_DEST [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1512 // (*(out_DECOD_UPT_BTB_ADDRESS_DEST [x])) (*(in_DECOD_RAS_INDEX [i] )); 1513 (*(out_DECOD_UPT_BTB_ADDRESS_DEST [x])) (*(in_DECOD_UPT_ACK [i] )); 1514 } 1515 1516 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1517 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1518 { 1519 (*(out_DECOD_UPT_BTB_CONDITION [x])) (*(in_DECOD_VAL [i][j])); 1520 if (_param->_have_port_context_id) 1521 (*(out_DECOD_UPT_BTB_CONDITION [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1522 (*(out_DECOD_UPT_BTB_CONDITION [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1523 (*(out_DECOD_UPT_BTB_CONDITION [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1524 if (_param->_have_port_max_depth) 1525 (*(out_DECOD_UPT_BTB_CONDITION [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1526 (*(out_DECOD_UPT_BTB_CONDITION [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1527 (*(out_DECOD_UPT_BTB_CONDITION [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1528 (*(out_DECOD_UPT_BTB_CONDITION [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1529 (*(out_DECOD_UPT_BTB_CONDITION [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1530 } 1531 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1532 { 1533 (*(out_DECOD_UPT_BTB_CONDITION [x])) (*(in_DECOD_BTB_ACK [i] )); 1534 (*(out_DECOD_UPT_BTB_CONDITION [x])) (*(in_DECOD_RAS_ACK [i] )); 1535 (*(out_DECOD_UPT_BTB_CONDITION [x])) (*(in_DECOD_RAS_HIT [i] )); 1536 (*(out_DECOD_UPT_BTB_CONDITION [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1537 // (*(out_DECOD_UPT_BTB_CONDITION [x])) (*(in_DECOD_RAS_INDEX [i] )); 1538 (*(out_DECOD_UPT_BTB_CONDITION [x])) (*(in_DECOD_UPT_ACK [i] )); 1539 } 1540 1541 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1542 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1543 { 1544 (*(out_DECOD_UPT_BTB_LAST_TAKE [x])) (*(in_DECOD_VAL [i][j])); 1545 if (_param->_have_port_context_id) 1546 (*(out_DECOD_UPT_BTB_LAST_TAKE [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1547 (*(out_DECOD_UPT_BTB_LAST_TAKE [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1548 (*(out_DECOD_UPT_BTB_LAST_TAKE [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1549 if (_param->_have_port_max_depth) 1550 (*(out_DECOD_UPT_BTB_LAST_TAKE [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1551 (*(out_DECOD_UPT_BTB_LAST_TAKE [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1552 (*(out_DECOD_UPT_BTB_LAST_TAKE [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1553 (*(out_DECOD_UPT_BTB_LAST_TAKE [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1554 (*(out_DECOD_UPT_BTB_LAST_TAKE [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1555 } 1556 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1557 { 1558 (*(out_DECOD_UPT_BTB_LAST_TAKE [x])) (*(in_DECOD_BTB_ACK [i] )); 1559 (*(out_DECOD_UPT_BTB_LAST_TAKE [x])) (*(in_DECOD_RAS_ACK [i] )); 1560 (*(out_DECOD_UPT_BTB_LAST_TAKE [x])) (*(in_DECOD_RAS_HIT [i] )); 1561 (*(out_DECOD_UPT_BTB_LAST_TAKE [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1562 // (*(out_DECOD_UPT_BTB_LAST_TAKE [x])) (*(in_DECOD_RAS_INDEX [i] )); 1563 (*(out_DECOD_UPT_BTB_LAST_TAKE [x])) (*(in_DECOD_UPT_ACK [i] )); 1564 } 1565 1566 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1567 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1568 { 1569 (*(out_DECOD_UPT_RAS_ADDRESS [x])) (*(in_DECOD_VAL [i][j])); 1570 if (_param->_have_port_context_id) 1571 (*(out_DECOD_UPT_RAS_ADDRESS [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1572 (*(out_DECOD_UPT_RAS_ADDRESS [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1573 (*(out_DECOD_UPT_RAS_ADDRESS [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1574 if (_param->_have_port_max_depth) 1575 (*(out_DECOD_UPT_RAS_ADDRESS [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1576 (*(out_DECOD_UPT_RAS_ADDRESS [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1577 (*(out_DECOD_UPT_RAS_ADDRESS [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1578 (*(out_DECOD_UPT_RAS_ADDRESS [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1579 (*(out_DECOD_UPT_RAS_ADDRESS [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1580 } 1581 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1582 { 1583 (*(out_DECOD_UPT_RAS_ADDRESS [x])) (*(in_DECOD_BTB_ACK [i] )); 1584 (*(out_DECOD_UPT_RAS_ADDRESS [x])) (*(in_DECOD_RAS_ACK [i] )); 1585 (*(out_DECOD_UPT_RAS_ADDRESS [x])) (*(in_DECOD_RAS_HIT [i] )); 1586 (*(out_DECOD_UPT_RAS_ADDRESS [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1587 // (*(out_DECOD_UPT_RAS_ADDRESS [x])) (*(in_DECOD_RAS_INDEX [i] )); 1588 (*(out_DECOD_UPT_RAS_ADDRESS [x])) (*(in_DECOD_UPT_ACK [i] )); 1589 } 1590 1591 // for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1592 // for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1593 // { 1594 // (*(out_DECOD_UPT_RAS_INDEX [x])) (*(in_DECOD_VAL [i][j])); 1595 // if (_param->_have_port_context_id) 1596 // (*(out_DECOD_UPT_RAS_INDEX [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1597 // (*(out_DECOD_UPT_RAS_INDEX [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1598 // (*(out_DECOD_UPT_RAS_INDEX [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1599 // if (_param->_have_port_max_depth) 1600 // (*(out_DECOD_UPT_RAS_INDEX [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1601 // (*(out_DECOD_UPT_RAS_INDEX [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1602 // (*(out_DECOD_UPT_RAS_INDEX [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1603 // (*(out_DECOD_UPT_RAS_INDEX [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1604 // (*(out_DECOD_UPT_RAS_INDEX [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1605 // } 1606 // for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1607 // { 1608 // (*(out_DECOD_UPT_RAS_INDEX [x])) (*(in_DECOD_BTB_ACK [i] )); 1609 // (*(out_DECOD_UPT_RAS_INDEX [x])) (*(in_DECOD_RAS_ACK [i] )); 1610 // (*(out_DECOD_UPT_RAS_INDEX [x])) (*(in_DECOD_RAS_HIT [i] )); 1611 // (*(out_DECOD_UPT_RAS_INDEX [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1612 // (*(out_DECOD_UPT_RAS_INDEX [x])) (*(in_DECOD_RAS_INDEX [i] )); 1613 // (*(out_DECOD_UPT_RAS_INDEX [x])) (*(in_DECOD_UPT_ACK [i] )); 1614 // } 1615 1616 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1617 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1618 { 1619 (*(out_DECOD_UPT_MISS_IFETCH [x])) (*(in_DECOD_VAL [i][j])); 1620 if (_param->_have_port_context_id) 1621 (*(out_DECOD_UPT_MISS_IFETCH [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1622 (*(out_DECOD_UPT_MISS_IFETCH [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1623 (*(out_DECOD_UPT_MISS_IFETCH [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1624 if (_param->_have_port_max_depth) 1625 (*(out_DECOD_UPT_MISS_IFETCH [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1626 (*(out_DECOD_UPT_MISS_IFETCH [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1627 (*(out_DECOD_UPT_MISS_IFETCH [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1628 (*(out_DECOD_UPT_MISS_IFETCH [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1629 (*(out_DECOD_UPT_MISS_IFETCH [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1630 } 1631 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1632 { 1633 (*(out_DECOD_UPT_MISS_IFETCH [x])) (*(in_DECOD_BTB_ACK [i] )); 1634 (*(out_DECOD_UPT_MISS_IFETCH [x])) (*(in_DECOD_RAS_ACK [i] )); 1635 (*(out_DECOD_UPT_MISS_IFETCH [x])) (*(in_DECOD_RAS_HIT [i] )); 1636 (*(out_DECOD_UPT_MISS_IFETCH [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1637 // (*(out_DECOD_UPT_MISS_IFETCH [x])) (*(in_DECOD_RAS_INDEX [i] )); 1638 (*(out_DECOD_UPT_MISS_IFETCH [x])) (*(in_DECOD_UPT_ACK [i] )); 1639 } 1640 1641 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1642 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1643 { 1644 (*(out_DECOD_UPT_MISS_DECOD [x])) (*(in_DECOD_VAL [i][j])); 1645 if (_param->_have_port_context_id) 1646 (*(out_DECOD_UPT_MISS_DECOD [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1647 (*(out_DECOD_UPT_MISS_DECOD [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1648 (*(out_DECOD_UPT_MISS_DECOD [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1649 if (_param->_have_port_max_depth) 1650 (*(out_DECOD_UPT_MISS_DECOD [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1651 (*(out_DECOD_UPT_MISS_DECOD [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1652 (*(out_DECOD_UPT_MISS_DECOD [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1653 (*(out_DECOD_UPT_MISS_DECOD [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1654 (*(out_DECOD_UPT_MISS_DECOD [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1655 } 1656 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1657 { 1658 (*(out_DECOD_UPT_MISS_DECOD [x])) (*(in_DECOD_BTB_ACK [i] )); 1659 (*(out_DECOD_UPT_MISS_DECOD [x])) (*(in_DECOD_RAS_ACK [i] )); 1660 (*(out_DECOD_UPT_MISS_DECOD [x])) (*(in_DECOD_RAS_HIT [i] )); 1661 (*(out_DECOD_UPT_MISS_DECOD [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1662 // (*(out_DECOD_UPT_MISS_DECOD [x])) (*(in_DECOD_RAS_INDEX [i] )); 1663 (*(out_DECOD_UPT_MISS_DECOD [x])) (*(in_DECOD_UPT_ACK [i] )); 1664 } 1665 1666 if (_param->_have_port_max_depth) 1667 { 1668 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 1669 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 1670 { 1671 (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_VAL [i][j])); 1672 if (_param->_have_port_context_id) 1673 (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_CONTEXT_ID [i][j])); 1674 (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR [i][j])); 1675 (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BRANCH_STATE [i][j])); 1676 (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 1677 (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BRANCH_CONDITION [i][j])); 1678 (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BRANCH_DIRECTION [i][j])); 1679 (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_ADDRESS_SRC [i][j])); 1680 (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_ADDRESS_DEST [i][j])); 1681 } 1682 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 1683 { 1684 (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BTB_ACK [i] )); 1685 (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_RAS_ACK [i] )); 1686 (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_RAS_HIT [i] )); 1687 (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_RAS_ADDRESS_POP [i] )); 1688 // (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_RAS_INDEX [i] )); 1689 (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_UPT_ACK [i] )); 1690 } 1691 } 1692 } 1693 # endif 1694 1695 log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Method - genMealy_update"); 1696 1697 SC_METHOD (genMealy_update); 1698 dont_initialize (); 1699 // sensitive << (*(in_CLOCK)).neg(); // don't use internal register 1700 for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++) 1701 sensitive << (*(in_UPDATE_BTB_ACK [i])) 1702 << (*(in_UPDATE_DIR_ACK [i])) 1703 << (*(in_UPDATE_RAS_ACK [i])) 1704 << (*(in_UPDATE_UPT_VAL [i])) 1705 << (*(in_UPDATE_UPT_BTB_VAL [i])) 1706 << (*(in_UPDATE_UPT_DIR_VAL [i])) 1707 << (*(in_UPDATE_UPT_RAS_VAL [i])); 1708 1709 # ifdef SYSTEMCASS_SPECIFIC 1710 // List dependency information 1711 for (uint32_t x=0; x<_param->_nb_inst_branch_update; x++) 1712 // for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++) 1713 { 1714 uint32_t i=x; 1715 1716 (*(out_UPDATE_BTB_VAL [x])) (*(in_UPDATE_BTB_ACK [i])); 1717 (*(out_UPDATE_BTB_VAL [x])) (*(in_UPDATE_DIR_ACK [i])); 1718 (*(out_UPDATE_BTB_VAL [x])) (*(in_UPDATE_RAS_ACK [i])); 1719 (*(out_UPDATE_BTB_VAL [x])) (*(in_UPDATE_UPT_VAL [i])); 1720 (*(out_UPDATE_BTB_VAL [x])) (*(in_UPDATE_UPT_BTB_VAL [i])); 1721 (*(out_UPDATE_BTB_VAL [x])) (*(in_UPDATE_UPT_DIR_VAL [i])); 1722 (*(out_UPDATE_BTB_VAL [x])) (*(in_UPDATE_UPT_RAS_VAL [i])); 1723 1724 (*(out_UPDATE_DIR_VAL [x])) (*(in_UPDATE_BTB_ACK [i])); 1725 (*(out_UPDATE_DIR_VAL [x])) (*(in_UPDATE_DIR_ACK [i])); 1726 (*(out_UPDATE_DIR_VAL [x])) (*(in_UPDATE_RAS_ACK [i])); 1727 (*(out_UPDATE_DIR_VAL [x])) (*(in_UPDATE_UPT_VAL [i])); 1728 (*(out_UPDATE_DIR_VAL [x])) (*(in_UPDATE_UPT_BTB_VAL [i])); 1729 (*(out_UPDATE_DIR_VAL [x])) (*(in_UPDATE_UPT_DIR_VAL [i])); 1730 (*(out_UPDATE_DIR_VAL [x])) (*(in_UPDATE_UPT_RAS_VAL [i])); 1731 1732 (*(out_UPDATE_RAS_VAL [x])) (*(in_UPDATE_BTB_ACK [i])); 1733 (*(out_UPDATE_RAS_VAL [x])) (*(in_UPDATE_DIR_ACK [i])); 1734 (*(out_UPDATE_RAS_VAL [x])) (*(in_UPDATE_RAS_ACK [i])); 1735 (*(out_UPDATE_RAS_VAL [x])) (*(in_UPDATE_UPT_VAL [i])); 1736 (*(out_UPDATE_RAS_VAL [x])) (*(in_UPDATE_UPT_BTB_VAL [i])); 1737 (*(out_UPDATE_RAS_VAL [x])) (*(in_UPDATE_UPT_DIR_VAL [i])); 1738 (*(out_UPDATE_RAS_VAL [x])) (*(in_UPDATE_UPT_RAS_VAL [i])); 1739 1740 (*(out_UPDATE_UPT_ACK [x])) (*(in_UPDATE_BTB_ACK [i])); 1741 (*(out_UPDATE_UPT_ACK [x])) (*(in_UPDATE_DIR_ACK [i])); 1742 (*(out_UPDATE_UPT_ACK [x])) (*(in_UPDATE_RAS_ACK [i])); 1743 (*(out_UPDATE_UPT_ACK [x])) (*(in_UPDATE_UPT_VAL [i])); 1744 (*(out_UPDATE_UPT_ACK [x])) (*(in_UPDATE_UPT_BTB_VAL [i])); 1745 (*(out_UPDATE_UPT_ACK [x])) (*(in_UPDATE_UPT_DIR_VAL [i])); 1746 (*(out_UPDATE_UPT_ACK [x])) (*(in_UPDATE_UPT_RAS_VAL [i])); 1747 } 1748 # endif 868 1749 #endif 869 1750 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_allocation.cpp
r81 r82 16 16 namespace prediction_unit { 17 17 namespace prediction_unit_glue { 18 19 20 18 21 19 #undef FUNCTION … … 79 77 80 78 { 81 ALLOC1_INTERFACE("predict_btb",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_ predict);79 ALLOC1_INTERFACE("predict_btb",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict); 82 80 83 81 ALLOC1_VALACK_OUT(out_PREDICT_BTB_VAL ,VAL); … … 94 92 95 93 { 96 ALLOC1_INTERFACE("predict_dir",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_ predict);94 ALLOC1_INTERFACE("predict_dir",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict); 97 95 98 96 ALLOC1_VALACK_OUT(out_PREDICT_DIR_VAL ,VAL); … … 106 104 107 105 { 108 ALLOC1_INTERFACE("predict_ras",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_ predict);106 ALLOC1_INTERFACE("predict_ras",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict); 109 107 110 108 ALLOC1_VALACK_OUT(out_PREDICT_RAS_VAL ,VAL); … … 119 117 120 118 { 121 ALLOC1_INTERFACE("predict_upt",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_ predict);119 ALLOC1_INTERFACE("predict_upt",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict); 122 120 123 121 ALLOC1_VALACK_OUT(out_PREDICT_UPT_VAL ,VAL); … … 135 133 } 136 134 135 // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 136 { 137 { 138 ALLOC2_INTERFACE("decod",IN,SOUTH,"Interface with decod unit",_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_interface_it1]); 139 140 _ALLOC2_VALACK_IN ( in_DECOD_VAL ,VAL,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 141 _ALLOC2_VALACK_OUT(out_DECOD_ACK ,ACK,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 142 _ALLOC2_SIGNAL_IN ( in_DECOD_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 143 _ALLOC2_SIGNAL_IN ( in_DECOD_MATCH_INST_IFETCH_PTR ,"match_inst_ifetch_ptr" ,Tcontrol_t ,1 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 144 _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_STATE ,"branch_state" ,Tbranch_state_t ,_param->_size_branch_state ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 145 _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_max_size_depth ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 146 _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_CONDITION ,"branch_condition" ,Tbranch_condition_t,_param->_size_branch_condition,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 147 _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_DIRECTION ,"branch_direction" ,Tcontrol_t ,1 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 148 _ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_SRC ,"address_src" ,Taddress_t ,_param->_size_address ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 149 _ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_DEST ,"address_dest" ,Taddress_t ,_param->_size_address ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 150 } 151 152 { 153 ALLOC1_INTERFACE("decod_btb",OUT,NORTH,"Interface with decod unit",_param->_nb_inst_branch_decod); 154 155 ALLOC1_VALACK_OUT(out_DECOD_BTB_VAL ,VAL); 156 ALLOC1_VALACK_IN ( in_DECOD_BTB_ACK ,ACK); 157 ALLOC1_SIGNAL_OUT(out_DECOD_BTB_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id); 158 ALLOC1_SIGNAL_OUT(out_DECOD_BTB_ADDRESS_SRC ,"address_src" ,Taddress_t ,_param->_size_address); 159 ALLOC1_SIGNAL_OUT(out_DECOD_BTB_ADDRESS_DEST ,"address_dest" ,Taddress_t ,_param->_size_address); 160 ALLOC1_SIGNAL_OUT(out_DECOD_BTB_CONDITION ,"condition" ,Tbranch_condition_t,_param->_size_branch_condition); 161 ALLOC1_SIGNAL_OUT(out_DECOD_BTB_LAST_TAKE ,"last_take" ,Tcontrol_t ,1); 162 ALLOC1_SIGNAL_OUT(out_DECOD_BTB_MISS_PREDICTION,"miss_prediction",Tcontrol_t ,1); 163 ALLOC1_SIGNAL_OUT(out_DECOD_BTB_IS_ACCURATE ,"is_accurate" ,Tcontrol_t ,1); 164 } 165 166 { 167 ALLOC1_INTERFACE("decod_ras",OUT,NORTH,"Interface with decod unit",_param->_nb_inst_branch_decod); 168 169 ALLOC1_VALACK_OUT(out_DECOD_RAS_VAL ,VAL); 170 ALLOC1_VALACK_IN ( in_DECOD_RAS_ACK ,ACK); 171 ALLOC1_SIGNAL_OUT(out_DECOD_RAS_CONTEXT_ID ,"context_id" ,Tcontext_t,_param->_size_context_id); 172 ALLOC1_SIGNAL_IN ( in_DECOD_RAS_HIT ,"hit" ,Tcontrol_t,1); 173 ALLOC1_SIGNAL_OUT(out_DECOD_RAS_PUSH ,"push" ,Tcontrol_t,1); 174 ALLOC1_SIGNAL_OUT(out_DECOD_RAS_ADDRESS_PUSH ,"address_push" ,Taddress_t,_param->_size_address); 175 ALLOC1_SIGNAL_IN ( in_DECOD_RAS_ADDRESS_POP ,"address_pop" ,Taddress_t,_param->_size_address); 176 // ALLOC1_SIGNAL_IN ( in_DECOD_RAS_INDEX ,"index" ,Tptr_t ,_param->_size_ras_index); 177 ALLOC1_SIGNAL_OUT(out_DECOD_RAS_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1); 178 } 179 180 { 181 ALLOC1_INTERFACE("decod_upt",OUT,NORTH,"Interface with decod unit",_param->_nb_inst_branch_decod); 182 183 ALLOC1_VALACK_OUT(out_DECOD_UPT_VAL ,VAL); 184 ALLOC1_VALACK_IN ( in_DECOD_UPT_ACK ,ACK); 185 ALLOC1_SIGNAL_OUT(out_DECOD_UPT_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id); 186 ALLOC1_SIGNAL_OUT(out_DECOD_UPT_BTB_ADDRESS_SRC ,"btb_address_src" ,Taddress_t ,_param->_size_address); 187 ALLOC1_SIGNAL_OUT(out_DECOD_UPT_BTB_ADDRESS_DEST ,"btb_address_dest" ,Taddress_t ,_param->_size_address); 188 ALLOC1_SIGNAL_OUT(out_DECOD_UPT_BTB_CONDITION ,"btb_condition" ,Tbranch_condition_t,_param->_size_branch_condition); 189 ALLOC1_SIGNAL_OUT(out_DECOD_UPT_BTB_LAST_TAKE ,"btb_last_take" ,Tcontrol_t ,1); 190 ALLOC1_SIGNAL_OUT(out_DECOD_UPT_RAS_ADDRESS ,"ras_address" ,Taddress_t ,_param->_size_address); 191 // ALLOC1_SIGNAL_OUT(out_DECOD_UPT_RAS_INDEX ,"ras_index" ,Tptr_t ,_param->_size_ras_index); 192 ALLOC1_SIGNAL_OUT(out_DECOD_UPT_MISS_IFETCH ,"miss_ifetch" ,Tcontrol_t ,1); 193 ALLOC1_SIGNAL_OUT(out_DECOD_UPT_MISS_DECOD ,"miss_decod" ,Tcontrol_t ,1); 194 ALLOC1_SIGNAL_OUT(out_DECOD_UPT_UPDATE_PREDICTION_ID,"update_prediction_id",Tprediction_ptr_t ,_param->_max_size_depth); 195 } 196 } 197 198 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 199 { 200 { 201 ALLOC1_INTERFACE("update_btb",OUT,SOUTH,"Interface with update unit",_param->_nb_inst_branch_update); 202 203 ALLOC1_VALACK_OUT(out_UPDATE_BTB_VAL ,VAL); 204 ALLOC1_VALACK_IN ( in_UPDATE_BTB_ACK ,ACK); 205 // ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id); 206 // ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_ADDRESS_SRC ,"address_src" ,Taddress_t ,_param->_size_address); 207 // ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_ADDRESS_DEST ,"address_dest" ,Taddress_t ,_param->_size_address); 208 // ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_CONDITION ,"condition" ,Tbranch_condition_t,_param->_size_branch_condition); 209 // ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_LAST_TAKE ,"last_take" ,Tcontrol_t ,1); 210 // ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_MISS_PREDICTION ,"miss_prediction" ,Tcontrol_t ,1); 211 } 212 213 { 214 ALLOC1_INTERFACE("update_dir",OUT,NORTH,"Interface with update unit",_param->_nb_inst_branch_update); 215 216 ALLOC1_VALACK_OUT(out_UPDATE_DIR_VAL ,VAL); 217 ALLOC1_VALACK_IN ( in_UPDATE_DIR_ACK ,ACK); 218 // ALLOC1_SIGNAL_OUT(out_UPDATE_DIR_ADDRESS ,"address" ,Taddress_t ,_param->_size_address); 219 // ALLOC1_SIGNAL_OUT(out_UPDATE_DIR_HISTORY ,"history" ,Thistory_t ,_param->_size_history); 220 // ALLOC1_SIGNAL_OUT(out_UPDATE_DIR_DIRECTION ,"direction" ,Tcontrol_t ,1); 221 } 222 223 { 224 ALLOC1_INTERFACE("update_ras",OUT,NORTH,"Interface with update unit",_param->_nb_inst_branch_update); 225 226 ALLOC1_VALACK_OUT(out_UPDATE_RAS_VAL ,VAL); 227 ALLOC1_VALACK_IN ( in_UPDATE_RAS_ACK ,ACK); 228 // ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id); 229 // ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_PUSH ,"push" ,Tcontrol_t ,1); 230 // ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_ADDRESS ,"address" ,Taddress_t ,_param->_size_address); 231 // ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_INDEX ,"index" ,Tptr_t ,_param->_size_ras_index); 232 // ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_MISS_PREDICTION ,"miss_prediction" ,Tcontrol_t ,1); 233 // ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_PREDICTION_IFETCH ,"prediction_ifetch" ,Tcontrol_t ,1); 234 } 235 236 { 237 ALLOC1_INTERFACE("update_upt",IN ,NORTH,"Interface with update unit",_param->_nb_inst_branch_update); 238 239 ALLOC1_VALACK_IN ( in_UPDATE_UPT_VAL ,VAL); 240 ALLOC1_VALACK_OUT(out_UPDATE_UPT_ACK ,ACK); 241 // ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id); 242 // ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_MISS_PREDICTION ,"miss_prediction" ,Tcontrol_t ,1); 243 // ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_DIRECTION_GOOD ,"direction_good" ,Tcontrol_t ,1); 244 ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_BTB_VAL ,"btb_val" ,Tcontrol_t ,1); 245 // ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_BTB_ADDRESS_SRC ,"btb_address_src" ,Taddress_t ,_param->_size_address); 246 // ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_BTB_ADDRESS_DEST ,"btb_address_dest" ,Taddress_t ,_param->_size_address); 247 // ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_BTB_CONDITION ,"btb_condition" ,Tbranch_condition_t,_param->_size_branch_condition); 248 ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_DIR_VAL ,"dir_val" ,Tcontrol_t ,1); 249 // ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_DIR_HISTORY ,"dir_history" ,Thistory_t ,_param->_size_history); 250 ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_VAL ,"ras_val" ,Tcontrol_t ,1); 251 // ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_PUSH ,"ras_push" ,Tcontrol_t ,1); 252 // ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_ADDRESS ,"ras_address" ,Taddress_t ,_param->_size_address); 253 // ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_INDEX ,"ras_index" ,Tptr_t ,_param->_size_ras_index); 254 // ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_PREDICTION_IFETCH,"ras_prediction_ifetch",Tcontrol_t ,1); 255 } 256 } 257 137 258 // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 138 259 { 139 260 ALLOC1_INTERFACE("depth",IN,NORTH,"Interface with depth",_param->_nb_context); 140 141 ALLOC1_SIGNAL_IN (in_DEPTH_UPT_NB_BRANCH,"upt_nb_branch",Tdepth_t,_param->_size_depth[alloc_signal_it1]); 142 ALLOC1_SIGNAL_IN (in_DEPTH_UPT_TAIL ,"upt_tail" ,Tdepth_t,_param->_size_depth[alloc_signal_it1]); 143 } 261 262 ALLOC1_SIGNAL_IN ( in_DEPTH_UPT_NB_BRANCH,"upt_nb_branch",Tdepth_t,_param->_size_depth[alloc_signal_it1]+1); 263 ALLOC1_SIGNAL_IN ( in_DEPTH_UPT_TAIL ,"upt_tail" ,Tdepth_t,_param->_size_depth[alloc_signal_it1]); 264 ALLOC1_SIGNAL_OUT(out_DEPTH_NB_BRANCH ,"nb_branch" ,Tdepth_t,_param->_size_depth[alloc_signal_it1]+1); 265 ALLOC1_SIGNAL_OUT(out_DEPTH_TAIL ,"tail" ,Tdepth_t,_param->_size_depth[alloc_signal_it1]); 266 } 267 268 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 269 270 #ifndef NO_INIT 271 reg_PREDICT_PRIORITY = 0; 272 reg_DECOD_PRIORITY = 0; 273 #endif 144 274 145 275 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_deallocation.cpp
r81 r82 29 29 delete in_NRESET; 30 30 31 31 32 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 32 33 DELETE1_SIGNAL( in_PREDICT_VAL ,_param->_nb_context ,1); … … 41 42 DELETE1_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context ,_param->_size_depth [alloc_signal_it1]); 42 43 DELETE2_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE ,_param->_nb_context ,_param->_nb_instruction[alloc_signal_it1],1); 43 DELETE1_SIGNAL(out_PREDICT_BTB_VAL ,_param->_nb_inst_predict,1); 44 DELETE1_SIGNAL( in_PREDICT_BTB_ACK ,_param->_nb_inst_predict,1); 45 DELETE1_SIGNAL(out_PREDICT_BTB_CONTEXT_ID ,_param->_nb_inst_predict,_param->_size_context_id); 46 DELETE1_SIGNAL(out_PREDICT_BTB_ADDRESS ,_param->_nb_inst_predict,_param->_size_address); 47 DELETE1_SIGNAL( in_PREDICT_BTB_HIT ,_param->_nb_inst_predict,1); 48 DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC ,_param->_nb_inst_predict,_param->_size_address); 49 DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST ,_param->_nb_inst_predict,_param->_size_address); 50 DELETE1_SIGNAL( in_PREDICT_BTB_CONDITION ,_param->_nb_inst_predict,_param->_size_branch_condition); 51 // DELETE1_SIGNAL( in_PREDICT_BTB_LAST_TAKE ,_param->_nb_inst_predict,1); 52 DELETE1_SIGNAL( in_PREDICT_BTB_IS_ACCURATE ,_param->_nb_inst_predict,1); 53 DELETE1_SIGNAL(out_PREDICT_DIR_VAL ,_param->_nb_inst_predict,1); 54 DELETE1_SIGNAL( in_PREDICT_DIR_ACK ,_param->_nb_inst_predict,1); 55 DELETE1_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC ,_param->_nb_inst_predict,_param->_size_address); 56 DELETE1_SIGNAL(out_PREDICT_DIR_STATIC ,_param->_nb_inst_predict,1); 57 // DELETE1_SIGNAL(out_PREDICT_DIR_LAST_TAKE ,_param->_nb_inst_predict,1); 58 // DELETE1_SIGNAL( in_PREDICT_DIR_HISTORY ,_param->_nb_inst_predict,_param->_size_history); 59 DELETE1_SIGNAL( in_PREDICT_DIR_DIRECTION ,_param->_nb_inst_predict,1); 60 DELETE1_SIGNAL(out_PREDICT_RAS_VAL ,_param->_nb_inst_predict,1); 61 DELETE1_SIGNAL( in_PREDICT_RAS_ACK ,_param->_nb_inst_predict,1); 62 DELETE1_SIGNAL(out_PREDICT_RAS_CONTEXT_ID ,_param->_nb_inst_predict,_param->_size_context_id); 63 DELETE1_SIGNAL( in_PREDICT_RAS_HIT ,_param->_nb_inst_predict,1); 64 DELETE1_SIGNAL(out_PREDICT_RAS_PUSH ,_param->_nb_inst_predict,1); 65 DELETE1_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH ,_param->_nb_inst_predict,_param->_size_address); 66 DELETE1_SIGNAL( in_PREDICT_RAS_ADDRESS_POP ,_param->_nb_inst_predict,_param->_size_address); 67 // DELETE1_SIGNAL( in_PREDICT_RAS_INDEX ,_param->_nb_inst_predict,_param->_size_ras_index); 68 DELETE1_SIGNAL(out_PREDICT_UPT_VAL ,_param->_nb_inst_predict,1); 69 DELETE1_SIGNAL( in_PREDICT_UPT_ACK ,_param->_nb_inst_predict,1); 70 DELETE1_SIGNAL(out_PREDICT_UPT_CONTEXT_ID ,_param->_nb_inst_predict,_param->_size_context_id); 71 DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_predict,_param->_size_address); 72 DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_predict,_param->_size_address); 73 DELETE1_SIGNAL(out_PREDICT_UPT_BTB_CONDITION ,_param->_nb_inst_predict,_param->_size_branch_condition); 74 DELETE1_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE ,_param->_nb_inst_predict,1); 75 DELETE1_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE ,_param->_nb_inst_predict,1); 76 // DELETE1_SIGNAL(out_PREDICT_UPT_DIR_HISTORY ,_param->_nb_inst_predict,_param->_size_history); 77 DELETE1_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS ,_param->_nb_inst_predict,_param->_size_address); 78 // DELETE1_SIGNAL(out_PREDICT_UPT_RAS_INDEX ,_param->_nb_inst_predict,_param->_size_ras_index); 44 DELETE1_SIGNAL(out_PREDICT_BTB_VAL ,_param->_nb_inst_branch_predict,1); 45 DELETE1_SIGNAL( in_PREDICT_BTB_ACK ,_param->_nb_inst_branch_predict,1); 46 DELETE1_SIGNAL(out_PREDICT_BTB_CONTEXT_ID ,_param->_nb_inst_branch_predict,_param->_size_context_id); 47 DELETE1_SIGNAL(out_PREDICT_BTB_ADDRESS ,_param->_nb_inst_branch_predict,_param->_size_address); 48 DELETE1_SIGNAL( in_PREDICT_BTB_HIT ,_param->_nb_inst_branch_predict,1); 49 DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_predict,_param->_size_address); 50 DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_predict,_param->_size_address); 51 DELETE1_SIGNAL( in_PREDICT_BTB_CONDITION ,_param->_nb_inst_branch_predict,_param->_size_branch_condition); 52 // DELETE1_SIGNAL( in_PREDICT_BTB_LAST_TAKE ,_param->_nb_inst_branch_predict,1); 53 DELETE1_SIGNAL( in_PREDICT_BTB_IS_ACCURATE ,_param->_nb_inst_branch_predict,1); 54 DELETE1_SIGNAL(out_PREDICT_DIR_VAL ,_param->_nb_inst_branch_predict,1); 55 DELETE1_SIGNAL( in_PREDICT_DIR_ACK ,_param->_nb_inst_branch_predict,1); 56 DELETE1_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC ,_param->_nb_inst_branch_predict,_param->_size_address); 57 DELETE1_SIGNAL(out_PREDICT_DIR_STATIC ,_param->_nb_inst_branch_predict,1); 58 // DELETE1_SIGNAL(out_PREDICT_DIR_LAST_TAKE ,_param->_nb_inst_branch_predict,1); 59 // DELETE1_SIGNAL( in_PREDICT_DIR_HISTORY ,_param->_nb_inst_branch_predict,_param->_size_history); 60 DELETE1_SIGNAL( in_PREDICT_DIR_DIRECTION ,_param->_nb_inst_branch_predict,1); 61 DELETE1_SIGNAL(out_PREDICT_RAS_VAL ,_param->_nb_inst_branch_predict,1); 62 DELETE1_SIGNAL( in_PREDICT_RAS_ACK ,_param->_nb_inst_branch_predict,1); 63 DELETE1_SIGNAL(out_PREDICT_RAS_CONTEXT_ID ,_param->_nb_inst_branch_predict,_param->_size_context_id); 64 DELETE1_SIGNAL( in_PREDICT_RAS_HIT ,_param->_nb_inst_branch_predict,1); 65 DELETE1_SIGNAL(out_PREDICT_RAS_PUSH ,_param->_nb_inst_branch_predict,1); 66 DELETE1_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH ,_param->_nb_inst_branch_predict,_param->_size_address); 67 DELETE1_SIGNAL( in_PREDICT_RAS_ADDRESS_POP ,_param->_nb_inst_branch_predict,_param->_size_address); 68 // DELETE1_SIGNAL( in_PREDICT_RAS_INDEX ,_param->_nb_inst_branch_predict,_param->_size_ras_index); 69 DELETE1_SIGNAL(out_PREDICT_UPT_VAL ,_param->_nb_inst_branch_predict,1); 70 DELETE1_SIGNAL( in_PREDICT_UPT_ACK ,_param->_nb_inst_branch_predict,1); 71 DELETE1_SIGNAL(out_PREDICT_UPT_CONTEXT_ID ,_param->_nb_inst_branch_predict,_param->_size_context_id); 72 DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_predict,_param->_size_address); 73 DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_predict,_param->_size_address); 74 DELETE1_SIGNAL(out_PREDICT_UPT_BTB_CONDITION ,_param->_nb_inst_branch_predict,_param->_size_branch_condition); 75 DELETE1_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE ,_param->_nb_inst_branch_predict,1); 76 DELETE1_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE ,_param->_nb_inst_branch_predict,1); 77 // DELETE1_SIGNAL(out_PREDICT_UPT_DIR_HISTORY ,_param->_nb_inst_branch_predict,_param->_size_history); 78 DELETE1_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS ,_param->_nb_inst_branch_predict,_param->_size_address); 79 // DELETE1_SIGNAL(out_PREDICT_UPT_RAS_INDEX ,_param->_nb_inst_branch_predict,_param->_size_ras_index); 80 81 // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 82 DELETE2_SIGNAL( in_DECOD_VAL ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1); 83 DELETE2_SIGNAL(out_DECOD_ACK ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1); 84 DELETE2_SIGNAL( in_DECOD_CONTEXT_ID ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_context_id ); 85 DELETE2_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1 ); 86 DELETE2_SIGNAL( in_DECOD_BRANCH_STATE ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_branch_state ); 87 DELETE2_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_max_size_depth ); 88 DELETE2_SIGNAL( in_DECOD_BRANCH_CONDITION ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_branch_condition); 89 DELETE2_SIGNAL( in_DECOD_BRANCH_DIRECTION ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1 ); 90 DELETE2_SIGNAL( in_DECOD_ADDRESS_SRC ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_address ); 91 DELETE2_SIGNAL( in_DECOD_ADDRESS_DEST ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_address ); 92 DELETE1_SIGNAL(out_DECOD_BTB_VAL ,_param->_nb_inst_branch_decod,1); 93 DELETE1_SIGNAL( in_DECOD_BTB_ACK ,_param->_nb_inst_branch_decod,1); 94 DELETE1_SIGNAL(out_DECOD_BTB_CONTEXT_ID ,_param->_nb_inst_branch_decod,_param->_size_context_id); 95 DELETE1_SIGNAL(out_DECOD_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_decod,_param->_size_address); 96 DELETE1_SIGNAL(out_DECOD_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_decod,_param->_size_address); 97 DELETE1_SIGNAL(out_DECOD_BTB_CONDITION ,_param->_nb_inst_branch_decod,_param->_size_branch_condition); 98 DELETE1_SIGNAL(out_DECOD_BTB_LAST_TAKE ,_param->_nb_inst_branch_decod,1); 99 DELETE1_SIGNAL(out_DECOD_BTB_MISS_PREDICTION,_param->_nb_inst_branch_decod,1); 100 DELETE1_SIGNAL(out_DECOD_BTB_IS_ACCURATE ,_param->_nb_inst_branch_decod,1); 101 102 DELETE1_SIGNAL(out_DECOD_RAS_VAL ,_param->_nb_inst_branch_decod,1); 103 DELETE1_SIGNAL( in_DECOD_RAS_ACK ,_param->_nb_inst_branch_decod,1); 104 DELETE1_SIGNAL(out_DECOD_RAS_CONTEXT_ID ,_param->_nb_inst_branch_decod,_param->_size_context_id); 105 DELETE1_SIGNAL( in_DECOD_RAS_HIT ,_param->_nb_inst_branch_decod,1); 106 DELETE1_SIGNAL(out_DECOD_RAS_PUSH ,_param->_nb_inst_branch_decod,1); 107 DELETE1_SIGNAL(out_DECOD_RAS_ADDRESS_PUSH ,_param->_nb_inst_branch_decod,_param->_size_address); 108 DELETE1_SIGNAL( in_DECOD_RAS_ADDRESS_POP ,_param->_nb_inst_branch_decod,_param->_size_address); 109 // DELETE1_SIGNAL( in_DECOD_RAS_INDEX ,_param->_nb_inst_branch_decod,_param->_size_ras_index); 110 DELETE1_SIGNAL(out_DECOD_RAS_MISS_PREDICTION,_param->_nb_inst_branch_decod,1); 111 112 DELETE1_SIGNAL(out_DECOD_UPT_VAL ,_param->_nb_inst_branch_decod,1); 113 DELETE1_SIGNAL( in_DECOD_UPT_ACK ,_param->_nb_inst_branch_decod,1); 114 DELETE1_SIGNAL(out_DECOD_UPT_CONTEXT_ID ,_param->_nb_inst_branch_decod,_param->_size_context_id); 115 DELETE1_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_decod,_param->_size_address); 116 DELETE1_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_decod,_param->_size_address); 117 DELETE1_SIGNAL(out_DECOD_UPT_BTB_CONDITION ,_param->_nb_inst_branch_decod,_param->_size_branch_condition); 118 DELETE1_SIGNAL(out_DECOD_UPT_BTB_LAST_TAKE ,_param->_nb_inst_branch_decod,1); 119 DELETE1_SIGNAL(out_DECOD_UPT_RAS_ADDRESS ,_param->_nb_inst_branch_decod,_param->_size_address); 120 // DELETE1_SIGNAL(out_DECOD_UPT_RAS_INDEX ,_param->_nb_inst_branch_decod,_param->_size_ras_index); 121 DELETE1_SIGNAL(out_DECOD_UPT_MISS_IFETCH ,_param->_nb_inst_branch_decod,1); 122 DELETE1_SIGNAL(out_DECOD_UPT_MISS_DECOD ,_param->_nb_inst_branch_decod,1); 123 DELETE1_SIGNAL(out_DECOD_UPT_UPDATE_PREDICTION_ID,_param->_nb_inst_branch_decod,_param->_max_size_depth); 124 125 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 126 DELETE1_SIGNAL(out_UPDATE_BTB_VAL ,_param->_nb_inst_branch_update,1); 127 DELETE1_SIGNAL( in_UPDATE_BTB_ACK ,_param->_nb_inst_branch_update,1); 128 // DELETE1_SIGNAL(out_UPDATE_BTB_CONTEXT_ID ,_param->_nb_inst_branch_update,_param->_size_context_id); 129 // DELETE1_SIGNAL(out_UPDATE_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_update,_param->_size_address); 130 // DELETE1_SIGNAL(out_UPDATE_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_update,_param->_size_address); 131 // DELETE1_SIGNAL(out_UPDATE_BTB_CONDITION ,_param->_nb_inst_branch_update,_param->_size_branch_condition); 132 // DELETE1_SIGNAL(out_UPDATE_BTB_LAST_TAKE ,_param->_nb_inst_branch_update,1); 133 // DELETE1_SIGNAL(out_UPDATE_BTB_MISS_PREDICTION ,_param->_nb_inst_branch_update,1); 134 135 DELETE1_SIGNAL(out_UPDATE_DIR_VAL ,_param->_nb_inst_branch_update,1); 136 DELETE1_SIGNAL( in_UPDATE_DIR_ACK ,_param->_nb_inst_branch_update,1); 137 // DELETE1_SIGNAL(out_UPDATE_DIR_ADDRESS ,_param->_nb_inst_branch_update,_param->_size_address); 138 // DELETE1_SIGNAL(out_UPDATE_DIR_HISTORY ,_param->_nb_inst_branch_update,_param->_size_history); 139 // DELETE1_SIGNAL(out_UPDATE_DIR_DIRECTION ,_param->_nb_inst_branch_update,1); 140 141 DELETE1_SIGNAL(out_UPDATE_RAS_VAL ,_param->_nb_inst_branch_update,1); 142 DELETE1_SIGNAL( in_UPDATE_RAS_ACK ,_param->_nb_inst_branch_update,1); 143 // DELETE1_SIGNAL(out_UPDATE_RAS_CONTEXT_ID ,_param->_nb_inst_branch_update,_param->_size_context_id); 144 // DELETE1_SIGNAL(out_UPDATE_RAS_PUSH ,_param->_nb_inst_branch_update,1); 145 // DELETE1_SIGNAL(out_UPDATE_RAS_ADDRESS ,_param->_nb_inst_branch_update,_param->_size_address); 146 // DELETE1_SIGNAL(out_UPDATE_RAS_INDEX ,_param->_nb_inst_branch_update,_param->_size_ras_index); 147 // DELETE1_SIGNAL(out_UPDATE_RAS_MISS_PREDICTION ,_param->_nb_inst_branch_update,1); 148 // DELETE1_SIGNAL(out_UPDATE_RAS_PREDICTION_IFETCH ,_param->_nb_inst_branch_update,1); 149 150 DELETE1_SIGNAL( in_UPDATE_UPT_VAL ,_param->_nb_inst_branch_update,1); 151 DELETE1_SIGNAL(out_UPDATE_UPT_ACK ,_param->_nb_inst_branch_update,1); 152 // DELETE1_SIGNAL( in_UPDATE_UPT_CONTEXT_ID ,_param->_nb_inst_branch_update,_param->_size_context_id); 153 // DELETE1_SIGNAL( in_UPDATE_UPT_MISS_PREDICTION ,_param->_nb_inst_branch_update,1); 154 // DELETE1_SIGNAL( in_UPDATE_UPT_DIRECTION_GOOD ,_param->_nb_inst_branch_update,1); 155 DELETE1_SIGNAL( in_UPDATE_UPT_BTB_VAL ,_param->_nb_inst_branch_update,1); 156 // DELETE1_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_update,_param->_size_address); 157 // DELETE1_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_update,_param->_size_address); 158 // DELETE1_SIGNAL( in_UPDATE_UPT_BTB_CONDITION ,_param->_nb_inst_branch_update,_param->_size_branch_condition); 159 DELETE1_SIGNAL( in_UPDATE_UPT_DIR_VAL ,_param->_nb_inst_branch_update,1); 160 // DELETE1_SIGNAL( in_UPDATE_UPT_DIR_HISTORY ,_param->_nb_inst_branch_update,_param->_size_history); 161 DELETE1_SIGNAL( in_UPDATE_UPT_RAS_VAL ,_param->_nb_inst_branch_update,1); 162 // DELETE1_SIGNAL( in_UPDATE_UPT_RAS_PUSH ,_param->_nb_inst_branch_update,1); 163 // DELETE1_SIGNAL( in_UPDATE_UPT_RAS_ADDRESS ,_param->_nb_inst_branch_update,_param->_size_address); 164 // DELETE1_SIGNAL( in_UPDATE_UPT_RAS_INDEX ,_param->_nb_inst_branch_update,_param->_size_ras_index); 165 // DELETE1_SIGNAL( in_UPDATE_UPT_RAS_PREDICTION_IFETCH,_param->_nb_inst_branch_update,1); 79 166 80 167 // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 81 DELETE1_SIGNAL( in_DEPTH_UPT_NB_BRANCH,_param->_nb_context,_param->_size_depth[alloc_signal_it1] );168 DELETE1_SIGNAL( in_DEPTH_UPT_NB_BRANCH,_param->_nb_context,_param->_size_depth[alloc_signal_it1]+1); 82 169 DELETE1_SIGNAL( in_DEPTH_UPT_TAIL ,_param->_nb_context,_param->_size_depth[alloc_signal_it1]); 170 DELETE1_SIGNAL(out_DEPTH_NB_BRANCH ,_param->_nb_context,_param->_size_depth[alloc_signal_it1]+1); 171 DELETE1_SIGNAL(out_DEPTH_TAIL ,_param->_nb_context,_param->_size_depth[alloc_signal_it1]); 83 172 } 84 173 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_predict.cpp
r81 r82 26 26 Tcontrol_t ack [_param->_nb_context]; 27 27 for (uint32_t i=0; i<_param->_nb_context; i++) 28 ack [i] = 0; 29 30 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 28 { 29 ack [i] = 0; 30 31 if (_param->_have_port_depth[i]) 32 { 33 PORT_WRITE(out_DEPTH_TAIL [i],PORT_READ(in_DEPTH_UPT_TAIL [i])); 34 } 35 PORT_WRITE(out_DEPTH_NB_BRANCH [i],PORT_READ(in_DEPTH_UPT_NB_BRANCH [i])); 36 } 37 38 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 31 39 { 32 40 log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"PREDICT [%d]",i); … … 136 144 { 137 145 branch_state = BRANCH_STATE_SPEC_NTAKE; 138 pc_next = address_src+ 8; // +4= delay slot146 pc_next = address_src+2; // +1 = delay slot 139 147 } 140 148 break; … … 191 199 PORT_WRITE(out_PREDICT_RAS_CONTEXT_ID [i], context); 192 200 PORT_WRITE(out_PREDICT_RAS_PUSH [i], push); 193 PORT_WRITE(out_PREDICT_RAS_ADDRESS_PUSH [i], address_src+ 8);201 PORT_WRITE(out_PREDICT_RAS_ADDRESS_PUSH [i], address_src+2); 194 202 195 203 is_accurate &= PORT_READ(in_PREDICT_RAS_HIT [i]); // if miss - prediction is not accurate … … 221 229 // (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i]))); 222 230 223 dir_val = (PORT_READ(in_PREDICT_BTB_ACK [i]) and 224 (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i])) and 225 (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i]))); 226 227 ras_val = (PORT_READ(in_PREDICT_BTB_ACK [i]) and 228 (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i])) and 229 (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i]))); 230 231 upt_val = (PORT_READ(in_PREDICT_BTB_ACK [i]) and 232 (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i])) and 233 (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i]))); 231 dir_val = (use_dir and 232 PORT_READ(in_PREDICT_BTB_ACK [i]) and 233 (not use_ras or (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i]))) and 234 (not use_upt or (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i])))); 235 236 ras_val = (use_ras and 237 PORT_READ(in_PREDICT_BTB_ACK [i]) and 238 (not use_dir or (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i]))) and 239 (not use_upt or (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i])))); 240 241 upt_val = (use_upt and 242 PORT_READ(in_PREDICT_BTB_ACK [i]) and 243 (not use_dir or (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i]))) and 244 (not use_ras or (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i])))); 234 245 235 246 // pc_next - is previously computed … … 238 249 Taddress_t address_src_lsb = address_src%_param->_nb_instruction [context]; 239 250 251 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * address_src : 0x%x",address_src); 252 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * address_src_lsb : %d",address_src_lsb); 240 253 if (address_src_lsb == (_param->_nb_instruction [context]-1)) 241 254 { 242 255 // branch is in the last slot of the packet 256 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * branch is in the last slot of the packet"); 257 243 258 address_msb = _param->_nb_instruction [context]; // == (address_src_lsb+1) 244 259 pc_next_is_ds_take = 1; … … 250 265 pc_next_is_ds_take = 0; 251 266 } 267 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * address_msb : %d",address_msb); 252 268 253 269 inst_ifetch_ptr = address_src_lsb; 254 branch_update_prediction_id = ( PORT_READ(in_DEPTH_UPT_TAIL[context])+PORT_READ(in_DEPTH_UPT_NB_BRANCH [context]))%_param->_size_depth[context];270 branch_update_prediction_id = (_param->_have_port_depth[context])?((PORT_READ(in_DEPTH_UPT_TAIL[context])+PORT_READ(in_DEPTH_UPT_NB_BRANCH [context]))%_param->_size_depth[context]):0; 255 271 } 256 272 else … … 270 286 PORT_WRITE(out_PREDICT_PC_NEXT [context] , pc_next ); 271 287 PORT_WRITE(out_PREDICT_PC_NEXT_IS_DS_TAKE [context] , pc_next_is_ds_take ); 288 289 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * instruction enable :"); 290 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * nb_inst : %d",_param->_nb_instruction [context]); 291 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * [0:%d[ = 0",address_lsb); 292 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * [%d:%d[ = 1",address_lsb,((pc_current_is_ds_take)?1:address_msb)); 293 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * [%d:%d[ = 0",((pc_current_is_ds_take)?1:address_msb),_param->_nb_instruction [context]); 294 272 295 for (uint32_t j=0; j<address_lsb; j++) 273 296 PORT_WRITE(out_PREDICT_INSTRUCTION_ENABLE [context][j], 0); // Before the address : not valid -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_transition.cpp
r81 r82 27 27 { 28 28 reg_PREDICT_PRIORITY = 0; 29 reg_DECOD_PRIORITY = 0; 29 30 } 30 31 else 31 32 { 32 33 // Round robin priority 33 reg_PREDICT_PRIORITY = (reg_PREDICT_PRIORITY+_param->_nb_inst_predict)%_param->_nb_context; 34 reg_PREDICT_PRIORITY = (reg_PREDICT_PRIORITY+_param->_nb_inst_branch_predict)%_param->_nb_context; 35 reg_DECOD_PRIORITY = (reg_DECOD_PRIORITY +1)%_param->_nb_decod_unit; 34 36 } 35 37 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 16 10 #define CYCLE_MAX (1024*NB_ITERATION) 11 9 12 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 14 #include "Behavioural/include/Allocation.h" 12 13 #define NB_ITERATION 1614 #define CYCLE_MAX (1024*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 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \27 if (cycle_offset != 0) \28 { \29 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]"; \30 cout << " (" << __LINE__ << ")" << endl; \31 } \32 \33 if (cycle_current > CYCLE_MAX) \34 { \35 TEST_KO("Maximal cycles Reached"); \36 } \37 \38 sc_start(cycle_offset); \39 \40 } while(0)41 15 42 16 void test (string name, … … 49 23 #endif 50 24 51 Return_Address_Stack * _Return_Address_Stack = new Return_Address_Stack (name.c_str(), 25 Return_Address_Stack * _Return_Address_Stack = new Return_Address_Stack 26 (name.c_str(), 52 27 #ifdef STATISTICS 53 28 _parameters_statistics, 54 29 #endif 55 _param); 30 _param, 31 USE_ALL); 56 32 57 33 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Return_Address_Stack.h
r81 r82 128 128 #endif 129 129 Parameters * param, 130 morpheo::behavioural::Tusage_t usage =USE_ALL130 morpheo::behavioural::Tusage_t usage 131 131 ); 132 132 public : ~Return_Address_Stack (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_mono_context.cfg
r81 r82 1 1 Prediction_unit 2 1 1 +1 # nb_context 3 1 1 +1 # nb_decod_unit 4 30 30 +1 # size_address 5 1 4 *4 # nb_instruction [0] [nb_context] 6 1 1 +1 # nb_inst_decod [0] [nb_decod_unit] 7 1 1 +1 # nb_inst_branch_predict 8 1 1 +1 # nb_inst_branch_decod 9 1 1 +1 # nb_inst_branch_update 10 1 1 +1 # nb_inst_branch_complete 11 2 8 *4 # btb_size_queue 12 2 2 +1 # btb_associativity 13 2 2 +1 # btb_size_counter 14 3 3 +1 # btb_victim_scheme 15 1 1 +1 # dir_predictor_scheme 16 1 1 +1 # dir_have_bht [0] [3] 17 1 1 +1 # dir_have_bht [1] [3] 18 1 1 +1 # dir_have_bht [2] [3] 19 1 1 +1 # dir_bht_size_shifter [0] [3] 20 1 1 +1 # dir_bht_size_shifter [1] [3] 21 1 1 +1 # dir_bht_size_shifter [2] [3] 22 1 1 +1 # dir_bht_nb_shifter [0] [3] 23 1 1 +1 # dir_bht_nb_shifter [1] [3] 24 1 1 +1 # dir_bht_nb_shifter [2] [3] 25 1 1 +1 # dir_have_pht [0] [3] 26 1 1 +1 # dir_have_pht [1] [3] 27 1 1 +1 # dir_have_pht [2] [3] 28 1 1 +1 # dir_pht_size_counter [0] [3] 29 1 1 +1 # dir_pht_size_counter [1] [3] 30 1 1 +1 # dir_pht_size_counter [2] [3] 31 1 1 +1 # dir_pht_nb_counter [0] [3] 32 1 1 +1 # dir_pht_nb_counter [1] [3] 33 1 1 +1 # dir_pht_nb_counter [2] [3] 34 1 1 +1 # dir_pht_size_address_share [0] [3] 35 1 1 +1 # dir_pht_size_address_share [1] [3] 36 1 1 +1 # dir_pht_size_address_share [2] [3] 37 2 4 *2 # ras_size_queue [0] [nb_context] 38 1 4 *4 # upt_size_queue [0] [nb_context] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/main.cpp
r81 r82 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/include/test.h" 9 9 10 #define NB_PARAMS 010 #define NB_PARAMS (12+3*7) 11 11 12 12 void usage (int argc, char * argv[]) … … 14 14 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 15 15 err (_("list_params is :\n")); 16 err (_(" * ()\n")); 16 err (_(" * nb_context (uint32_t )\n")); 17 err (_(" * nb_decod_unit (uint32_t )\n")); 18 err (_(" * size_address (uint32_t )\n")); 19 err (_(" * nb_instruction [nb_context] (uint32_t )\n")); 20 err (_(" * nb_inst_decod [nb_decod_unit](uint32_t )\n")); 21 err (_(" * nb_inst_branch_predict (uint32_t )\n")); 22 err (_(" * nb_inst_branch_decod (uint32_t )\n")); 23 err (_(" * nb_inst_branch_update (uint32_t )\n")); 24 err (_(" * nb_inst_branch_complete (uint32_t )\n")); 25 err (_(" * btb_size_queue (uint32_t )\n")); 26 err (_(" * btb_associativity (uint32_t )\n")); 27 err (_(" * btb_size_counter (uint32_t )\n")); 28 err (_(" * btb_victim_scheme (Tvictim_t )\n")); 29 err (_(" * dir_predictor_scheme (Tpredictor_t)\n")); 30 err (_(" * dir_have_bht [3] (bool )\n")); 31 err (_(" * dir_bht_size_shifter [3] (uint32_t )\n")); 32 err (_(" * dir_bht_nb_shifter [3] (uint32_t )\n")); 33 err (_(" * dir_have_pht [3] (bool )\n")); 34 err (_(" * dir_pht_size_counter [3] (uint32_t )\n")); 35 err (_(" * dir_pht_nb_counter [3] (uint32_t )\n")); 36 err (_(" * dir_pht_size_address_share [3] (uint32_t )\n")); 37 err (_(" * ras_size_queue [nb_context] (uint32_t )\n")); 38 err (_(" * upt_size_queue [nb_context] (uint32_t )\n")); 17 39 18 40 exit (1); … … 25 47 #endif 26 48 { 27 if (argc !=static_cast<int>(2+NB_PARAMS))49 if (argc < static_cast<int>(2+NB_PARAMS)) 28 50 usage (argc, argv); 29 51 … … 31 53 32 54 string name = argv[x++]; 33 //const uint32_t size_data = atoi(argv[x++]); 34 //const uint32_t nb_port = atoi(argv[x++]); 55 uint32_t _nb_context = fromString<uint32_t>(argv[x++]); 56 uint32_t _nb_decod_unit = fromString<uint32_t>(argv[x++]); 57 uint32_t _size_address = fromString<uint32_t>(argv[x++]); 58 59 if (argc != static_cast<int>(2+NB_PARAMS+3*_nb_context+_nb_decod_unit)) 60 usage (argc, argv); 61 62 uint32_t * _nb_instruction = new uint32_t [_nb_context]; 63 for (uint32_t i=0; i<_nb_context; i++) 64 _nb_instruction [i] = fromString<uint32_t >(argv[x++]); 65 uint32_t * _nb_inst_decod = new uint32_t [_nb_decod_unit]; 66 for (uint32_t i=0; i<_nb_decod_unit; i++) 67 _nb_inst_decod [i] = fromString<uint32_t >(argv[x++]); 68 uint32_t _nb_inst_branch_predict = fromString<uint32_t >(argv[x++]); 69 uint32_t _nb_inst_branch_decod = fromString<uint32_t >(argv[x++]); 70 uint32_t _nb_inst_branch_update = fromString<uint32_t >(argv[x++]); 71 uint32_t _nb_inst_branch_complete = fromString<uint32_t >(argv[x++]); 72 uint32_t _btb_size_queue = fromString<uint32_t >(argv[x++]); 73 uint32_t _btb_associativity = fromString<uint32_t >(argv[x++]); 74 uint32_t _btb_size_counter = fromString<uint32_t >(argv[x++]); 75 Tvictim_t _btb_victim_scheme = fromString<Tvictim_t >(argv[x++]); 76 Tpredictor_t _dir_predictor_scheme = fromString<Tpredictor_t>(argv[x++]); 77 bool _dir_have_bht [3]; 78 for (uint32_t i=0; i<3; i++) 79 _dir_have_bht [i] = fromString<bool >(argv[x++]); 80 uint32_t _dir_bht_size_shifter [3]; 81 for (uint32_t i=0; i<3; i++) 82 _dir_bht_size_shifter [i] = fromString<uint32_t >(argv[x++]); 83 uint32_t _dir_bht_nb_shifter [3]; 84 for (uint32_t i=0; i<3; i++) 85 _dir_bht_nb_shifter [i] = fromString<uint32_t >(argv[x++]); 86 bool _dir_have_pht [3]; 87 for (uint32_t i=0; i<3; i++) 88 _dir_have_pht [i] = fromString<bool >(argv[x++]); 89 uint32_t _dir_pht_size_counter [3]; 90 for (uint32_t i=0; i<3; i++) 91 _dir_pht_size_counter [i] = fromString<uint32_t >(argv[x++]); 92 uint32_t _dir_pht_nb_counter [3]; 93 for (uint32_t i=0; i<3; i++) 94 _dir_pht_nb_counter [i] = fromString<uint32_t >(argv[x++]); 95 uint32_t _dir_pht_size_address_share [3]; 96 for (uint32_t i=0; i<3; i++) 97 _dir_pht_size_address_share [i] = fromString<uint32_t >(argv[x++]); 98 uint32_t * _ras_size_queue = new uint32_t [_nb_context]; 99 for (uint32_t i=0; i<_nb_context; i++) 100 _ras_size_queue [i] = fromString<uint32_t >(argv[x++]); 101 uint32_t * _upt_size_queue = new uint32_t [_nb_context]; 102 for (uint32_t i=0; i<_nb_context; i++) 103 _upt_size_queue [i] = fromString<uint32_t >(argv[x++]); 35 104 36 105 int _return = EXIT_SUCCESS; … … 38 107 { 39 108 morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::Parameters 40 (//size_data, 41 //nb_port 42 ); 109 (_nb_context , 110 _nb_decod_unit , 111 _size_address , 112 _nb_instruction , 113 _nb_inst_decod , 114 _nb_inst_branch_predict , 115 _nb_inst_branch_decod , 116 _nb_inst_branch_update , 117 _nb_inst_branch_complete , 118 _btb_size_queue , 119 _btb_associativity , 120 _btb_size_counter , 121 _btb_victim_scheme , 122 _dir_predictor_scheme , 123 _dir_have_bht , 124 _dir_bht_size_shifter , 125 _dir_bht_nb_shifter , 126 _dir_have_pht , 127 _dir_pht_size_counter , 128 _dir_pht_nb_counter , 129 _dir_pht_size_address_share, 130 _ras_size_queue , 131 _upt_size_queue 132 ); 43 133 44 134 msg(_("%s"),param->print(1).c_str()); … … 57 147 } 58 148 149 delete [] _nb_instruction ; 150 delete [] _nb_inst_decod ; 151 delete [] _ras_size_queue ; 152 delete [] _upt_size_queue ; 153 59 154 return (_return); 60 155 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/test.cpp
r81 r82 23 23 #endif 24 24 25 Prediction_unit * _Prediction_unit = new Prediction_unit (name.c_str(), 25 Prediction_unit * _Prediction_unit = new Prediction_unit 26 (name.c_str(), 26 27 #ifdef STATISTICS 27 _parameters_statistics, 28 #endif 29 _param); 28 _parameters_statistics, 29 #endif 30 _param, 31 USE_ALL); 30 32 31 33 #ifdef SYSTEMC … … 37 39 sc_clock * in_CLOCK = new sc_clock ("clock", 1.0, 0.5); 38 40 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 41 42 43 ALLOC1_SC_SIGNAL( in_PREDICT_VAL ," in_PREDICT_VAL ",Tcontrol_t ,_param->_nb_context); 44 ALLOC1_SC_SIGNAL(out_PREDICT_ACK ,"out_PREDICT_ACK ",Tcontrol_t ,_param->_nb_context); 45 ALLOC1_SC_SIGNAL( in_PREDICT_PC_PREVIOUS ," in_PREDICT_PC_PREVIOUS ",Taddress_t ,_param->_nb_context); 46 ALLOC1_SC_SIGNAL( in_PREDICT_PC_CURRENT ," in_PREDICT_PC_CURRENT ",Taddress_t ,_param->_nb_context); 47 ALLOC1_SC_SIGNAL( in_PREDICT_PC_CURRENT_IS_DS_TAKE ," in_PREDICT_PC_CURRENT_IS_DS_TAKE ",Tcontrol_t ,_param->_nb_context); 48 ALLOC1_SC_SIGNAL(out_PREDICT_PC_NEXT ,"out_PREDICT_PC_NEXT ",Taddress_t ,_param->_nb_context); 49 ALLOC1_SC_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE ,"out_PREDICT_PC_NEXT_IS_DS_TAKE ",Tcontrol_t ,_param->_nb_context); 50 ALLOC2_SC_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE ,"out_PREDICT_INSTRUCTION_ENABLE ",Tcontrol_t ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]); 51 ALLOC1_SC_SIGNAL(out_PREDICT_INST_IFETCH_PTR ,"out_PREDICT_INST_IFETCH_PTR ",Tinst_ifetch_ptr_t ,_param->_nb_context); 52 ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_STATE ,"out_PREDICT_BRANCH_STATE ",Tbranch_state_t ,_param->_nb_context); 53 ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"out_PREDICT_BRANCH_UPDATE_PREDICTION_ID",Tprediction_ptr_t ,_param->_nb_context); 54 55 ALLOC2_SC_SIGNAL( in_DECOD_VAL ," in_DECOD_VAL ",Tcontrol_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 56 ALLOC2_SC_SIGNAL(out_DECOD_ACK ,"out_DECOD_ACK ",Tcontrol_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 57 ALLOC2_SC_SIGNAL( in_DECOD_CONTEXT_ID ," in_DECOD_CONTEXT_ID ",Tcontext_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 58 ALLOC2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR ," in_DECOD_MATCH_INST_IFETCH_PTR ",Tcontrol_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 59 ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_STATE ," in_DECOD_BRANCH_STATE ",Tbranch_state_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 60 ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID ," in_DECOD_BRANCH_UPDATE_PREDICTION_ID ",Tprediction_ptr_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 61 ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION ," in_DECOD_BRANCH_CONDITION ",Tbranch_condition_t,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 62 ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION ," in_DECOD_BRANCH_DIRECTION ",Tcontrol_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 63 ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_SRC ," in_DECOD_ADDRESS_SRC ",Taddress_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 64 ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_DEST ," in_DECOD_ADDRESS_DEST ",Taddress_t ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 65 66 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL ," in_BRANCH_COMPLETE_VAL ",Tcontrol_t ,_param->_nb_inst_branch_complete); 67 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ACK ,"out_BRANCH_COMPLETE_ACK ",Tcontrol_t ,_param->_nb_inst_branch_complete); 68 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_CONTEXT_ID ," in_BRANCH_COMPLETE_CONTEXT_ID ",Tcontext_t ,_param->_nb_inst_branch_complete); 69 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH ," in_BRANCH_COMPLETE_DEPTH ",Tdepth_t ,_param->_nb_inst_branch_complete); 70 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS ," in_BRANCH_COMPLETE_ADDRESS ",Taddress_t ,_param->_nb_inst_branch_complete); 71 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_FLAG ," in_BRANCH_COMPLETE_FLAG ",Tcontrol_t ,_param->_nb_inst_branch_complete); 72 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION ,"out_BRANCH_COMPLETE_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_inst_branch_complete); 73 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,"out_BRANCH_COMPLETE_TAKE ",Tcontrol_t ,_param->_nb_inst_branch_complete); 74 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,"out_BRANCH_COMPLETE_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_complete); 75 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,"out_BRANCH_COMPLETE_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_complete); 76 77 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_VAL ,"out_BRANCH_EVENT_VAL ",Tcontrol_t ,_param->_nb_context); 78 ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_ACK ," in_BRANCH_EVENT_ACK ",Tcontrol_t ,_param->_nb_context); 79 //ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID ,"out_BRANCH_EVENT_CONTEXT_ID ",Tcontext_t ,_param->_nb_context); 80 //ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_DEPTH ,"out_BRANCH_EVENT_DEPTH ",Tdepth_t ,_param->_nb_context); 81 //ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION ,"out_BRANCH_EVENT_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_context); 82 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC ,"out_BRANCH_EVENT_ADDRESS_SRC ",Taddress_t ,_param->_nb_context); 83 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST ,"out_BRANCH_EVENT_ADDRESS_DEST ",Taddress_t ,_param->_nb_context); 84 85 ALLOC1_SC_SIGNAL(out_DEPTH_NB_BRANCH ,"out_DEPTH_NB_BRANCH ",Tdepth_t ,_param->_nb_context); 86 ALLOC1_SC_SIGNAL(out_DEPTH_TAIL ,"out_DEPTH_TAIL ",Tdepth_t ,_param->_nb_context); 39 87 40 88 /******************************************************** … … 47 95 (*(_Prediction_unit->in_NRESET)) (*(in_NRESET)); 48 96 97 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_VAL ,_param->_nb_context); 98 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_ACK ,_param->_nb_context); 99 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_PC_PREVIOUS ,_param->_nb_context); 100 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_PC_CURRENT ,_param->_nb_context); 101 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_PC_CURRENT_IS_DS_TAKE ,_param->_nb_context); 102 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_PC_NEXT ,_param->_nb_context); 103 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_PC_NEXT_IS_DS_TAKE ,_param->_nb_context); 104 INSTANCE2_SC_SIGNAL(_Prediction_unit,out_PREDICT_INSTRUCTION_ENABLE ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]); 105 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_BRANCH_STATE ,_param->_nb_context); 106 107 for (uint32_t i=0; i<_param->_nb_context; i++) 108 { 109 if (_param->_have_port_inst_ifetch_ptr [i]) 110 INSTANCE_SC_SIGNAL(_Prediction_unit,out_PREDICT_INST_IFETCH_PTR [i]); 111 if (_param->_have_port_depth [i]) 112 INSTANCE_SC_SIGNAL(_Prediction_unit,out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i]); 113 } 114 115 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_VAL ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 116 INSTANCE2_SC_SIGNAL(_Prediction_unit,out_DECOD_ACK ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 117 if (_param->_have_port_context_id) 118 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_CONTEXT_ID ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 119 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_MATCH_INST_IFETCH_PTR ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 120 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_STATE ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 121 if (_param->_have_port_max_depth) 122 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_UPDATE_PREDICTION_ID ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 123 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_CONDITION ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 124 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_DIRECTION ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 125 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_ADDRESS_SRC ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 126 INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_ADDRESS_DEST ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 127 128 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_VAL ,_param->_nb_inst_branch_complete); 129 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ACK ,_param->_nb_inst_branch_complete); 130 if (_param->_have_port_context_id) 131 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_CONTEXT_ID ,_param->_nb_inst_branch_complete); 132 if (_param->_have_port_max_depth) 133 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete); 134 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete); 135 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_FLAG ,_param->_nb_inst_branch_complete); 136 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_MISS_PREDICTION ,_param->_nb_inst_branch_complete); 137 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete); 138 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete); 139 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete); 140 141 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_VAL ,_param->_nb_context); 142 INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_EVENT_ACK ,_param->_nb_context); 143 //if (_param->_have_port_context_id) 144 //INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_CONTEXT_ID ,_param->_nb_context); 145 //INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_DEPTH ,_param->_nb_context); 146 //INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_MISS_PREDICTION ,_param->_nb_context); 147 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_ADDRESS_SRC ,_param->_nb_context); 148 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_ADDRESS_DEST ,_param->_nb_context); 149 150 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_NB_BRANCH ,_param->_nb_context); 151 for (uint32_t i=0; i<_param->_nb_context; i++) 152 if (_param->_have_port_depth[i]) 153 INSTANCE_SC_SIGNAL(_Prediction_unit,out_DEPTH_TAIL [i]); 49 154 50 155 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); … … 91 196 delete in_CLOCK; 92 197 delete in_NRESET; 198 199 DELETE1_SC_SIGNAL( in_PREDICT_VAL ,_param->_nb_context); 200 DELETE1_SC_SIGNAL(out_PREDICT_ACK ,_param->_nb_context); 201 DELETE1_SC_SIGNAL( in_PREDICT_PC_PREVIOUS ,_param->_nb_context); 202 DELETE1_SC_SIGNAL( in_PREDICT_PC_CURRENT ,_param->_nb_context); 203 DELETE1_SC_SIGNAL( in_PREDICT_PC_CURRENT_IS_DS_TAKE ,_param->_nb_context); 204 DELETE1_SC_SIGNAL(out_PREDICT_PC_NEXT ,_param->_nb_context); 205 DELETE1_SC_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE ,_param->_nb_context); 206 DELETE1_SC_SIGNAL(out_PREDICT_INST_IFETCH_PTR ,_param->_nb_context); 207 DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_STATE ,_param->_nb_context); 208 DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context); 209 210 DELETE2_SC_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]); 211 DELETE2_SC_SIGNAL( in_DECOD_VAL ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 212 DELETE2_SC_SIGNAL(out_DECOD_ACK ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 213 DELETE2_SC_SIGNAL( in_DECOD_CONTEXT_ID ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 214 DELETE2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 215 DELETE2_SC_SIGNAL( in_DECOD_BRANCH_STATE ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 216 DELETE2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 217 DELETE2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 218 DELETE2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 219 DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_SRC ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 220 DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_DEST ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 221 222 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL ,_param->_nb_inst_branch_complete); 223 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ACK ,_param->_nb_inst_branch_complete); 224 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_CONTEXT_ID ,_param->_nb_inst_branch_complete); 225 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete); 226 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete); 227 DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_FLAG ,_param->_nb_inst_branch_complete); 228 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete); 229 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete); 230 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete); 231 DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete); 232 233 DELETE1_SC_SIGNAL(out_BRANCH_EVENT_VAL ,_param->_nb_context); 234 DELETE1_SC_SIGNAL( in_BRANCH_EVENT_ACK ,_param->_nb_context); 235 //DELETE1_SC_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID ,_param->_nb_context); 236 //DELETE1_SC_SIGNAL(out_BRANCH_EVENT_DEPTH ,_param->_nb_context); 237 //DELETE1_SC_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION,_param->_nb_context); 238 DELETE1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC ,_param->_nb_context); 239 DELETE1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST ,_param->_nb_context); 240 241 DELETE1_SC_SIGNAL(out_DEPTH_NB_BRANCH ,_param->_nb_context); 242 DELETE1_SC_SIGNAL(out_DEPTH_TAIL ,_param->_nb_context); 93 243 #endif 94 244 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp
r81 r82 71 71 ALLOC1_SC_SIGNAL( in_DECOD_RAS_ADDRESS ," in_DECOD_RAS_ADDRESS ",Taddress_t ,_param->_nb_inst_decod); 72 72 ALLOC1_SC_SIGNAL( in_DECOD_RAS_INDEX ," in_DECOD_RAS_INDEX ",Tptr_t ,_param->_nb_inst_decod); 73 ALLOC1_SC_SIGNAL( in_DECOD_MISS_PREDICTION ," in_DECOD_MISS_PREDICTION ",Tcontrol_t ,_param->_nb_inst_decod); 73 ALLOC1_SC_SIGNAL( in_DECOD_MISS_IFETCH ," in_DECOD_MISS_IFETCH ",Tcontrol_t ,_param->_nb_inst_decod); 74 ALLOC1_SC_SIGNAL( in_DECOD_MISS_DECOD ," in_DECOD_MISS_DECOD ",Tcontrol_t ,_param->_nb_inst_decod); 74 75 ALLOC1_SC_SIGNAL( in_DECOD_UPDATE_PREDICTION_ID ," in_DECOD_UPDATE_PREDICTION_ID ",Tprediction_ptr_t ,_param->_nb_inst_decod); 75 76 //ALLOC1_SC_SIGNAL(out_DECOD_DEPTH ,"out_DECOD_DEPTH ",Tdepth_t ,_param->_nb_inst_decod); 77 76 78 ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL ," in_BRANCH_COMPLETE_VAL ",Tcontrol_t ,_param->_nb_inst_branch_complete); 77 79 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ACK ,"out_BRANCH_COMPLETE_ACK ",Tcontrol_t ,_param->_nb_inst_branch_complete); … … 84 86 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,"out_BRANCH_COMPLETE_ADDRESS_SRC ",Taddress_t ,_param->_nb_inst_branch_complete); 85 87 ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,"out_BRANCH_COMPLETE_ADDRESS_DEST ",Taddress_t ,_param->_nb_inst_branch_complete); 88 89 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_VAL ,"out_BRANCH_EVENT_VAL ",Tcontrol_t ,_param->_nb_context); 90 ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_ACK ," in_BRANCH_EVENT_ACK ",Tcontrol_t ,_param->_nb_context); 91 // ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_CONTEXT_ID ," in_BRANCH_EVENT_CONTEXT_ID ",Tcontext_t ,_param->_nb_context); 92 // ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_DEPTH ," in_BRANCH_EVENT_DEPTH ",Tdepth_t ,_param->_nb_context); 93 // ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION,"out_BRANCH_EVENT_MISS_PREDICTION",Tcontrol_t ,_param->_nb_context); 94 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC ,"out_BRANCH_EVENT_ADDRESS_SRC ",Taddress_t ,_param->_nb_context); 95 ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST ,"out_BRANCH_EVENT_ADDRESS_DEST ",Taddress_t ,_param->_nb_context); 96 86 97 ALLOC1_SC_SIGNAL(out_UPDATE_VAL ,"out_UPDATE_VAL ",Tcontrol_t ,_param->_nb_inst_update); 87 98 ALLOC1_SC_SIGNAL( in_UPDATE_ACK ," in_UPDATE_ACK ",Tcontrol_t ,_param->_nb_inst_update); … … 96 107 ALLOC1_SC_SIGNAL(out_UPDATE_DIR_HISTORY ,"out_UPDATE_DIR_HISTORY ",Thistory_t ,_param->_nb_inst_update); 97 108 ALLOC1_SC_SIGNAL(out_UPDATE_RAS_VAL ,"out_UPDATE_RAS_VAL ",Tcontrol_t ,_param->_nb_inst_update); 109 ALLOC1_SC_SIGNAL(out_UPDATE_RAS_PUSH ,"out_UPDATE_RAS_PUSH ",Tcontrol_t ,_param->_nb_inst_update); 98 110 ALLOC1_SC_SIGNAL(out_UPDATE_RAS_ADDRESS ,"out_UPDATE_RAS_ADDRESS ",Taddress_t ,_param->_nb_inst_update); 99 111 ALLOC1_SC_SIGNAL(out_UPDATE_RAS_INDEX ,"out_UPDATE_RAS_INDEX ",Tptr_t ,_param->_nb_inst_update); … … 136 148 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_RAS_ADDRESS ,_param->_nb_inst_decod); 137 149 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_RAS_INDEX ,_param->_nb_inst_decod); 138 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_MISS_PREDICTION ,_param->_nb_inst_decod); 139 if (_param->_have_port_depth) 150 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_MISS_IFETCH ,_param->_nb_inst_decod); 151 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_MISS_DECOD ,_param->_nb_inst_decod); 152 if (_param->_have_port_max_depth) 140 153 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_UPDATE_PREDICTION_ID ,_param->_nb_inst_decod); 141 154 //if (_param->_have_port_depth) … … 145 158 if (_param->_have_port_context_id) 146 159 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_CONTEXT_ID ,_param->_nb_inst_branch_complete); 147 if (_param->_have_port_ depth)160 if (_param->_have_port_max_depth) 148 161 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete); 149 162 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete); … … 153 166 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete); 154 167 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete); 168 169 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_VAL ,_param->_nb_context); 170 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_ACK ,_param->_nb_context); 171 // if (_param->_have_port_context_id) 172 // INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_CONTEXT_ID ,_param->_nb_context); 173 // if (_param->_have_port_max_depth) 174 // INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_DEPTH ,_param->_nb_context); 175 // INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_ADDRESS ,_param->_nb_context); 176 // INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_MISS_PREDICTION,_param->_nb_context); 177 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_ADDRESS_SRC ,_param->_nb_context); 178 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_ADDRESS_DEST ,_param->_nb_context); 179 155 180 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_VAL ,_param->_nb_inst_update); 156 181 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_UPDATE_ACK ,_param->_nb_inst_update); … … 167 192 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_DIR_HISTORY ,_param->_nb_inst_update); 168 193 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_RAS_VAL ,_param->_nb_inst_update); 194 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_RAS_PUSH ,_param->_nb_inst_update); 169 195 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_RAS_ADDRESS ,_param->_nb_inst_update); 170 196 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_RAS_INDEX ,_param->_nb_inst_update); 171 197 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_RAS_PREDICTION_IFETCH ,_param->_nb_inst_update); 172 if (_param->_have_port_depth) 173 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_NB_BRANCH ,_param->_nb_context); 174 if (_param->_have_port_depth) 175 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_TAIL ,_param->_nb_context); 198 for (uint32_t i=0; i<_param->_nb_context; i++) 199 { 200 if (_param->_have_port_depth[i]) 201 { 202 INSTANCE_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_TAIL [i]); 203 } 204 INSTANCE_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_NB_BRANCH [i]); 205 } 176 206 177 207 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); … … 202 232 SC_START(5); 203 233 in_NRESET->write(1); 234 235 for (uint32_t i=0; i<_param->_nb_context; i++) 236 { 237 PORT_WRITE(in_BRANCH_EVENT_ACK [i],1); 238 } 204 239 205 240 LABEL("Loop of Test"); … … 236 271 in_PREDICT_RAS_INDEX [port]->write((0x12345678+i)%_param->_size_ras_index[context]); 237 272 238 if (_param->_have_port_depth )273 if (_param->_have_port_depth[context]) 239 274 { 240 275 TEST(Tdepth_t,out_DEPTH_TAIL [context]->read(), 0); 276 } 241 277 TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), i); 242 }278 243 279 SC_START(0); 244 280 … … 256 292 in_PREDICT_VAL [port]->write(0); 257 293 258 if (_param->_have_port_depth )294 if (_param->_have_port_depth[context]) 259 295 { 260 296 TEST(Tdepth_t,out_DEPTH_TAIL [context]->read(), 0); 297 } 261 298 TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), i+1); 262 } 299 263 300 } 264 301 } … … 283 320 in_DECOD_RAS_ADDRESS [port]->write(0xdeaddead+i); 284 321 in_DECOD_RAS_INDEX [port]->write((0x12345678+i)%_param->_size_ras_index[context]); 285 in_DECOD_MISS_PREDICTION [port]->write(false); 322 in_DECOD_MISS_IFETCH [port]->write(false); 323 in_DECOD_MISS_DECOD [port]->write(false); 286 324 in_DECOD_UPDATE_PREDICTION_ID [port]->write(i); 287 325 288 if (_param->_have_port_depth )326 if (_param->_have_port_depth[context]) 289 327 { 290 328 TEST(Tdepth_t,out_DEPTH_TAIL [context]->read(), 0); 329 } 291 330 TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]); 292 }293 331 294 332 SC_START(0); … … 307 345 in_DECOD_VAL [port]->write(0); 308 346 309 if (_param->_have_port_depth )347 if (_param->_have_port_depth[context]) 310 348 { 311 349 TEST(Tdepth_t,out_DEPTH_TAIL [context]->read(), 0); 350 } 312 351 TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]); 313 }314 352 } 315 353 } … … 331 369 in_BRANCH_COMPLETE_FLAG [port]->write(1); 332 370 333 if (_param->_have_port_depth )371 if (_param->_have_port_depth[context]) 334 372 { 335 373 TEST(Tdepth_t,out_DEPTH_TAIL [context]->read(), 0); 374 } 336 375 TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]); 337 }338 376 339 377 SC_START(0); … … 357 395 in_BRANCH_COMPLETE_VAL [port]->write(0); 358 396 359 if (_param->_have_port_depth )397 if (_param->_have_port_depth[context]) 360 398 { 361 399 TEST(Tdepth_t,out_DEPTH_TAIL [context]->read(), 0); 400 } 362 401 TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]); 363 }364 402 } 365 403 } … … 396 434 TEST(Thistory_t ,out_UPDATE_DIR_HISTORY [port]->read(), i); 397 435 TEST(Tcontrol_t ,out_UPDATE_RAS_VAL [port]->read(), 0); 436 TEST(Tcontrol_t ,out_UPDATE_RAS_PUSH [port]->read(), 0); 398 437 TEST(Taddress_t ,out_UPDATE_RAS_ADDRESS [port]->read(), 0xdeaddead+i); 399 438 TEST(Tptr_t ,out_UPDATE_RAS_INDEX [port]->read(), (0x12345678+i)%_param->_size_ras_index[context]); … … 411 450 412 451 // wait the garbage collector 413 if (_param->_have_port_depth) 414 while ((out_DEPTH_TAIL [context]->read() != 0) and 415 (out_DEPTH_NB_BRANCH[context]->read() != 0)) 416 { 417 LABEL("DEPTH [%d] nb_branch : %d - tail : %d",context,out_DEPTH_NB_BRANCH[context]->read(), out_DEPTH_TAIL [context]->read()); 418 SC_START(1); 419 } 452 while ((not (_param->_have_port_depth[context]) or (out_DEPTH_TAIL [context]->read() != 0)) and 453 (out_DEPTH_NB_BRANCH[context]->read() != 0)) 454 { 455 LABEL("DEPTH [%d] nb_branch : %d - tail : %d",context,out_DEPTH_NB_BRANCH[context]->read(), out_DEPTH_TAIL [context]->read()); 456 SC_START(1); 457 } 420 458 } 421 459 } … … 448 486 in_PREDICT_RAS_INDEX [port]->write((0x12345678+i)%_param->_size_ras_index[context]); 449 487 450 if (_param->_have_port_depth )488 if (_param->_have_port_depth[context]) 451 489 { 452 490 TEST(Tdepth_t,out_DEPTH_TAIL [context]->read(), 0); 491 } 453 492 TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), i); 454 } 493 455 494 SC_START(0); 456 495 … … 468 507 in_PREDICT_VAL [port]->write(0); 469 508 470 if (_param->_have_port_depth )509 if (_param->_have_port_depth[context]) 471 510 { 472 511 TEST(Tdepth_t,out_DEPTH_TAIL [context]->read(), 0); 512 } 473 513 TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), i+1); 474 }475 514 } 476 515 } … … 495 534 in_DECOD_RAS_ADDRESS [port]->write(0xdeaddead+i); 496 535 in_DECOD_RAS_INDEX [port]->write((0x12345678+i)%_param->_size_ras_index[context]); 497 in_DECOD_MISS_PREDICTION [port]->write(false); 536 in_DECOD_MISS_IFETCH [port]->write(false); 537 in_DECOD_MISS_DECOD [port]->write(false); 498 538 in_DECOD_UPDATE_PREDICTION_ID [port]->write(i); 499 539 500 if (_param->_have_port_depth )540 if (_param->_have_port_depth[context]) 501 541 { 502 542 TEST(Tdepth_t,out_DEPTH_TAIL [context]->read(), 0); 543 } 503 544 TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]); 504 }505 545 506 546 SC_START(0); … … 519 559 in_DECOD_VAL [port]->write(0); 520 560 521 if (_param->_have_port_depth )561 if (_param->_have_port_depth[context]) 522 562 { 523 563 TEST(Tdepth_t,out_DEPTH_TAIL [context]->read(), 0); 564 } 524 565 TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]); 525 }526 566 } 527 567 } … … 543 583 in_BRANCH_COMPLETE_FLAG [port]->write(0); 544 584 545 if (_param->_have_port_depth )585 if (_param->_have_port_depth[context]) 546 586 { 547 587 TEST(Tdepth_t,out_DEPTH_TAIL [context]->read(), 0); 588 } 548 589 TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]); 549 }550 590 551 591 SC_START(0); … … 604 644 TEST(Thistory_t ,out_UPDATE_DIR_HISTORY [port]->read(), i); 605 645 TEST(Tcontrol_t ,out_UPDATE_RAS_VAL [port]->read(), 0); 646 TEST(Tcontrol_t ,out_UPDATE_RAS_PUSH [port]->read(), 0); 606 647 TEST(Taddress_t ,out_UPDATE_RAS_ADDRESS [port]->read(), 0xdeaddead+i); 607 648 TEST(Tptr_t ,out_UPDATE_RAS_INDEX [port]->read(), (0x12345678+i)%_param->_size_ras_index[context]); … … 619 660 620 661 // wait the garbage collector 621 if (_param->_have_port_depth) 622 while ((out_DEPTH_TAIL [context]->read() != 0) and 623 (out_DEPTH_NB_BRANCH[context]->read() != 0)) 662 while (((not (_param->_have_port_depth[context])) or (out_DEPTH_TAIL [context]->read() != 0)) and 663 (out_DEPTH_NB_BRANCH[context]->read() != 0)) 624 664 { 625 665 LABEL("DEPTH [%d] nb_branch : %d - tail : %d",context,out_DEPTH_NB_BRANCH[context]->read(), out_DEPTH_TAIL [context]->read()); … … 671 711 delete [] in_DECOD_RAS_ADDRESS ; 672 712 delete [] in_DECOD_RAS_INDEX ; 673 delete [] in_DECOD_MISS_PREDICTION ; 713 delete [] in_DECOD_MISS_IFETCH ; 714 delete [] in_DECOD_MISS_DECOD ; 674 715 delete [] in_DECOD_UPDATE_PREDICTION_ID ; 675 716 //delete [] out_DECOD_DEPTH ; … … 686 727 delete [] out_BRANCH_COMPLETE_ADDRESS_SRC ; 687 728 delete [] out_BRANCH_COMPLETE_ADDRESS_DEST ; 729 730 // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 731 delete [] out_BRANCH_EVENT_VAL ; 732 delete [] in_BRANCH_EVENT_ACK ; 733 // delete [] in_BRANCH_EVENT_CONTEXT_ID ; 734 // delete [] in_BRANCH_EVENT_DEPTH ; 735 // delete [] out_BRANCH_EVENT_MISS_PREDICTION; 736 delete [] out_BRANCH_EVENT_ADDRESS_SRC ; 737 delete [] out_BRANCH_EVENT_ADDRESS_DEST ; 688 738 689 739 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 700 750 delete [] out_UPDATE_DIR_HISTORY ; 701 751 delete [] out_UPDATE_RAS_VAL ; 752 delete [] out_UPDATE_RAS_PUSH ; 702 753 delete [] out_UPDATE_RAS_ADDRESS ; 703 754 delete [] out_UPDATE_RAS_INDEX ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Parameters.h
r81 r82 35 35 36 36 public : uint32_t _size_context_id ; 37 public : uint32_t _size_depth ; 37 public : uint32_t * _size_depth ; // [nb_context] 38 public : uint32_t _max_size_depth ; 38 39 public : uint32_t _max_size_ras_index ; 39 40 40 41 public : bool _have_port_context_id ; 41 public : bool _have_port_depth ; 42 public : bool * _have_port_depth ; // [nb_context] 43 public : bool _have_port_max_depth ; 42 44 public : bool _have_port_history ; 43 45 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h
r81 r82 24 24 UPDATE_PREDICTION_STATE_WAIT_DECOD , // Fetch have access at the predictor 25 25 UPDATE_PREDICTION_STATE_WAITEND , // Have make a prediction, wait branch_complete 26 UPDATE_PREDICTION_STATE_EVENT , // have a event - must signal at the context_unit 26 27 UPDATE_PREDICTION_STATE_OK , // branch is complete and can update predictor 27 28 UPDATE_PREDICTION_STATE_KO , // have a event - must update predictor unit … … 58 59 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_WAIT_DECOD : return "wait_decod"; break; 59 60 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_WAITEND : return "waitend" ; break; 61 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_EVENT : return "event" ; break; 60 62 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_OK : return "ok" ; break; 61 63 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_KO : return "ko" ; break; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h
r81 r82 88 88 public : SC_IN (Taddress_t ) ** in_DECOD_RAS_ADDRESS ; //[nb_inst_decod] 89 89 public : SC_IN (Tptr_t ) ** in_DECOD_RAS_INDEX ; //[nb_inst_decod] 90 public : SC_IN (Tcontrol_t ) ** in_DECOD_MISS_PREDICTION ; //[nb_inst_decod] // ifetch is a miss pred 90 public : SC_IN (Tcontrol_t ) ** in_DECOD_MISS_IFETCH ; //[nb_inst_decod] 91 public : SC_IN (Tcontrol_t ) ** in_DECOD_MISS_DECOD ; //[nb_inst_decod] 91 92 public : SC_IN (Tprediction_ptr_t ) ** in_DECOD_UPDATE_PREDICTION_ID ; //[nb_inst_decod] 92 93 //public : SC_OUT(Tdepth_t ) ** out_DECOD_DEPTH ; //[nb_inst_decod] … … 103 104 public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_SRC ; //[nb_inst_branch_complete] 104 105 public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_DEST ; //[nb_inst_branch_complete] 106 107 // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 108 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_EVENT_VAL ; //[nb_context] 109 public : SC_IN (Tcontrol_t ) ** in_BRANCH_EVENT_ACK ; //[nb_context] 110 //public : SC_OUT(Tcontext_t ) ** out_BRANCH_EVENT_CONTEXT_ID ; //[nb_context] 111 //public : SC_OUT(Tdepth_t ) ** out_BRANCH_EVENT_DEPTH ; //[nb_context] 112 //public : SC_OUT(Tcontrol_t ) ** out_BRANCH_EVENT_MISS_PREDICTION; //[nb_context] is always miss prediction 113 public : SC_OUT(Taddress_t ) ** out_BRANCH_EVENT_ADDRESS_SRC ; //[nb_context] 114 public : SC_OUT(Taddress_t ) ** out_BRANCH_EVENT_ADDRESS_DEST ; //[nb_context] 105 115 106 116 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 117 127 public : SC_OUT(Thistory_t ) ** out_UPDATE_DIR_HISTORY ; //[nb_inst_update] 118 128 public : SC_OUT(Tcontrol_t ) ** out_UPDATE_RAS_VAL ; //[nb_inst_update] 129 public : SC_OUT(Tcontrol_t ) ** out_UPDATE_RAS_PUSH ; //[nb_inst_update] 119 130 public : SC_OUT(Taddress_t ) ** out_UPDATE_RAS_ADDRESS ; //[nb_inst_update] 120 131 public : SC_OUT(Tptr_t ) ** out_UPDATE_RAS_INDEX ; //[nb_inst_update] … … 131 142 private : uint32_t * reg_BOTTOM ; //[nb_context] 132 143 private : uint32_t * reg_NB_ELT ; //[nb_context] 144 private : uint32_t * reg_NB_ELT_UPDATE ; //[nb_context] 133 145 private : uint32_t * reg_NB_ELT_NEED_UPDATE ; //[nb_context] 134 146 private : entry_t ** reg_UPDATE_PREDICTION_TABLE; //[nb_context][size_queue] … … 142 154 private : Tcontrol_t * internal_BRANCH_COMPLETE_TAKE ; //[nb_inst_branch_complete] 143 155 private : Taddress_t * internal_BRANCH_COMPLETE_ADDRESS_DEST ; //[nb_inst_branch_complete] 156 private : Tcontrol_t * internal_BRANCH_EVENT_VAL ; //[nb_context] 157 private : Tdepth_t * internal_BRANCH_EVENT_DEPTH ; //[nb_context] 144 158 private : Tcontrol_t * internal_UPDATE_VAL ; //[nb_inst_update] 145 159 private : Tcontext_t * internal_UPDATE_CONTEXT_ID ; //[nb_inst_update] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters.cpp
r81 r82 43 43 44 44 _size_context_id = log2(nb_context); 45 _size_depth = log2(max<uint32_t>(size_queue,nb_context)); 45 _size_depth = new uint32_t[_nb_context]; 46 _have_port_depth = new bool [_nb_context]; 47 for (uint32_t i=0; i<_nb_context; i++) 48 { 49 _size_depth [i] = log2(_size_queue[i]); 50 _have_port_depth [i] = (_size_depth [i] > 0); 51 } 52 _max_size_depth = max<uint32_t>(_size_depth,_nb_context); 46 53 _max_size_ras_index = max<uint32_t>(_size_ras_index,nb_context); 47 54 48 55 _have_port_context_id = _size_context_id> 0; 49 _have_port_ depth = _size_depth> 0;56 _have_port_max_depth = _max_size_depth > 0; 50 57 _have_port_history = _size_history > 0; 51 58 … … 68 75 { 69 76 log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin"); 77 delete [] _size_depth ; 78 delete [] _have_port_depth; 70 79 log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End"); 71 80 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters_msg_error.cpp
r81 r82 27 27 Parameters_test test ("Update_Prediction_Table"); 28 28 29 if (morpheo::behavioural::test<Tdepth_t>(_ size_depth) == false)29 if (morpheo::behavioural::test<Tdepth_t>(_max_size_depth) == false) 30 30 test.error("type \"Tdepth_t\" is too small."); 31 31 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp
r81 r82 128 128 if (_param->_have_port_context_id) 129 129 sensitive << (*(in_DECOD_CONTEXT_ID [i])); 130 sensitive << (*(in_DECOD_MISS_PREDICTION [i])); 130 sensitive << (*(in_DECOD_MISS_IFETCH [i])) 131 << (*(in_DECOD_MISS_DECOD [i])); 131 132 } 132 133 … … 135 136 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 136 137 { 137 (*(out_DECOD_ACK [i])) (*(in_DECOD_MISS_PREDICTION [i])); 138 if (_param->_have_port_context_id) 139 (*(out_DECOD_ACK [i])) (*(in_DECOD_CONTEXT_ID [i])); 138 (*(out_DECOD_ACK [i])) (*(in_DECOD_MISS_IFETCH [i])); 139 (*(out_DECOD_ACK [i])) (*(in_DECOD_MISS_DECOD [i])); 140 if (_param->_have_port_context_id) 141 (*(out_DECOD_ACK [i])) (*(in_DECOD_CONTEXT_ID [i])); 140 142 } 141 143 # endif … … 150 152 if (_param->_have_port_context_id) 151 153 sensitive << (*(in_BRANCH_COMPLETE_CONTEXT_ID [i])); 152 if (_param->_have_port_ depth)154 if (_param->_have_port_max_depth) 153 155 sensitive << (*(in_BRANCH_COMPLETE_DEPTH [i])); 154 156 sensitive << (*(in_BRANCH_COMPLETE_FLAG [i])) … … 162 164 if (_param->_have_port_context_id) 163 165 (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i])); 164 if (_param->_have_port_ depth)166 if (_param->_have_port_max_depth) 165 167 (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_DEPTH [i])); 166 168 (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_FLAG [i])); … … 169 171 if (_param->_have_port_context_id) 170 172 (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i])); 171 if (_param->_have_port_ depth)173 if (_param->_have_port_max_depth) 172 174 (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_DEPTH [i])); 173 175 (*(out_BRANCH_COMPLETE_TAKE [i])) (*(in_BRANCH_COMPLETE_FLAG [i])); … … 175 177 if (_param->_have_port_context_id) 176 178 (*(out_BRANCH_COMPLETE_ADDRESS_SRC [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i])); 177 if (_param->_have_port_ depth)179 if (_param->_have_port_max_depth) 178 180 (*(out_BRANCH_COMPLETE_ADDRESS_SRC [i])) (*(in_BRANCH_COMPLETE_DEPTH [i])); 179 181 180 182 if (_param->_have_port_context_id) 181 183 (*(out_BRANCH_COMPLETE_ADDRESS_DEST [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i])); 182 if (_param->_have_port_ depth)184 if (_param->_have_port_max_depth) 183 185 (*(out_BRANCH_COMPLETE_ADDRESS_DEST [i])) (*(in_BRANCH_COMPLETE_DEPTH [i])); 184 186 (*(out_BRANCH_COMPLETE_ADDRESS_DEST [i])) (*(in_BRANCH_COMPLETE_ADDRESS [i])); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp
r81 r82 76 76 // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 77 77 { 78 ALLOC1_INTERFACE(" predict", IN,SOUTH, "predict", _param->_nb_inst_predict);78 ALLOC1_INTERFACE("decod", IN,SOUTH, "decod", _param->_nb_inst_predict); 79 79 80 80 ALLOC1_VALACK_IN ( in_DECOD_VAL ,VAL); … … 87 87 ALLOC1_SIGNAL_IN ( in_DECOD_RAS_ADDRESS ,"ras_address" ,Taddress_t ,_param->_size_address); 88 88 ALLOC1_SIGNAL_IN ( in_DECOD_RAS_INDEX ,"ras_index" ,Tptr_t ,_param->_max_size_ras_index); 89 ALLOC1_SIGNAL_IN ( in_DECOD_MISS_PREDICTION ,"miss_prediction" ,Tcontrol_t ,1); 90 ALLOC1_SIGNAL_IN ( in_DECOD_UPDATE_PREDICTION_ID,"update_prediction_id",Tprediction_ptr_t ,_param->_size_depth); 89 ALLOC1_SIGNAL_IN ( in_DECOD_MISS_IFETCH ,"miss_ifetch" ,Tcontrol_t ,1); 90 ALLOC1_SIGNAL_IN ( in_DECOD_MISS_DECOD ,"miss_decod" ,Tcontrol_t ,1); 91 ALLOC1_SIGNAL_IN ( in_DECOD_UPDATE_PREDICTION_ID,"update_prediction_id",Tprediction_ptr_t ,_param->_max_size_depth); 91 92 // ALLOC1_SIGNAL_OUT(out_DECOD_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth); 92 93 } … … 95 96 { 96 97 ALLOC1_INTERFACE("branch_complete", IN,SOUTH, "branch_complete", _param->_nb_inst_branch_complete); 97 98 98 99 99 ALLOC1_VALACK_IN ( in_BRANCH_COMPLETE_VAL ,VAL); 100 100 ALLOC1_VALACK_OUT(out_BRANCH_COMPLETE_ACK ,ACK); 101 101 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_CONTEXT_ID ,"context_id" ,Tcontext_t,_param->_size_context_id); 102 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH ,"depth" ,Tdepth_t ,_param->_ size_depth);102 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH ,"depth" ,Tdepth_t ,_param->_max_size_depth); 103 103 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS ,"address" ,Taddress_t,_param->_size_address); 104 104 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_FLAG ,"flag" ,Tcontrol_t,1); … … 107 107 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_SRC ,"address_src" ,Taddress_t,_param->_size_address); 108 108 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_DEST ,"address_dest" ,Taddress_t,_param->_size_address); 109 } 110 111 // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 112 { 113 ALLOC1_INTERFACE("branch_event", IN,SOUTH, "branch_event", _param->_nb_context); 114 115 ALLOC1_VALACK_OUT(out_BRANCH_EVENT_VAL ,VAL); 116 ALLOC1_VALACK_IN ( in_BRANCH_EVENT_ACK ,ACK); 117 // ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_CONTEXT_ID ,"context_id" ,Tcontext_t,_param->_size_context_id); 118 // ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_DEPTH ,"depth" ,Tdepth_t ,_param->_max_size_depth); 119 // ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1); 120 ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_SRC ,"address_src" ,Taddress_t,_param->_size_address); 121 ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_DEST ,"address_dest" ,Taddress_t,_param->_size_address); 109 122 } 110 123 … … 125 138 ALLOC1_SIGNAL_OUT(out_UPDATE_DIR_HISTORY ,"dir_history" ,Thistory_t ,_param->_size_history); 126 139 ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_VAL ,"ras_val" ,Tcontrol_t ,1); 140 ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_PUSH ,"ras_push" ,Tcontrol_t ,1); 127 141 ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_ADDRESS ,"ras_address" ,Taddress_t ,_param->_size_address); 128 142 ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_INDEX ,"ras_index" ,Tptr_t ,_param->_max_size_ras_index); … … 134 148 ALLOC1_INTERFACE("depth",OUT,SOUTH, "depth", _param->_nb_context); 135 149 136 ALLOC1_SIGNAL_OUT(out_DEPTH_ NB_BRANCH,"NB_BRANCH",Tdepth_t,_param->_size_depth);137 ALLOC1_SIGNAL_OUT(out_DEPTH_ TAIL,"TAIL",Tdepth_t,_param->_size_depth);150 ALLOC1_SIGNAL_OUT(out_DEPTH_TAIL ,"TAIL" ,Tdepth_t,_param->_size_depth[alloc_signal_it1]); 151 ALLOC1_SIGNAL_OUT(out_DEPTH_NB_BRANCH,"NB_BRANCH",Tdepth_t,_param->_size_depth[alloc_signal_it1]+1); 138 152 } 139 153 … … 145 159 internal_BRANCH_COMPLETE_TAKE = new Tcontrol_t [_param->_nb_inst_branch_complete]; 146 160 internal_BRANCH_COMPLETE_ADDRESS_DEST = new Taddress_t [_param->_nb_inst_branch_complete]; 161 internal_BRANCH_EVENT_VAL = new Tcontrol_t [_param->_nb_context]; 162 internal_BRANCH_EVENT_DEPTH = new Tdepth_t [_param->_nb_context]; 147 163 internal_UPDATE_VAL = new Tcontrol_t [_param->_nb_inst_update]; 148 164 internal_UPDATE_CONTEXT_ID = new Tcontext_t [_param->_nb_inst_update]; … … 153 169 reg_BOTTOM = new uint32_t [_param->_nb_context]; 154 170 reg_NB_ELT = new uint32_t [_param->_nb_context]; 171 reg_NB_ELT_UPDATE = new uint32_t [_param->_nb_context]; 155 172 reg_NB_ELT_NEED_UPDATE = new uint32_t [_param->_nb_context]; 156 173 reg_UPDATE_PREDICTION_TABLE = new entry_t * [_param->_nb_context]; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp
r81 r82 56 56 delete [] in_DECOD_RAS_ADDRESS ; 57 57 delete [] in_DECOD_RAS_INDEX ; 58 delete [] in_DECOD_MISS_PREDICTION ; 59 if (_param->_have_port_depth) 58 delete [] in_DECOD_MISS_IFETCH ; 59 delete [] in_DECOD_MISS_DECOD ; 60 if (_param->_have_port_max_depth) 60 61 delete [] in_DECOD_UPDATE_PREDICTION_ID ; 61 62 // if (_param->_have_port_depth) … … 67 68 if (_param->_have_port_context_id) 68 69 delete [] in_BRANCH_COMPLETE_CONTEXT_ID ; 69 if (_param->_have_port_ depth)70 if (_param->_have_port_max_depth) 70 71 delete [] in_BRANCH_COMPLETE_DEPTH ; 71 72 delete [] in_BRANCH_COMPLETE_ADDRESS ; … … 75 76 delete [] out_BRANCH_COMPLETE_ADDRESS_SRC ; 76 77 delete [] out_BRANCH_COMPLETE_ADDRESS_DEST ; 78 79 // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 80 delete [] out_BRANCH_EVENT_VAL ; 81 delete [] in_BRANCH_EVENT_ACK ; 82 // if (_param->_have_port_context_id) 83 // delete [] in_BRANCH_EVENT_CONTEXT_ID ; 84 // if (_param->_have_port_max_depth) 85 // delete [] in_BRANCH_EVENT_DEPTH ; 86 // delete [] out_BRANCH_EVENT_MISS_PREDICTION; 87 delete [] out_BRANCH_EVENT_ADDRESS_SRC ; 88 delete [] out_BRANCH_EVENT_ADDRESS_DEST ; 77 89 78 90 // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 91 103 delete [] out_UPDATE_DIR_HISTORY ; 92 104 delete [] out_UPDATE_RAS_VAL ; 105 delete [] out_UPDATE_RAS_PUSH ; 93 106 delete [] out_UPDATE_RAS_ADDRESS ; 94 107 delete [] out_UPDATE_RAS_INDEX ; … … 96 109 97 110 // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 98 if (_param->_have_port_ depth)111 if (_param->_have_port_max_depth) 99 112 { 100 113 delete [] out_DEPTH_NB_BRANCH; … … 110 123 delete [] internal_BRANCH_COMPLETE_TAKE ; 111 124 delete [] internal_BRANCH_COMPLETE_ADDRESS_DEST ; 125 delete [] internal_BRANCH_EVENT_VAL ; 126 delete [] internal_BRANCH_EVENT_DEPTH ; 112 127 delete [] internal_UPDATE_VAL ; 113 128 delete [] internal_UPDATE_CONTEXT_ID ; … … 118 133 delete [] reg_BOTTOM; 119 134 delete [] reg_NB_ELT; 135 delete [] reg_NB_ELT_UPDATE; 120 136 delete [] reg_NB_ELT_NEED_UPDATE; 121 137 for (uint32_t i=0; i<_param->_nb_context; i++) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_branch_complete.cpp
r81 r82 27 27 { 28 28 Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0; 29 Tdepth_t depth = (_param->_have_port_ depth)?PORT_READ(in_BRANCH_COMPLETE_DEPTH [i]):0;29 Tdepth_t depth = (_param->_have_port_max_depth )?PORT_READ(in_BRANCH_COMPLETE_DEPTH [i]):0; 30 30 Tcontrol_t miss = false; 31 31 Tcontrol_t take = reg_UPDATE_PREDICTION_TABLE [context][depth]._last_take ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_decod.cpp
r81 r82 26 26 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 27 27 { 28 Tcontrol_t miss = PORT_READ(in_DECOD_MISS_ PREDICTION[i]);28 Tcontrol_t miss = PORT_READ(in_DECOD_MISS_DECOD [i]); 29 29 30 30 if (miss) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp
r81 r82 28 28 // =================================================================== 29 29 30 if (_param->_have_port_depth) 31 for (uint32_t i=0; i<_param->_nb_context; i++) 32 { 33 PORT_WRITE(out_DEPTH_NB_BRANCH [i], reg_NB_ELT [i]); 34 PORT_WRITE(out_DEPTH_TAIL [i], reg_BOTTOM [i]); 35 } 36 30 for (uint32_t i=0; i<_param->_nb_context; i++) 31 { 32 if (_param->_have_port_depth [i]) 33 { 34 PORT_WRITE(out_DEPTH_TAIL [i], reg_BOTTOM [i]); 35 } 36 PORT_WRITE(out_DEPTH_NB_BRANCH [i], reg_NB_ELT [i]); 37 } 37 38 // =================================================================== 38 39 // =====[ UPDATE ]==================================================== … … 72 73 (cond == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK) or 73 74 (cond == BRANCH_CONDITION_READ_STACK)); 74 75 76 Tcontrol_t push = ((cond == BRANCH_CONDITION_NONE_WITH_WRITE_STACK) or 77 (cond == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK)); 78 75 79 if (_param->_have_port_context_id) 76 80 PORT_WRITE(out_UPDATE_CONTEXT_ID [i],context); … … 85 89 PORT_WRITE(out_UPDATE_DIR_HISTORY [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._history ); 86 90 PORT_WRITE(out_UPDATE_RAS_VAL [i],ras_val); 91 PORT_WRITE(out_UPDATE_RAS_PUSH [i],push); 87 92 PORT_WRITE(out_UPDATE_RAS_ADDRESS [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._address_ras ); 88 93 PORT_WRITE(out_UPDATE_RAS_INDEX [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._index_ras ); … … 99 104 } 100 105 106 // =================================================================== 107 // =====[ BRANCH_EVENT ]============================================== 108 // =================================================================== 109 for (uint32_t i=0; i<_param->_nb_context; i++) 110 { 111 Tdepth_t depth = (reg_BOTTOM [i] + reg_NB_ELT_UPDATE [i])%_param->_size_queue [i]; 112 state_t state = reg_UPDATE_PREDICTION_TABLE [i][depth]._state; 113 114 Tcontrol_t val = (state == UPDATE_PREDICTION_STATE_EVENT); 115 116 if (val) 117 { 118 PORT_WRITE(out_BRANCH_EVENT_ADDRESS_SRC [i], reg_UPDATE_PREDICTION_TABLE [i][depth]._address_src ); 119 PORT_WRITE(out_BRANCH_EVENT_ADDRESS_DEST [i], reg_UPDATE_PREDICTION_TABLE [i][depth]._address_dest); 120 internal_BRANCH_EVENT_DEPTH [i] = depth; 121 } 122 123 internal_BRANCH_EVENT_VAL [i] = val; 124 PORT_WRITE(out_BRANCH_EVENT_VAL [i], internal_BRANCH_EVENT_VAL [i]); 125 } 101 126 log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End"); 102 127 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
r81 r82 31 31 reg_BOTTOM [i] = 0; 32 32 reg_NB_ELT [i] = 0; 33 reg_NB_ELT_UPDATE [i] = 0; 33 34 reg_NB_ELT_NEED_UPDATE [i] = 0; 34 35 for (uint32_t j=0; j<_param->_size_queue[i]; j++) … … 74 75 if (PORT_READ(in_DECOD_VAL[i]) and internal_DECOD_ACK [i]) 75 76 { 76 Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_DECOD_CONTEXT_ID [i]):0; 77 Tcontrol_t miss = PORT_READ(in_DECOD_MISS_PREDICTION [i]); 77 Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_DECOD_CONTEXT_ID [i]):0; 78 Tcontrol_t miss_ifetch = PORT_READ(in_DECOD_MISS_IFETCH [i]); 79 Tcontrol_t miss_decod = PORT_READ(in_DECOD_MISS_DECOD [i]); 78 80 79 81 log_printf(TRACE,Update_Prediction_Table,FUNCTION,"DECOD[%d] - Accepted",i); 80 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * context : %d",context); 81 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * miss : %d",miss); 82 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * nb_elt : %d",reg_NB_ELT[context]); 82 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * context : %d",context); 83 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * miss_ifetch : %d",miss_ifetch); 84 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * miss_decod : %d",miss_decod); 85 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * nb_elt : %d",reg_NB_ELT[context]); 83 86 84 87 // Test if miss ifetch 85 88 // miss ifetch = decod a branch and the predict unit have not predict this branch ... gloup :P 86 if (miss )89 if (miss_ifetch or miss_decod) 87 90 { 88 Tdepth_t depth = (_param->_have_port_ depth)?PORT_READ(in_DECOD_UPDATE_PREDICTION_ID [i]):0;91 Tdepth_t depth = (_param->_have_port_max_depth)?PORT_READ(in_DECOD_UPDATE_PREDICTION_ID [i]):0; 89 92 Tdepth_t top = reg_TOP [context]; 90 93 … … 127 130 } 128 131 } 132 reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_EVENT; // rewrite 129 133 130 134 reg_TOP [context] = (depth+1)%_param->_size_queue [context]; … … 135 139 { 136 140 // Normal case : branch is previous predicated, change state of branch 137 Tdepth_t depth = (_param->_have_port_ depth)?PORT_READ(in_DECOD_UPDATE_PREDICTION_ID [i]):0;141 Tdepth_t depth = (_param->_have_port_max_depth)?PORT_READ(in_DECOD_UPDATE_PREDICTION_ID [i]):0; 138 142 139 143 reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_WAITEND; … … 148 152 { 149 153 Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0; 150 Tdepth_t depth = (_param->_have_port_ depth )?PORT_READ(in_BRANCH_COMPLETE_DEPTH [i]):0;154 Tdepth_t depth = (_param->_have_port_max_depth )?PORT_READ(in_BRANCH_COMPLETE_DEPTH [i]):0; 151 155 152 156 log_printf(TRACE,Update_Prediction_Table,FUNCTION,"BRANCH_COMPLETE[%d] - Accepted",i); … … 158 162 { 159 163 // Miss case 160 reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_ KO;164 reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_EVENT; 161 165 162 166 // Another prediction (prediction with depth higer) … … 231 235 232 236 // =================================================================== 237 // =====[ BRANCH_EVENT ]============================================== 238 // =================================================================== 239 for (uint32_t i=0; i<_param->_nb_context; i++) 240 if (internal_BRANCH_EVENT_VAL [i] and PORT_READ(in_BRANCH_EVENT_ACK [i])) 241 { 242 Tdepth_t depth = internal_BRANCH_EVENT_DEPTH [i]; 243 244 reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_KO; 245 } 246 247 // =================================================================== 233 248 // =====[ GARBAGE COLLECTOR ]========================================= 234 249 // =================================================================== … … 253 268 } 254 269 255 //#if (DEBUG >= DEBUG_TRACE)270 #if (DEBUG >= DEBUG_TRACE) 256 271 log_printf(TRACE,Update_Prediction_Table,FUNCTION,"Dump Update_Prediction_Table"); 257 272 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UPDATE_PRIORITY : %d",reg_UPDATE_PRIORITY); 258 273 for (uint32_t i=0; i<_param->_nb_context; i++) 259 274 { 260 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * Update_Prediction_Table [%d]",i);275 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * Update_Prediction_Table [%d]",i); 261 276 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_TOP : %d",reg_TOP [i]); 262 277 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_BOTTOM : %d",reg_BOTTOM [i]); … … 266 281 log_printf(TRACE,Update_Prediction_Table,FUNCTION," [%d] %s %x",j,toString(reg_UPDATE_PREDICTION_TABLE [i][j]._state).c_str(),reg_UPDATE_PREDICTION_TABLE [i][j]._address_src); 267 282 } 268 //#endif283 #endif 269 284 270 285 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Parameters.h
r81 r82 11 11 #include "Common/include/Debug.h" 12 12 #include "Behavioural/include/Parameters.h" 13 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/include/Parameters.h" 14 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Parameters.h" 15 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Parameters.h" 16 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Parameters.h" 17 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Parameters.h" 13 18 14 19 namespace morpheo { … … 23 28 { 24 29 //-----[ fields ]------------------------------------------------------------ 30 public : uint32_t _nb_context ; 31 public : uint32_t _nb_decod_unit ; 32 public : uint32_t _size_address ; 33 public : uint32_t * _nb_instruction ;//[nb_context] 34 public : uint32_t * _nb_inst_decod ;//[nb_decod_unit] 35 public : uint32_t _nb_inst_branch_predict ; 36 public : uint32_t _nb_inst_branch_decod ; 37 public : uint32_t _nb_inst_branch_update ; 38 public : uint32_t _nb_inst_branch_complete ; 39 public : uint32_t _btb_size_queue ; 40 public : uint32_t _btb_associativity ; 41 public : uint32_t _btb_size_counter ; 42 public : Tvictim_t _btb_victim_scheme ; 43 public : Tpredictor_t _dir_predictor_scheme ; 44 public : bool _dir_have_bht [3]; 45 public : uint32_t _dir_bht_size_shifter [3]; 46 public : uint32_t _dir_bht_nb_shifter [3]; 47 public : bool _dir_have_pht [3]; 48 public : uint32_t _dir_pht_size_counter [3]; 49 public : uint32_t _dir_pht_nb_counter [3]; 50 public : uint32_t _dir_pht_size_address_share [3]; 51 public : uint32_t * _ras_size_queue ;//[nb_context] 52 public : uint32_t * _upt_size_queue ;//[nb_context] 53 54 public : uint32_t _size_context_id ; 55 public : uint32_t * _size_depth ;//[nb_context] 56 public : uint32_t _max_size_depth ; 57 public : uint32_t * _size_inst_ifetch_ptr ;//[nb_context] 58 public : uint32_t _size_history ; 59 public : uint32_t * _size_ras_index ;//[nb_context] 60 61 public : bool _have_port_context_id ; 62 public : bool _have_port_max_depth ; 63 public : bool * _have_port_depth ;//[nb_context] 64 public : bool * _have_port_inst_ifetch_ptr ;//[nb_context] 65 public : bool _have_port_history ; 66 public : bool * _have_port_ras_index ;//[nb_context] 67 68 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer ::Parameters * _param_btb; 69 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction ::Parameters * _param_dir; 70 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::return_address_stack ::Parameters * _param_ras; 71 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::Parameters * _param_upt; 72 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue ::Parameters * _param_glue; 25 73 26 74 //-----[ methods ]----------------------------------------------------------- 27 public : Parameters (); 75 public : Parameters (uint32_t nb_context , 76 uint32_t nb_decod_unit , 77 uint32_t size_address , 78 uint32_t * nb_instruction ,//[nb_context] 79 uint32_t * nb_inst_decod ,//[nb_decod_unit] 80 uint32_t nb_inst_branch_predict , 81 uint32_t nb_inst_branch_decod , 82 uint32_t nb_inst_branch_update , 83 uint32_t nb_inst_branch_complete , 84 uint32_t btb_size_queue , 85 uint32_t btb_associativity , 86 uint32_t btb_size_counter , 87 Tvictim_t btb_victim_scheme , 88 Tpredictor_t dir_predictor_scheme , 89 bool dir_have_bht [3], 90 uint32_t dir_bht_size_shifter [3], 91 uint32_t dir_bht_nb_shifter [3], 92 bool dir_have_pht [3], 93 uint32_t dir_pht_size_counter [3], 94 uint32_t dir_pht_nb_counter [3], 95 uint32_t dir_pht_size_address_share [3], 96 uint32_t * ras_size_queue ,//[nb_context] 97 uint32_t * upt_size_queue //[nb_context] 98 ); 28 99 // public : Parameters (Parameters & param) ; 29 100 public : ~Parameters () ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Prediction_unit.h
r81 r82 27 27 #endif 28 28 #include "Behavioural/include/Usage.h" 29 30 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/include/Branch_Target_Buffer.h" 31 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Direction.h" 32 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Return_Address_Stack.h" 33 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h" 34 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Prediction_unit_Glue.h" 29 35 30 36 namespace morpheo { … … 61 67 public : SC_IN (Tcontrol_t) * in_NRESET ; 62 68 69 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 70 public : SC_IN (Tcontrol_t ) ** in_PREDICT_VAL ; //[nb_context] 71 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_ACK ; //[nb_context] 72 public : SC_IN (Taddress_t ) ** in_PREDICT_PC_PREVIOUS ; //[nb_context] 73 public : SC_IN (Taddress_t ) ** in_PREDICT_PC_CURRENT ; //[nb_context] 74 public : SC_IN (Tcontrol_t ) ** in_PREDICT_PC_CURRENT_IS_DS_TAKE ; //[nb_context] 75 public : SC_OUT(Taddress_t ) ** out_PREDICT_PC_NEXT ; //[nb_context] 76 public : SC_OUT(Tcontrol_t ) ** out_PREDICT_PC_NEXT_IS_DS_TAKE ; //[nb_context] 77 public : SC_OUT(Tcontrol_t ) *** out_PREDICT_INSTRUCTION_ENABLE ; //[nb_context][nb_instruction] 78 public : SC_OUT(Tinst_ifetch_ptr_t ) ** out_PREDICT_INST_IFETCH_PTR ; //[nb_context] 79 public : SC_OUT(Tbranch_state_t ) ** out_PREDICT_BRANCH_STATE ; //[nb_context] 80 public : SC_OUT(Tprediction_ptr_t ) ** out_PREDICT_BRANCH_UPDATE_PREDICTION_ID ; //[nb_context] 81 82 // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 83 public : SC_IN (Tcontrol_t ) *** in_DECOD_VAL ; //[nb_decod_unit][nb_inst_decod] 84 public : SC_OUT(Tcontrol_t ) *** out_DECOD_ACK ; //[nb_decod_unit][nb_inst_decod] 85 public : SC_IN (Tcontext_t ) *** in_DECOD_CONTEXT_ID ; //[nb_decod_unit][nb_inst_decod] 86 public : SC_IN (Tcontrol_t ) *** in_DECOD_MATCH_INST_IFETCH_PTR ; //[nb_decod_unit][nb_inst_decod] 87 public : SC_IN (Tbranch_state_t ) *** in_DECOD_BRANCH_STATE ; //[nb_decod_unit][nb_inst_decod] 88 public : SC_IN (Tprediction_ptr_t ) *** in_DECOD_BRANCH_UPDATE_PREDICTION_ID ; //[nb_decod_unit][nb_inst_decod] 89 public : SC_IN (Tbranch_condition_t) *** in_DECOD_BRANCH_CONDITION ; //[nb_decod_unit][nb_inst_decod] 90 public : SC_IN (Tcontrol_t ) *** in_DECOD_BRANCH_DIRECTION ; //[nb_decod_unit][nb_inst_decod] 91 public : SC_IN (Taddress_t ) *** in_DECOD_ADDRESS_SRC ; //[nb_decod_unit][nb_inst_decod] 92 public : SC_IN (Taddress_t ) *** in_DECOD_ADDRESS_DEST ; //[nb_decod_unit][nb_inst_decod] 93 94 // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 95 public : SC_IN (Tcontrol_t ) ** in_BRANCH_COMPLETE_VAL ; //[nb_inst_branch_complete] 96 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_ACK ; //[nb_inst_branch_complete] 97 public : SC_IN (Tcontext_t ) ** in_BRANCH_COMPLETE_CONTEXT_ID ; //[nb_inst_branch_complete] 98 public : SC_IN (Tdepth_t ) ** in_BRANCH_COMPLETE_DEPTH ; //[nb_inst_branch_complete] 99 public : SC_IN (Taddress_t ) ** in_BRANCH_COMPLETE_ADDRESS ; //[nb_inst_branch_complete] 100 public : SC_IN (Tcontrol_t ) ** in_BRANCH_COMPLETE_FLAG ; //[nb_inst_branch_complete] 101 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_MISS_PREDICTION ; //[nb_inst_branch_complete] 102 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_COMPLETE_TAKE ; //[nb_inst_branch_complete] 103 public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_SRC ; //[nb_inst_branch_complete] 104 public : SC_OUT(Taddress_t ) ** out_BRANCH_COMPLETE_ADDRESS_DEST ; //[nb_inst_branch_complete] 105 106 // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 107 public : SC_OUT(Tcontrol_t ) ** out_BRANCH_EVENT_VAL ; //[nb_context] 108 public : SC_IN (Tcontrol_t ) ** in_BRANCH_EVENT_ACK ; //[nb_context] 109 //public : SC_OUT(Tcontext_t ) ** out_BRANCH_EVENT_CONTEXT_ID ; //[nb_context] 110 //public : SC_OUT(Tdepth_t ) ** out_BRANCH_EVENT_DEPTH ; //[nb_context] 111 //public : SC_OUT(Tcontrol_t ) ** out_BRANCH_EVENT_MISS_PREDICTION ; //[nb_context] 112 public : SC_OUT(Taddress_t ) ** out_BRANCH_EVENT_ADDRESS_SRC ; //[nb_context] 113 public : SC_OUT(Taddress_t ) ** out_BRANCH_EVENT_ADDRESS_DEST ; //[nb_context] 114 115 // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 public : SC_OUT(Tdepth_t ) ** out_DEPTH_NB_BRANCH ; //[nb_context] 117 public : SC_OUT(Tdepth_t ) ** out_DEPTH_TAIL ; //[nb_context] 118 63 119 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 120 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer ::Branch_Target_Buffer * _component_btb; 121 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction ::Direction * _component_dir; 122 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::return_address_stack ::Return_Address_Stack * _component_ras; 123 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::Update_Prediction_Table * _component_upt; 124 public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue ::Prediction_unit_Glue * _component_glue; 64 125 65 126 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 84 145 #endif 85 146 Parameters * param, 86 morpheo::behavioural::Tusage_t usage =USE_ALL147 morpheo::behavioural::Tusage_t usage 87 148 ); 88 149 public : ~Prediction_unit (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters.cpp
r81 r82 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Parameters.h" 9 #include "Common/include/Max.h" 9 10 10 11 namespace morpheo { … … 18 19 #undef FUNCTION 19 20 #define FUNCTION "Prediction_unit::Parameters" 20 Parameters::Parameters () 21 Parameters::Parameters (uint32_t nb_context , 22 uint32_t nb_decod_unit , 23 uint32_t size_address , 24 uint32_t * nb_instruction ,//[nb_context] 25 uint32_t * nb_inst_decod ,//[nb_decod_unit] 26 uint32_t nb_inst_branch_predict , 27 uint32_t nb_inst_branch_decod , 28 uint32_t nb_inst_branch_update , 29 uint32_t nb_inst_branch_complete , 30 uint32_t btb_size_queue , 31 uint32_t btb_associativity , 32 uint32_t btb_size_counter , 33 Tvictim_t btb_victim_scheme , 34 Tpredictor_t dir_predictor_scheme , 35 bool dir_have_bht [3], 36 uint32_t dir_bht_size_shifter [3], 37 uint32_t dir_bht_nb_shifter [3], 38 bool dir_have_pht [3], 39 uint32_t dir_pht_size_counter [3], 40 uint32_t dir_pht_nb_counter [3], 41 uint32_t dir_pht_size_address_share [3], 42 uint32_t * ras_size_queue ,//[nb_context] 43 uint32_t * upt_size_queue //[nb_context] 44 ) 21 45 { 22 46 log_printf(FUNC,Prediction_unit,FUNCTION,"Begin"); 47 48 _nb_context = nb_context ; 49 _nb_decod_unit = nb_decod_unit ; 50 _size_address = size_address ; 51 _nb_instruction = nb_instruction ; 52 _nb_inst_decod = nb_inst_decod ; 53 _nb_inst_branch_predict = nb_inst_branch_predict ; 54 _nb_inst_branch_decod = nb_inst_branch_decod ; 55 _nb_inst_branch_update = nb_inst_branch_update ; 56 _nb_inst_branch_complete = nb_inst_branch_complete ; 57 _btb_size_queue = btb_size_queue ; 58 _btb_associativity = btb_associativity ; 59 _btb_size_counter = btb_size_counter ; 60 _btb_victim_scheme = btb_victim_scheme ; 61 _dir_predictor_scheme = dir_predictor_scheme ; 62 for (uint32_t i=0; i<3; i++) 63 { 64 _dir_have_bht [i] = dir_have_bht [i]; 65 _dir_bht_size_shifter [i] = dir_bht_size_shifter [i]; 66 _dir_bht_nb_shifter [i] = dir_bht_nb_shifter [i]; 67 _dir_have_pht [i] = dir_have_pht [i]; 68 _dir_pht_size_counter [i] = dir_pht_size_counter [i]; 69 _dir_pht_nb_counter [i] = dir_pht_nb_counter [i]; 70 _dir_pht_size_address_share [i] = dir_pht_size_address_share [i]; 71 } 72 _ras_size_queue = ras_size_queue ; 73 _upt_size_queue = upt_size_queue ; 74 75 _size_context_id = log2(_nb_context); 76 // public : uint32_t * _size_inst_ifetch_ptr ;//[nb_context] 77 78 _size_depth = new uint32_t [_nb_context]; 79 _size_ras_index = new uint32_t [_nb_context]; 80 for (uint32_t i=0; i<_nb_context; i++) 81 { 82 _size_depth [i] = log2(_upt_size_queue [i]); 83 _size_ras_index [i] = log2(_ras_size_queue [i]); 84 } 85 86 _max_size_depth = max<uint32_t>(_size_depth,_nb_context); 87 _have_port_context_id = (_size_context_id > 0); 88 _have_port_max_depth = (_max_size_depth > 0); 89 // public : bool * _have_port_inst_ifetch_ptr ;//[nb_context] 90 91 _param_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue ::Parameters 92 (_nb_context , 93 _nb_decod_unit , 94 _size_address , 95 _nb_instruction , 96 _size_depth , 97 _nb_inst_decod , 98 _nb_inst_branch_predict, 99 _nb_inst_branch_decod , 100 _nb_inst_branch_update ); 101 102 _size_inst_ifetch_ptr = _param_glue->_size_inst_ifetch_ptr ; 103 _have_port_depth = _param_glue->_have_port_depth; 104 _have_port_inst_ifetch_ptr = _param_glue->_have_port_inst_ifetch_ptr; 105 _have_port_history = (_size_history > 0); 106 107 _param_btb = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer ::Parameters 108 (_nb_context , 109 _nb_instruction , 110 _btb_size_queue , 111 _btb_associativity , 112 _size_address , 113 _btb_size_counter , 114 _nb_inst_branch_predict, 115 _nb_inst_branch_decod , 116 _nb_inst_branch_update , 117 _btb_victim_scheme ); 118 119 _param_dir = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction ::Parameters 120 (_dir_predictor_scheme , 121 _nb_inst_branch_predict , 122 _nb_inst_branch_update , 123 _size_address , 124 _dir_have_bht , 125 _dir_bht_size_shifter , 126 _dir_bht_nb_shifter , 127 _dir_have_pht , 128 _dir_pht_size_counter , 129 _dir_pht_nb_counter , 130 _dir_pht_size_address_share); 131 132 _size_history = _param_dir->_size_history; 133 134 _param_ras = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::return_address_stack ::Parameters 135 (_nb_context , 136 _ras_size_queue , 137 _size_address , 138 _nb_inst_branch_predict, 139 _nb_inst_branch_decod , 140 _nb_inst_branch_update ); 141 142 _param_upt = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::Parameters 143 (_nb_context , 144 _upt_size_queue , 145 _size_address , 146 _nb_inst_branch_predict , 147 _nb_inst_branch_decod , 148 _nb_inst_branch_complete, 149 _nb_inst_branch_update , 150 _size_history , 151 _size_ras_index ); 152 23 153 test(); 24 154 log_printf(FUNC,Prediction_unit,FUNCTION,"End"); … … 39 169 { 40 170 log_printf(FUNC,Prediction_unit,FUNCTION,"Begin"); 171 172 delete _param_btb; 173 delete _param_dir; 174 delete _param_ras; 175 delete _param_upt; 176 delete _param_glue; 177 178 delete [] _size_depth ; 179 delete [] _size_ras_index; 180 41 181 log_printf(FUNC,Prediction_unit,FUNCTION,"End"); 42 182 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters_print.cpp
r81 r82 26 26 27 27 xml.balise_open("prediction_unit"); 28 // xml.singleton_begin(""); xml.attribut("value",toString(_)); xml.singleton_end(); 28 xml.singleton_begin("nb_context "); xml.attribut("value",toString(_nb_context )); xml.singleton_end(); 29 xml.singleton_begin("nb_decod_unit "); xml.attribut("value",toString(_nb_decod_unit )); xml.singleton_end(); 30 xml.singleton_begin("size_address "); xml.attribut("value",toString(_size_address )); xml.singleton_end(); 31 xml.singleton_begin("nb_inst_branch_predict "); xml.attribut("value",toString(_nb_inst_branch_predict )); xml.singleton_end(); 32 xml.singleton_begin("nb_inst_branch_decod "); xml.attribut("value",toString(_nb_inst_branch_decod )); xml.singleton_end(); 33 xml.singleton_begin("nb_inst_branch_update "); xml.attribut("value",toString(_nb_inst_branch_update )); xml.singleton_end(); 34 xml.singleton_begin("nb_inst_branch_complete "); xml.attribut("value",toString(_nb_inst_branch_complete )); xml.singleton_end(); 35 xml.singleton_begin("btb_size_queue "); xml.attribut("value",toString(_btb_size_queue )); xml.singleton_end(); 36 xml.singleton_begin("btb_associativity "); xml.attribut("value",toString(_btb_associativity )); xml.singleton_end(); 37 xml.singleton_begin("btb_size_counter "); xml.attribut("value",toString(_btb_size_counter )); xml.singleton_end(); 38 xml.singleton_begin("btb_victim_scheme "); xml.attribut("value",toString(_btb_victim_scheme )); xml.singleton_end(); 39 xml.singleton_begin("dir_predictor_scheme "); xml.attribut("value",toString(_dir_predictor_scheme )); xml.singleton_end(); 40 xml.comment("predictor_scheme : "); 41 xml.comment(" * predictor_never_take : don't use \"predictor_{0,1,2}\" parameters."); 42 xml.comment(" * predictor_always_take : don't use \"predictor_{0,1,2}\" parameters."); 43 xml.comment(" * predictor_static : don't use \"predictor_{0,1,2}\" parameters."); 44 xml.comment(" * predictor_last_take : don't use \"predictor_{0,1,2}\" parameters."); 45 xml.comment(" * predictor_counter : use \"predictor_0\" parameters."); 46 xml.comment(" * predictor_local : use \"predictor_0\" parameters."); 47 xml.comment(" * predictor_global : use \"predictor_0\" parameters."); 48 xml.comment(" * predictor_meta : use \"predictor_{0,1,2}\" parameters."); 49 xml.comment(" * predictor_custom : use \"predictor_{0,1,2}\" parameters."); 50 for (uint32_t i=0; i<3; i++) 51 { 52 xml.singleton_begin("dir_predictor_"+toString(i)+"_have_bht "); xml.attribut("value",toString(_dir_have_bht [i])); xml.singleton_end(); 53 xml.singleton_begin("dir_predictor_"+toString(i)+"_bht_size_shifter "); xml.attribut("value",toString(_dir_bht_size_shifter [i])); xml.singleton_end(); 54 xml.singleton_begin("dir_predictor_"+toString(i)+"_bht_nb_shifter "); xml.attribut("value",toString(_dir_bht_nb_shifter [i])); xml.singleton_end(); 55 xml.singleton_begin("dir_predictor_"+toString(i)+"_have_pht "); xml.attribut("value",toString(_dir_have_pht [i])); xml.singleton_end(); 56 xml.singleton_begin("dir_predictor_"+toString(i)+"_pht_size_counter "); xml.attribut("value",toString(_dir_pht_size_counter [i])); xml.singleton_end(); 57 xml.singleton_begin("dir_predictor_"+toString(i)+"_pht_nb_counter "); xml.attribut("value",toString(_dir_pht_nb_counter [i])); xml.singleton_end(); 58 xml.singleton_begin("dir_predictor_"+toString(i)+"_pht_size_address_share"); xml.attribut("value",toString(_dir_pht_size_address_share [i])); xml.singleton_end(); 59 } 60 61 for (uint32_t i=0;i<_nb_context; i++) 62 { 63 xml. balise_open_begin("component"); 64 xml. attribut("type","context"); 65 xml. attribut("id" ,toString(i)); 66 xml. balise_open_end(); 67 xml. singleton_begin("nb_instruction "); xml.attribut("value",toString(_nb_instruction [i])); xml.singleton_end(); 68 xml. singleton_begin("ras_size_queue "); xml.attribut("value",toString(_ras_size_queue [i])); xml.singleton_end(); 69 xml. singleton_begin("upt_size_queue "); xml.attribut("value",toString(_upt_size_queue [i])); xml.singleton_end(); 70 xml. balise_close(); 71 } 72 73 for (uint32_t i=0;i<_nb_decod_unit; i++) 74 { 75 xml. balise_open_begin("component"); 76 xml. attribut("type","decod_unit"); 77 xml. attribut("id" ,toString(i)); 78 xml. balise_open_end(); 79 xml. singleton_begin("nb_inst_decod "); xml.attribut("value",toString(_nb_inst_decod [i])); xml.singleton_end(); 80 xml. balise_close(); 81 } 82 83 29 84 xml.balise_close(); 30 85 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_allocation.cpp
r81 r82 15 15 namespace front_end { 16 16 namespace prediction_unit { 17 18 19 17 20 18 #undef FUNCTION … … 54 52 in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); 55 53 } 54 55 // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 56 { 57 { 58 ALLOC1_INTERFACE("predict",IN,SOUTH,"Interface with ifetch unit",_param->_nb_context); 59 60 ALLOC1_VALACK_IN ( in_PREDICT_VAL ,VAL); 61 ALLOC1_VALACK_OUT(out_PREDICT_ACK ,ACK); 62 ALLOC1_SIGNAL_IN ( in_PREDICT_PC_PREVIOUS ,"pc_previous" ,Taddress_t ,_param->_size_address); 63 ALLOC1_SIGNAL_IN ( in_PREDICT_PC_CURRENT ,"pc_current" ,Taddress_t ,_param->_size_address); 64 ALLOC1_SIGNAL_IN ( in_PREDICT_PC_CURRENT_IS_DS_TAKE ,"pc_current_is_ds_take" ,Tcontrol_t ,1); 65 ALLOC1_SIGNAL_OUT(out_PREDICT_PC_NEXT ,"pc_next" ,Taddress_t ,_param->_size_address); 66 ALLOC1_SIGNAL_OUT(out_PREDICT_PC_NEXT_IS_DS_TAKE ,"pc_next_is_ds_take" ,Tcontrol_t ,1); 67 ALLOC1_SIGNAL_OUT(out_PREDICT_INST_IFETCH_PTR ,"inst_ifetch_ptr" ,Tinst_ifetch_ptr_t ,_param->_size_inst_ifetch_ptr [alloc_signal_it1]); 68 ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_STATE ,"branch_state" ,Tbranch_state_t ,_param->_size_branch_state); 69 ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_depth [alloc_signal_it1]); 70 } 71 { 72 ALLOC2_INTERFACE("predict",IN,SOUTH,"Interface with ifetch unit",_param->_nb_context,_param->_nb_instruction[alloc_interface_it1]); 73 _ALLOC2_SIGNAL_OUT(out_PREDICT_INSTRUCTION_ENABLE ,"instruction_enable" ,Tcontrol_t ,1,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]); 74 } 75 } 76 77 // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 78 { 79 { 80 ALLOC2_INTERFACE("decod",IN,SOUTH,"Interface with decod unit",_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_interface_it1]); 81 82 _ALLOC2_VALACK_IN ( in_DECOD_VAL ,VAL,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 83 _ALLOC2_VALACK_OUT(out_DECOD_ACK ,ACK,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 84 _ALLOC2_SIGNAL_IN ( in_DECOD_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 85 _ALLOC2_SIGNAL_IN ( in_DECOD_MATCH_INST_IFETCH_PTR ,"match_inst_ifetch_ptr" ,Tcontrol_t ,1 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 86 _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_STATE ,"branch_state" ,Tbranch_state_t ,_param->_size_branch_state ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 87 _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_max_size_depth ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 88 _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_CONDITION ,"branch_condition" ,Tbranch_condition_t,_param->_size_branch_condition,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 89 _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_DIRECTION ,"branch_direction" ,Tcontrol_t ,1 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 90 _ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_SRC ,"address_src" ,Taddress_t ,_param->_size_address ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 91 _ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_DEST ,"address_dest" ,Taddress_t ,_param->_size_address ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]); 92 } 93 } 94 95 // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 96 { 97 ALLOC1_INTERFACE("branch_complete", IN,SOUTH, "branch_complete", _param->_nb_inst_branch_complete); 98 99 ALLOC1_VALACK_IN ( in_BRANCH_COMPLETE_VAL ,VAL); 100 ALLOC1_VALACK_OUT(out_BRANCH_COMPLETE_ACK ,ACK); 101 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_CONTEXT_ID ,"context_id" ,Tcontext_t,_param->_size_context_id); 102 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH ,"depth" ,Tdepth_t ,_param->_max_size_depth); 103 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS ,"address" ,Taddress_t,_param->_size_address); 104 ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_FLAG ,"flag" ,Tcontrol_t,1); 105 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1); 106 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_TAKE ,"take" ,Tcontrol_t,1); 107 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_SRC ,"address_src" ,Taddress_t,_param->_size_address); 108 ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_DEST ,"address_dest" ,Taddress_t,_param->_size_address); 109 } 110 111 // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 112 { 113 ALLOC1_INTERFACE("branch_event", IN,SOUTH, "branch_event", _param->_nb_context); 114 115 ALLOC1_VALACK_OUT(out_BRANCH_EVENT_VAL ,VAL); 116 ALLOC1_VALACK_IN ( in_BRANCH_EVENT_ACK ,ACK); 117 // ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_CONTEXT_ID ,"context_id" ,Tcontext_t,_param->_size_context_id); 118 // ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_DEPTH ,"depth" ,Tdepth_t ,_param->_max_size_depth); 119 // ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1); 120 ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_SRC ,"address_src" ,Taddress_t,_param->_size_address); 121 ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_DEST ,"address_dest" ,Taddress_t,_param->_size_address); 122 } 123 124 // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 125 { 126 ALLOC1_INTERFACE("depth",OUT,SOUTH,"Interface with depth",_param->_nb_context); 127 128 ALLOC1_SIGNAL_OUT(out_DEPTH_NB_BRANCH ,"nb_branch" ,Tdepth_t,_param->_size_depth[alloc_signal_it1]+1); 129 ALLOC1_SIGNAL_OUT(out_DEPTH_TAIL ,"tail" ,Tdepth_t,_param->_size_depth[alloc_signal_it1]); 130 } 131 132 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 133 std::string name; 134 135 { 136 name = _name+"_branch_target_buffer"; 137 log_printf(INFO,Prediction_unit,FUNCTION,_("Create : %s"),name.c_str()); 138 139 _component_btb = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer::Branch_Target_Buffer 140 (name.c_str() 141 #ifdef STATISTICS 142 ,param_statistics 143 #endif 144 ,_param->_param_btb 145 ,_usage); 146 147 _component->set_component (_component_btb->_component 148 #ifdef POSITION 149 , 50, 50, 10, 10 150 #endif 151 ); 152 } 153 154 { 155 name = _name+"_direction"; 156 log_printf(INFO,Prediction_unit,FUNCTION,_("Create : %s"),name.c_str()); 157 158 _component_dir = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::Direction 159 (name.c_str() 160 #ifdef STATISTICS 161 ,param_statistics 162 #endif 163 ,_param->_param_dir 164 ,_usage); 165 166 _component->set_component (_component_dir->_component 167 #ifdef POSITION 168 , 50, 50, 10, 10 169 #endif 170 ); 171 } 56 172 57 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 173 { 174 name = _name+"_return_address_stack"; 175 log_printf(INFO,Prediction_unit,FUNCTION,_("Create : %s"),name.c_str()); 176 177 _component_ras = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::return_address_stack::Return_Address_Stack 178 (name.c_str() 179 #ifdef STATISTICS 180 ,param_statistics 181 #endif 182 ,_param->_param_ras 183 ,_usage); 184 185 _component->set_component (_component_ras->_component 186 #ifdef POSITION 187 , 50, 50, 10, 10 188 #endif 189 ); 190 } 191 192 { 193 name = _name+"_update_prediction_table"; 194 log_printf(INFO,Prediction_unit,FUNCTION,_("Create : %s"),name.c_str()); 195 196 _component_upt = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::Update_Prediction_Table 197 (name.c_str() 198 #ifdef STATISTICS 199 ,param_statistics 200 #endif 201 ,_param->_param_upt 202 ,_usage); 203 204 _component->set_component (_component_upt->_component 205 #ifdef POSITION 206 , 50, 50, 10, 10 207 #endif 208 ); 209 } 210 211 { 212 name = _name+"_prediction_unit_glue"; 213 log_printf(INFO,Prediction_unit,FUNCTION,_("Create : %s"),name.c_str()); 214 215 _component_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue::Prediction_unit_Glue 216 (name.c_str() 217 #ifdef STATISTICS 218 ,param_statistics 219 #endif 220 ,_param->_param_glue 221 ,_usage); 222 223 _component->set_component (_component_glue->_component 224 #ifdef POSITION 225 , 50, 50, 10, 10 226 #endif 227 ); 228 } 58 229 59 230 // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 60 231 std::string src,dest; 61 232 233 // =================================================================== 234 // =====[ branch_target_buffer ]====================================== 235 // =================================================================== 236 { 237 src = _name+"_branch_target_buffer"; 238 log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str()); 239 240 { 241 dest = _name; 242 #ifdef POSITION 243 _component->interface_map (src ,"", 244 dest,""); 245 #endif 246 PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); 247 PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); 248 } 249 250 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 251 { 252 dest = _name+"_prediction_unit_glue"; 253 #ifdef POSITION 254 _component->interface_map (src ,"predict_"+toString(i), 255 dest,"predict_btb_"+toString(i)); 256 #endif 257 258 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_VAL" , 259 dest,"out_PREDICT_BTB_"+toString(i)+"_VAL" ); 260 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(i)+"_ACK" , 261 dest, "in_PREDICT_BTB_"+toString(i)+"_ACK" ); 262 if (_param->_have_port_context_id) 263 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_CONTEXT_ID" , 264 dest,"out_PREDICT_BTB_"+toString(i)+"_CONTEXT_ID" ); 265 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_ADDRESS" , 266 dest,"out_PREDICT_BTB_"+toString(i)+"_ADDRESS" ); 267 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(i)+"_HIT" , 268 dest, "in_PREDICT_BTB_"+toString(i)+"_HIT" ); 269 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(i)+"_ADDRESS_SRC" , 270 dest, "in_PREDICT_BTB_"+toString(i)+"_ADDRESS_SRC" ); 271 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(i)+"_ADDRESS_DEST", 272 dest, "in_PREDICT_BTB_"+toString(i)+"_ADDRESS_DEST"); 273 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(i)+"_CONDITION" , 274 dest, "in_PREDICT_BTB_"+toString(i)+"_CONDITION" ); 275 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(i)+"_IS_ACCURATE" , 276 dest, "in_PREDICT_BTB_"+toString(i)+"_IS_ACCURATE" ); 277 278 dest = _name+"_direction"; 279 COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_LAST_TAKE" , 280 dest, "in_PREDICT_"+toString(i)+"_LAST_TAKE" ); 281 } 282 283 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 284 { 285 dest = _name+"_prediction_unit_glue"; 286 #ifdef POSITION 287 _component->interface_map (src ,"decod_"+toString(i), 288 dest,"decod_btb_"+toString(i)); 289 #endif 290 291 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_VAL" , 292 dest,"out_DECOD_BTB_"+toString(i)+"_VAL" ); 293 COMPONENT_MAP(_component,src ,"out_DECOD_" +toString(i)+"_ACK" , 294 dest, "in_DECOD_BTB_"+toString(i)+"_ACK" ); 295 if (_param->_have_port_context_id) 296 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_CONTEXT_ID" , 297 dest,"out_DECOD_BTB_"+toString(i)+"_CONTEXT_ID" ); 298 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_ADDRESS_SRC" , 299 dest,"out_DECOD_BTB_"+toString(i)+"_ADDRESS_SRC" ); 300 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_ADDRESS_DEST" , 301 dest,"out_DECOD_BTB_"+toString(i)+"_ADDRESS_DEST" ); 302 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_CONDITION" , 303 dest,"out_DECOD_BTB_"+toString(i)+"_CONDITION" ); 304 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_LAST_TAKE" , 305 dest,"out_DECOD_BTB_"+toString(i)+"_LAST_TAKE" ); 306 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_MISS_PREDICTION", 307 dest,"out_DECOD_BTB_"+toString(i)+"_MISS_PREDICTION"); 308 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_IS_ACCURATE" , 309 dest,"out_DECOD_BTB_"+toString(i)+"_IS_ACCURATE" ); 310 } 311 312 for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++) 313 { 314 dest = _name+"_prediction_unit_glue"; 315 316 COMPONENT_MAP(_component,src , "in_UPDATE_" +toString(i)+"_VAL", 317 dest,"out_UPDATE_BTB_"+toString(i)+"_VAL"); 318 COMPONENT_MAP(_component,src ,"out_UPDATE_" +toString(i)+"_ACK", 319 dest, "in_UPDATE_BTB_"+toString(i)+"_ACK"); 320 321 dest = _name+"_update_prediction_table"; 322 #ifdef POSITION 323 _component->interface_map (src ,"update_"+toString(i), 324 dest,"update_"+toString(i)); 325 #endif 326 327 if (_param->_have_port_context_id) 328 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_CONTEXT_ID" , 329 dest,"out_UPDATE_"+toString(i)+ "_CONTEXT_ID" ); 330 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_ADDRESS_SRC" , 331 dest,"out_UPDATE_"+toString(i)+"_BTB_ADDRESS_SRC" ); 332 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_ADDRESS_DEST" , 333 dest,"out_UPDATE_"+toString(i)+"_BTB_ADDRESS_DEST" ); 334 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_CONDITION" , 335 dest,"out_UPDATE_"+toString(i)+"_BTB_CONDITION" ); 336 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_LAST_TAKE" , 337 dest,"out_UPDATE_"+toString(i)+ "_DIRECTION_GOOD" ); 338 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_MISS_PREDICTION", 339 dest,"out_UPDATE_"+toString(i)+ "_MISS_PREDICTION"); 340 } 341 } 342 343 // =================================================================== 344 // =====[ direction ]================================================= 345 // =================================================================== 346 { 347 src = _name+"_direction"; 348 log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str()); 349 350 { 351 dest = _name; 352 #ifdef POSITION 353 _component->interface_map (src ,"", 354 dest,""); 355 #endif 356 PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); 357 PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); 358 } 359 360 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 361 { 362 dest = _name+"_prediction_unit_glue"; 363 #ifdef POSITION 364 _component->interface_map (src ,"predict_"+toString(i), 365 dest,"predict_dir_"+toString(i)); 366 #endif 367 368 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_VAL" , 369 dest,"out_PREDICT_DIR_"+toString(i)+"_VAL" ); 370 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(i)+"_ACK" , 371 dest, "in_PREDICT_DIR_"+toString(i)+"_ACK" ); 372 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_ADDRESS_SRC", 373 dest,"out_PREDICT_DIR_"+toString(i)+"_ADDRESS_SRC"); 374 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_STATIC" , 375 dest,"out_PREDICT_DIR_"+toString(i)+"_STATIC" ); 376 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(i)+"_DIRECTION" , 377 dest, "in_PREDICT_DIR_"+toString(i)+"_DIRECTION" ); 378 379 dest = _name+"_update_prediction_table"; 380 if (_param->_have_port_history) 381 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(i)+"_HISTORY" , 382 dest, "in_PREDICT_" +toString(i)+"_HISTORY" ); 383 //out_PREDICT_DIR_LAST_TAKE - component_map branch_target_buffer 384 } 385 386 for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++) 387 { 388 dest = _name+"_prediction_unit_glue"; 389 390 COMPONENT_MAP(_component,src , "in_UPDATE_" +toString(i)+"_VAL", 391 dest,"out_UPDATE_DIR_"+toString(i)+"_VAL"); 392 COMPONENT_MAP(_component,src ,"out_UPDATE_" +toString(i)+"_ACK", 393 dest, "in_UPDATE_DIR_"+toString(i)+"_ACK"); 394 395 dest = _name+"_update_prediction_table"; 396 #ifdef POSITION 397 _component->interface_map (src ,"update_"+toString(i), 398 dest,"update_"+toString(i)); 399 #endif 400 401 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_ADDRESS" , 402 dest,"out_UPDATE_"+toString(i)+"_BTB_ADDRESS_SRC"); 403 if (_param->_have_port_history) 404 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_HISTORY" , 405 dest,"out_UPDATE_"+toString(i)+"_DIR_HISTORY" ); 406 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_DIRECTION", 407 dest,"out_UPDATE_"+toString(i)+ "_DIRECTION_GOOD"); 408 409 } 410 } 411 412 // =================================================================== 413 // =====[ return_address_stack ]====================================== 414 // =================================================================== 415 { 416 src = _name+"_return_address_stack"; 417 log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str()); 418 419 420 { 421 dest = _name; 422 #ifdef POSITION 423 _component->interface_map (src ,"", 424 dest,""); 425 #endif 426 PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); 427 PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); 428 } 429 430 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 431 { 432 dest = _name+"_prediction_unit_glue"; 433 #ifdef POSITION 434 _component->interface_map (src ,"predict_"+toString(i), 435 dest,"predict_dir_"+toString(i)); 436 #endif 437 438 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_VAL" , 439 dest,"out_PREDICT_RAS_"+toString(i)+"_VAL" ); 440 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(i)+"_ACK" , 441 dest, "in_PREDICT_RAS_"+toString(i)+"_ACK" ); 442 if (_param->_have_port_context_id) 443 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_CONTEXT_ID" , 444 dest,"out_PREDICT_RAS_"+toString(i)+"_CONTEXT_ID" ); 445 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(i)+"_HIT" , 446 dest, "in_PREDICT_RAS_"+toString(i)+"_HIT" ); 447 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_PUSH" , 448 dest,"out_PREDICT_RAS_"+toString(i)+"_PUSH" ); 449 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_ADDRESS_PUSH", 450 dest,"out_PREDICT_RAS_"+toString(i)+"_ADDRESS_PUSH"); 451 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(i)+"_ADDRESS_POP" , 452 dest, "in_PREDICT_RAS_"+toString(i)+"_ADDRESS_POP" ); 453 454 dest = _name+"_update_prediction_table"; 455 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(i)+"_INDEX", 456 dest, "in_PREDICT_" +toString(i)+"_RAS_INDEX"); 457 } 458 459 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 460 { 461 dest = _name+"_prediction_unit_glue"; 462 #ifdef POSITION 463 _component->interface_map (src ,"decod_"+toString(i), 464 dest,"decod_ras_"+toString(i)); 465 #endif 466 467 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_VAL" , 468 dest,"out_DECOD_RAS_"+toString(i)+"_VAL" ); 469 COMPONENT_MAP(_component,src ,"out_DECOD_" +toString(i)+"_ACK" , 470 dest, "in_DECOD_RAS_"+toString(i)+"_ACK" ); 471 if (_param->_have_port_context_id) 472 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_CONTEXT_ID" , 473 dest,"out_DECOD_RAS_"+toString(i)+"_CONTEXT_ID" ); 474 COMPONENT_MAP(_component,src ,"out_DECOD_" +toString(i)+"_HIT" , 475 dest, "in_DECOD_RAS_"+toString(i)+"_HIT" ); 476 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_PUSH" , 477 dest,"out_DECOD_RAS_"+toString(i)+"_PUSH" ); 478 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_ADDRESS_PUSH" , 479 dest,"out_DECOD_RAS_"+toString(i)+"_ADDRESS_PUSH" ); 480 COMPONENT_MAP(_component,src ,"out_DECOD_" +toString(i)+"_ADDRESS_POP" , 481 dest, "in_DECOD_RAS_"+toString(i)+"_ADDRESS_POP" ); 482 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_MISS_PREDICTION", 483 dest,"out_DECOD_RAS_"+toString(i)+"_MISS_PREDICTION"); 484 485 dest = _name+"_update_prediction_table"; 486 COMPONENT_MAP(_component,src ,"out_DECOD_" +toString(i)+"_INDEX" , 487 dest, "in_DECOD_" +toString(i)+"_RAS_INDEX" ); 488 } 489 490 for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++) 491 { 492 dest = _name+"_prediction_unit_glue"; 493 494 COMPONENT_MAP(_component,src , "in_UPDATE_" +toString(i)+"_VAL", 495 dest,"out_UPDATE_RAS_"+toString(i)+"_VAL"); 496 COMPONENT_MAP(_component,src ,"out_UPDATE_" +toString(i)+"_ACK", 497 dest, "in_UPDATE_RAS_"+toString(i)+"_ACK"); 498 499 dest = _name+"_update_prediction_table"; 500 #ifdef POSITION 501 _component->interface_map (src ,"update_"+toString(i), 502 dest,"update_"+toString(i)); 503 #endif 504 505 if (_param->_have_port_context_id) 506 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_CONTEXT_ID" , 507 dest,"out_UPDATE_"+toString(i)+ "_CONTEXT_ID" ); 508 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_PUSH" , 509 dest,"out_UPDATE_"+toString(i)+"_RAS_PUSH" ); 510 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_ADDRESS" , 511 dest,"out_UPDATE_"+toString(i)+"_RAS_ADDRESS" ); 512 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_INDEX" , 513 dest,"out_UPDATE_"+toString(i)+"_RAS_INDEX" ); 514 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_MISS_PREDICTION" , 515 dest,"out_UPDATE_"+toString(i)+ "_MISS_PREDICTION" ); 516 COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+ "_PREDICTION_IFETCH", 517 dest,"out_UPDATE_"+toString(i)+"_RAS_PREDICTION_IFETCH"); 518 } 519 } 520 521 // =================================================================== 522 // =====[ update_prediction_table ]=================================== 523 // =================================================================== 524 { 525 src = _name+"_update_prediction_table"; 526 log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str()); 527 528 { 529 dest = _name; 530 #ifdef POSITION 531 _component->interface_map (src ,"", 532 dest,""); 533 #endif 534 PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); 535 PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); 536 } 537 538 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 539 { 540 dest = _name+"_prediction_unit_glue"; 541 #ifdef POSITION 542 _component->interface_map (src ,"predict_"+toString(i), 543 dest,"predict_dir_"+toString(i)); 544 #endif 545 546 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_VAL" , 547 dest,"out_PREDICT_UPT_"+toString(i)+"_VAL" ); 548 COMPONENT_MAP(_component,src ,"out_PREDICT_" +toString(i)+"_ACK" , 549 dest, "in_PREDICT_UPT_"+toString(i)+"_ACK" ); 550 if (_param->_have_port_context_id) 551 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_CONTEXT_ID" , 552 dest,"out_PREDICT_UPT_"+toString(i)+"_CONTEXT_ID" ); 553 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_BTB_ADDRESS_SRC" , 554 dest,"out_PREDICT_UPT_"+toString(i)+"_BTB_ADDRESS_SRC" ); 555 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_BTB_ADDRESS_DEST", 556 dest,"out_PREDICT_UPT_"+toString(i)+"_BTB_ADDRESS_DEST"); 557 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_BTB_CONDITION" , 558 dest,"out_PREDICT_UPT_"+toString(i)+"_BTB_CONDITION" ); 559 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_BTB_LAST_TAKE" , 560 dest,"out_PREDICT_UPT_"+toString(i)+"_BTB_LAST_TAKE" ); 561 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_BTB_IS_ACCURATE" , 562 dest,"out_PREDICT_UPT_"+toString(i)+"_BTB_IS_ACCURATE" ); 563 COMPONENT_MAP(_component,src , "in_PREDICT_" +toString(i)+"_RAS_ADDRESS" , 564 dest,"out_PREDICT_UPT_"+toString(i)+"_RAS_ADDRESS" ); 565 566 //out_PREDICT_HISTORY - component_map direction 567 // in_PREDICT_RAS_INDEX - component_map return_address_stack 568 } 569 570 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 571 { 572 dest = _name+"_prediction_unit_glue"; 573 574 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_VAL" , 575 dest,"out_DECOD_UPT_"+toString(i)+"_VAL" ); 576 COMPONENT_MAP(_component,src ,"out_DECOD_" +toString(i)+"_ACK" , 577 dest, "in_DECOD_UPT_"+toString(i)+"_ACK" ); 578 if (_param->_have_port_context_id) 579 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_CONTEXT_ID" , 580 dest,"out_DECOD_UPT_"+toString(i)+"_CONTEXT_ID" ); 581 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_BTB_ADDRESS_SRC" , 582 dest,"out_DECOD_UPT_"+toString(i)+"_BTB_ADDRESS_SRC" ); 583 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_BTB_ADDRESS_DEST" , 584 dest,"out_DECOD_UPT_"+toString(i)+"_BTB_ADDRESS_DEST" ); 585 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_BTB_CONDITION" , 586 dest,"out_DECOD_UPT_"+toString(i)+"_BTB_CONDITION" ); 587 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_BTB_LAST_TAKE" , 588 dest,"out_DECOD_UPT_"+toString(i)+"_BTB_LAST_TAKE" ); 589 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_RAS_ADDRESS" , 590 dest,"out_DECOD_UPT_"+toString(i)+"_RAS_ADDRESS" ); 591 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_MISS_IFETCH" , 592 dest,"out_DECOD_UPT_"+toString(i)+"_MISS_IFETCH" ); 593 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_MISS_DECOD" , 594 dest,"out_DECOD_UPT_"+toString(i)+"_MISS_DECOD" ); 595 if (_param->_have_port_max_depth) 596 COMPONENT_MAP(_component,src , "in_DECOD_" +toString(i)+"_UPDATE_PREDICTION_ID", 597 dest,"out_DECOD_UPT_"+toString(i)+"_UPDATE_PREDICTION_ID"); 598 599 //out_DECOD_UPT_RAS_INDEX - component_map return_address_stack 600 } 601 602 for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++) 603 { 604 dest = _name+"_prediction_unit_glue"; 605 606 #ifdef POSITION 607 _component->interface_map (src ,"update_"+toString(i), 608 dest,"update_upt_"+toString(i)); 609 #endif 610 611 COMPONENT_MAP(_component,src ,"out_UPDATE_" +toString(i)+"_VAL", 612 dest, "in_UPDATE_UPT_"+toString(i)+"_VAL"); 613 COMPONENT_MAP(_component,src , "in_UPDATE_" +toString(i)+"_ACK", 614 dest,"out_UPDATE_UPT_"+toString(i)+"_ACK"); 615 616 COMPONENT_MAP(_component,src ,"out_UPDATE_" +toString(i)+"_BTB_VAL", 617 dest, "in_UPDATE_UPT_"+toString(i)+"_BTB_VAL"); 618 COMPONENT_MAP(_component,src ,"out_UPDATE_" +toString(i)+"_DIR_VAL", 619 dest, "in_UPDATE_UPT_"+toString(i)+"_DIR_VAL"); 620 COMPONENT_MAP(_component,src ,"out_UPDATE_" +toString(i)+"_RAS_VAL", 621 dest, "in_UPDATE_UPT_"+toString(i)+"_RAS_VAL"); 622 623 //in_UPDATE_UPT_CONTEXT_ID - component_map branch_target_buffer 624 //in_UPDATE_UPT_MISS_PREDICTION - component_map branch_target_buffer 625 //in_UPDATE_UPT_DIRECTION_GOOD - component_map branch_target_buffer 626 //in_UPDATE_UPT_BTB_ADDRESS_SRC - component_map branch_target_buffer 627 //in_UPDATE_UPT_BTB_ADDRESS_DEST - component_map branch_target_buffer 628 //in_UPDATE_UPT_BTB_CONDITION - component_map branch_target_buffer 629 //in_UPDATE_UPT_DIR_HISTORY - component_map direction 630 //in_UPDATE_UPT_RAS_ADDRESS - component_map return_address_stack 631 //in_UPDATE_UPT_RAS_PUSH - component_map return_address_stack 632 //in_UPDATE_UPT_RAS_INDEX - component_map return_address_stack 633 //in_UPDATE_UPT_RAS_PREDICTION_IFETCH - component_map return_address_stack 634 } 635 636 for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++) 637 { 638 dest = _name; 639 640 #ifdef POSITION 641 _component->interface_map (src ,"complete_"+toString(i), 642 dest,"complete_"+toString(i)); 643 #endif 644 645 PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_VAL" , 646 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL" ); 647 PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK" , 648 dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK" ); 649 if (_param->_have_port_context_id) 650 PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID" , 651 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID" ); 652 if (_param->_have_port_max_depth) 653 PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH" , 654 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH" ); 655 PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" , 656 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" ); 657 PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_FLAG" , 658 dest, "in_BRANCH_COMPLETE_"+toString(i)+"_FLAG" ); 659 PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION", 660 dest,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION"); 661 PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE" , 662 dest,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE" ); 663 PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" , 664 dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" ); 665 PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST" , 666 dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST" ); 667 } 668 669 for (uint32_t i=0; i<_param->_nb_context; i++) 670 { 671 dest = _name; 672 673 #ifdef POSITION 674 _component->interface_map (src ,"branch_event_"+toString(i), 675 dest,"branch_event_"+toString(i)); 676 #endif 677 678 PORT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_VAL" ,dest,"out_BRANCH_EVENT_"+toString(i)+"_VAL" ); 679 PORT_MAP(_component,src , "in_BRANCH_EVENT_"+toString(i)+"_ACK" ,dest, "in_BRANCH_EVENT_"+toString(i)+"_ACK" ); 680 PORT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_SRC" ,dest,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_SRC" ); 681 PORT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST",dest,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST"); 682 } 683 684 for (uint32_t i=0; i<_param->_nb_context; i++) 685 { 686 dest = _name+"_prediction_unit_glue"; 687 688 #ifdef POSITION 689 _component->interface_map (src ,"depth_"+toString(i), 690 dest,"depth_"+toString(i)); 691 #endif 692 693 COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_NB_BRANCH", 694 dest, "in_DEPTH_"+toString(i)+"_UPT_NB_BRANCH"); 695 696 if (_param->_have_port_depth[i]) 697 COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_TAIL" , 698 dest, "in_DEPTH_"+toString(i)+"_UPT_TAIL" ); 699 } 700 701 } 702 703 // =================================================================== 704 // =====[ prediction_unit_glue ]====================================== 705 // =================================================================== 706 { 707 src = _name+"_prediction_unit_glue"; 708 log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str()); 709 710 { 711 dest = _name; 712 #ifdef POSITION 713 _component->interface_map (src ,"", 714 dest,""); 715 #endif 716 717 PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); 718 PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); 719 } 720 721 for (uint32_t i=0; i<_param->_nb_context; i++) 722 { 723 dest = _name; 724 #ifdef POSITION 725 _component->interface_map (src ,"predict_"+toString(i), 726 dest,"predict_"+toString(i)); 727 #endif 728 729 PORT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_VAL" , 730 dest, "in_PREDICT_"+toString(i)+"_VAL" ); 731 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_ACK" , 732 dest,"out_PREDICT_"+toString(i)+"_ACK" ); 733 PORT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_PC_PREVIOUS" , 734 dest, "in_PREDICT_"+toString(i)+"_PC_PREVIOUS" ); 735 PORT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_PC_CURRENT" , 736 dest, "in_PREDICT_"+toString(i)+"_PC_CURRENT" ); 737 PORT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_PC_CURRENT_IS_DS_TAKE" , 738 dest, "in_PREDICT_"+toString(i)+"_PC_CURRENT_IS_DS_TAKE" ); 739 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_PC_NEXT" , 740 dest,"out_PREDICT_"+toString(i)+"_PC_NEXT" ); 741 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_PC_NEXT_IS_DS_TAKE" , 742 dest,"out_PREDICT_"+toString(i)+"_PC_NEXT_IS_DS_TAKE" ); 743 if (_param->_have_port_inst_ifetch_ptr [i]) 744 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_INST_IFETCH_PTR" , 745 dest,"out_PREDICT_"+toString(i)+"_INST_IFETCH_PTR" ); 746 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_BRANCH_STATE" , 747 dest,"out_PREDICT_"+toString(i)+"_BRANCH_STATE" ); 748 if (_param->_have_port_depth [i]) 749 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID", 750 dest,"out_PREDICT_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID"); 751 752 for (uint32_t j=0; j<_param->_nb_instruction[i]; j++) 753 { 754 dest = _name; 755 #ifdef POSITION 756 _component->interface_map (src ,"predict_"+toString(i)+"_"+toString(j), 757 dest,"predict_"+toString(i)+"_"+toString(j)); 758 #endif 759 760 PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_INSTRUCTION_ENABLE", 761 dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_INSTRUCTION_ENABLE"); 762 } 763 } 764 765 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 766 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 767 { 768 dest = _name; 769 #ifdef POSITION 770 _component->interface_map (src ,"decod_"+toString(i), 771 dest,"decod_"+toString(i)); 772 #endif 773 774 PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_VAL" , 775 dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_VAL" ); 776 PORT_MAP(_component,src ,"out_DECOD_"+toString(i)+"_"+toString(j)+"_ACK" , 777 dest,"out_DECOD_"+toString(i)+"_"+toString(j)+"_ACK" ); 778 if (_param->_have_port_context_id) 779 PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID" , 780 dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID" ); 781 PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_MATCH_INST_IFETCH_PTR" , 782 dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_MATCH_INST_IFETCH_PTR" ); 783 PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_STATE" , 784 dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_STATE" ); 785 if (_param->_have_port_max_depth) 786 PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_UPDATE_PREDICTION_ID", 787 dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_UPDATE_PREDICTION_ID"); 788 PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_CONDITION" , 789 dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_CONDITION" ); 790 PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_DIRECTION" , 791 dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_DIRECTION" ); 792 PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_ADDRESS_SRC" , 793 dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_ADDRESS_SRC" ); 794 PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_ADDRESS_DEST" , 795 dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_ADDRESS_DEST" ); 796 } 797 798 for (uint32_t i=0; i<_param->_nb_context; i++) 799 { 800 dest = _name; 801 #ifdef POSITION 802 _component->interface_map (src ,"depth_"+toString(i), 803 dest,"depth_"+toString(i)); 804 #endif 805 806 PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_NB_BRANCH",dest,"out_DEPTH_"+toString(i)+"_NB_BRANCH"); 807 if (_param->_have_port_depth[i]) 808 PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_TAIL" ,dest,"out_DEPTH_"+toString(i)+"_TAIL" ); 809 } 810 } 62 811 63 812 // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 64 _component->test_map();813 _component->test_map(false); 65 814 66 815 #ifdef POSITION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_deallocation.cpp
r81 r82 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Prediction_unit.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 namespace morpheo { … … 26 27 delete in_CLOCK ; 27 28 delete in_NRESET; 29 30 DELETE1_SIGNAL( in_PREDICT_VAL ,_param->_nb_context,1); 31 DELETE1_SIGNAL(out_PREDICT_ACK ,_param->_nb_context,1); 32 DELETE1_SIGNAL( in_PREDICT_PC_PREVIOUS ,_param->_nb_context,_param->_size_address); 33 DELETE1_SIGNAL( in_PREDICT_PC_CURRENT ,_param->_nb_context,_param->_size_address); 34 DELETE1_SIGNAL( in_PREDICT_PC_CURRENT_IS_DS_TAKE ,_param->_nb_context,1); 35 DELETE1_SIGNAL(out_PREDICT_PC_NEXT ,_param->_nb_context,_param->_size_address); 36 DELETE1_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE ,_param->_nb_context,1); 37 DELETE1_SIGNAL(out_PREDICT_INST_IFETCH_PTR ,_param->_nb_context,_param->_size_inst_ifetch_ptr [alloc_signal_it1]); 38 DELETE1_SIGNAL(out_PREDICT_BRANCH_STATE ,_param->_nb_context,_param->_size_branch_state); 39 DELETE1_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context,_param->_size_depth [alloc_signal_it1]); 40 41 DELETE2_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1],1); 42 DELETE2_SIGNAL( in_DECOD_VAL ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1); 43 DELETE2_SIGNAL(out_DECOD_ACK ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1); 44 DELETE2_SIGNAL( in_DECOD_CONTEXT_ID ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_context_id ); 45 DELETE2_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1 ); 46 DELETE2_SIGNAL( in_DECOD_BRANCH_STATE ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_branch_state ); 47 DELETE2_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_max_size_depth ); 48 DELETE2_SIGNAL( in_DECOD_BRANCH_CONDITION ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_branch_condition); 49 DELETE2_SIGNAL( in_DECOD_BRANCH_DIRECTION ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1 ); 50 DELETE2_SIGNAL( in_DECOD_ADDRESS_SRC ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_address ); 51 DELETE2_SIGNAL( in_DECOD_ADDRESS_DEST ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_address ); 52 53 DELETE1_SIGNAL( in_BRANCH_COMPLETE_VAL ,_param->_nb_inst_branch_complete,1); 54 DELETE1_SIGNAL(out_BRANCH_COMPLETE_ACK ,_param->_nb_inst_branch_complete,1); 55 DELETE1_SIGNAL( in_BRANCH_COMPLETE_CONTEXT_ID ,_param->_nb_inst_branch_complete,_param->_size_context_id); 56 DELETE1_SIGNAL( in_BRANCH_COMPLETE_DEPTH ,_param->_nb_inst_branch_complete,_param->_max_size_depth); 57 DELETE1_SIGNAL( in_BRANCH_COMPLETE_ADDRESS ,_param->_nb_inst_branch_complete,_param->_size_address); 58 DELETE1_SIGNAL( in_BRANCH_COMPLETE_FLAG ,_param->_nb_inst_branch_complete,1); 59 DELETE1_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete,1); 60 DELETE1_SIGNAL(out_BRANCH_COMPLETE_TAKE ,_param->_nb_inst_branch_complete,1); 61 DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC ,_param->_nb_inst_branch_complete,_param->_size_address); 62 DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST ,_param->_nb_inst_branch_complete,_param->_size_address); 63 64 DELETE1_SIGNAL(out_BRANCH_EVENT_VAL ,_param->_nb_context,1); 65 DELETE1_SIGNAL( in_BRANCH_EVENT_ACK ,_param->_nb_context,1); 66 // DELETE1_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID ,_param->_nb_context,_param->_size_context_id); 67 // DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH ,_param->_nb_context,_param->_max_size_depth); 68 // DELETE1_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION,_param->_nb_context,1); 69 DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC ,_param->_nb_context,_param->_size_address); 70 DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST ,_param->_nb_context,_param->_size_address); 71 72 DELETE1_SIGNAL(out_DEPTH_NB_BRANCH ,_param->_nb_context,_param->_size_depth[alloc_signal_it1]+1); 73 DELETE1_SIGNAL(out_DEPTH_TAIL ,_param->_nb_context,_param->_size_depth[alloc_signal_it1]); 28 74 } 29 75 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 30 76 31 77 delete _component; 78 79 delete _component_btb; 80 delete _component_dir; 81 delete _component_ras; 82 delete _component_upt; 83 delete _component_glue; 32 84 33 85 log_printf(FUNC,Prediction_unit,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 256 10 #define CYCLE_MAX (128*NB_ITERATION) 11 9 12 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" … … 12 15 #include "Behavioural/include/Allocation.h" 13 16 #include <list> 14 15 #define NB_ITERATION 25616 #define CYCLE_MAX (128*NB_ITERATION)17 18 #define LABEL(str...) \19 { \20 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \21 msg (str); \22 msg (_("\n")); \23 } while(0)24 25 #define SC_START(cycle_offset) \26 do \27 { \28 /*cout << "SC_START (begin)" << endl;*/ \29 \30 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \31 if (cycle_offset != 0) \32 { \33 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \34 } \35 \36 if (cycle_current > CYCLE_MAX) \37 { \38 TEST_KO("Maximal cycles Reached"); \39 } \40 \41 sc_start(cycle_offset); \42 \43 /*cout << "SC_START (end )" << endl;*/ \44 } while(0)45 17 46 18 class request_t … … 78 50 #endif 79 51 80 Load_Store_pointer_unit * _Load_Store_pointer_unit = new Load_Store_pointer_unit (name.c_str(), 52 Load_Store_pointer_unit * _Load_Store_pointer_unit = new Load_Store_pointer_unit 53 (name.c_str(), 81 54 #ifdef STATISTICS 82 55 _parameters_statistics, 83 56 #endif 84 _param); 57 _param, 58 USE_ALL); 85 59 86 60 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/include/Load_Store_pointer_unit.h
r81 r82 120 120 #endif 121 121 Parameters * param, 122 morpheo::behavioural::Tusage_t usage =USE_ALL122 morpheo::behavioural::Tusage_t usage 123 123 ); 124 124 public : ~Load_Store_pointer_unit (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/include/Parameters.h
r81 r82 55 55 public : ~Parameters () ; 56 56 57 public : std::stringmsg_error (void);57 public : Parameters_test msg_error (void); 58 58 59 public : std::string print (uint32_t depth);60 public : friend std::ostream& operator<< (std::ostream& output_stream,61 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::load_store_pointer_unit::Parameters & x);59 public : std::string print (uint32_t depth); 60 public : friend std::ostream& operator<< (std::ostream& output_stream, 61 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::load_store_pointer_unit::Parameters & x); 62 62 }; 63 63 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Parameters_msg_error.cpp
r81 r82 21 21 #undef FUNCTION 22 22 #define FUNCTION "Load_Store_pointer_unit::msg_error" 23 std::stringParameters::msg_error(void)23 Parameters_test Parameters::msg_error(void) 24 24 { 25 25 log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin"); 26 26 27 std::string msg = "";27 Parameters_test test ("Load_Store_pointer_unit"); 28 28 29 29 for (uint32_t i=0; i<_nb_load_store_queue; i++) 30 30 { 31 31 if (not (_size_store_queue [i] > 1)) 32 msg += " - The size of store_queue["+toString(i)+"] must be greater or equal at 2.\n";32 test.error(toString(_("The size of store_queue[%d] must be greater or equal at 2.\n"),i)); 33 33 if (not (_size_load_queue [i] > 0)) 34 msg += " - The size of load_queue["+toString(i)+"] must be greater or equal at 1.\n";34 test.error(toString(_("The size of load_queue[%d] must be greater or equal at 1.\n"),i)); 35 35 } 36 36 … … 43 43 map_lsq [_link_load_store_unit_with_thread[i][j]] = true; 44 44 else 45 msg += " - The number of load_store_unit for the thread ["+toString(i)+"]["+toString(j)+"] is too high.\n";45 test.error(toString(_("The number of load_store_unit for the thread [%d][%d] is too high.\n"),i,j)); 46 46 47 47 for (uint32_t i=0; i<_nb_load_store_queue; i++) 48 48 if (map_lsq [i] == false) 49 msg += " - The load store unit ["+toString(i)+"] is not linked with a thread.\n";49 test.error(toString(_("The load store unit [%d] is not linked with a thread.\n"),i)); 50 50 51 return msg;51 return test; 52 52 53 53 log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 32 10 #define CYCLE_MAX (128*NB_ITERATION) 11 9 12 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" … … 12 15 #include <list> 13 16 14 #define NB_ITERATION 3215 #define CYCLE_MAX (128*NB_ITERATION)16 17 #define LABEL(str...) \18 { \19 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \20 msg (str); \21 msg (_("\n")); \22 } while(0)23 24 #define SC_START(cycle_offset) \25 do \26 { \27 /*cout << "SC_START (begin)" << endl;*/ \28 \29 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \30 if (cycle_offset != 0) \31 { \32 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \33 } \34 \35 if (cycle_current > CYCLE_MAX) \36 { \37 TEST_KO("Maximal cycles Reached"); \38 } \39 \40 sc_start(cycle_offset); \41 \42 /*cout << "SC_START (end )" << endl;*/ \43 } while(0)44 45 17 void test (string name, 46 18 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::dependency_checking_unit::Parameters * _param) … … 52 24 #endif 53 25 54 Dependency_checking_unit * _Dependency_checking_unit = new Dependency_checking_unit (name.c_str(), 26 Dependency_checking_unit * _Dependency_checking_unit = new Dependency_checking_unit 27 (name.c_str(), 55 28 #ifdef STATISTICS 56 29 _parameters_statistics, 57 30 #endif 58 _param); 31 _param, 32 USE_ALL); 59 33 60 34 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/include/Dependency_checking_unit.h
r81 r82 132 132 #endif 133 133 Parameters * param, 134 morpheo::behavioural::Tusage_t usage =USE_ALL134 morpheo::behavioural::Tusage_t usage 135 135 ); 136 136 public : ~Dependency_checking_unit (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/include/Parameters.h
r81 r82 48 48 public : ~Parameters () ; 49 49 50 public : std::stringmsg_error (void);50 public : Parameters_test msg_error (void); 51 51 52 public : std::string print (uint32_t depth);53 public : friend std::ostream& operator<< (std::ostream& output_stream,54 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::dependency_checking_unit::Parameters & x);52 public : std::string print (uint32_t depth); 53 public : friend std::ostream& operator<< (std::ostream& output_stream, 54 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::dependency_checking_unit::Parameters & x); 55 55 }; 56 56 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/src/Parameters_msg_error.cpp
r81 r82 22 22 #undef FUNCTION 23 23 #define FUNCTION "Dependency_checking_unit::msg_error" 24 std::stringParameters::msg_error(void)24 Parameters_test Parameters::msg_error(void) 25 25 { 26 26 log_printf(FUNC,Dependency_checking_unit,FUNCTION,"Begin"); 27 27 28 std::string msg = "";28 Parameters_test test ("Dependency_checking_unit"); 29 29 30 return msg;30 return test; 31 31 32 32 log_printf(FUNC,Dependency_checking_unit,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_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_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_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 Free_List_unit * _Free_List_unit = new Free_List_unit (name.c_str(), 25 Free_List_unit * _Free_List_unit = new Free_List_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_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Free_List_unit.h
r81 r82 117 117 #endif 118 118 Parameters * param, 119 morpheo::behavioural::Tusage_t usage =USE_ALL119 morpheo::behavioural::Tusage_t usage 120 120 ); 121 121 public : ~Free_List_unit (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Parameters.h
r81 r82 56 56 public : ~Parameters () ; 57 57 58 public : std::stringmsg_error (void);58 public : Parameters_test msg_error (void); 59 59 60 public : std::string print (uint32_t depth);61 public : friend std::ostream& operator<< (std::ostream& output_stream,62 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::free_list_unit::Parameters & x);60 public : std::string print (uint32_t depth); 61 public : friend std::ostream& operator<< (std::ostream& output_stream, 62 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::free_list_unit::Parameters & x); 63 63 }; 64 64 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Parameters_msg_error.cpp
r81 r82 22 22 #undef FUNCTION 23 23 #define FUNCTION "Free_List_unit::msg_error" 24 std::stringParameters::msg_error(void)24 Parameters_test Parameters::msg_error(void) 25 25 { 26 26 log_printf(FUNC,Free_List_unit,FUNCTION,"Begin"); 27 27 28 std::string msg = "";28 Parameters_test test ("Free_List_unit"); 29 29 30 30 if (_nb_general_register <= _nb_thread*_nb_general_register_logic) 31 msg += " - The number of physical general register is insufficient.\n";31 test.error(_("The number of physical general register is insufficient.\n")); 32 32 if (_nb_special_register <= _nb_thread*_nb_special_register_logic) 33 msg += " - The number of physical special register is insufficient.\n";33 test.error(_("The number of physical special register is insufficient.\n")); 34 34 if (not is_multiple (_nb_bank, _nb_pop)) 35 msg += " - Number of pop must be a multiple of number of bank.\n";35 test.error(_("Number of pop must be a multiple of number of bank.\n")); 36 36 if (not is_power2 (_nb_bank)) 37 msg += " - Number of bank must be a power of 2.\n";37 test.error(_("Number of bank must be a power of 2.\n")); 38 38 39 39 if ((_priority != PRIORITY_STATIC) and 40 40 (_priority != PRIORITY_ROUND_ROBIN)) 41 msg += " - Unsupported priority scheme. Supported scheme are "+toString(PRIORITY_STATIC)+" and "+toString(PRIORITY_ROUND_ROBIN)+".\n";41 test.error(toString(_("Unsupported priority scheme. Supported scheme are %s and %s.\n"),toString(PRIORITY_STATIC).c_str(),toString(PRIORITY_ROUND_ROBIN).c_str())); 42 42 43 return msg;43 return test; 44 44 45 45 log_printf(FUNC,Free_List_unit,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 64 10 #define CYCLE_MAX (1024*NB_ITERATION) 11 9 12 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" … … 12 15 #include "Behavioural/include/Allocation.h" 13 16 14 #define NB_ITERATION 6415 #define CYCLE_MAX (1024*NB_ITERATION)16 17 #define LABEL(str...) \18 { \19 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \20 msg (str); \21 msg (_("\n")); \22 } while(0)23 24 #define SC_START(cycle_offset) \25 do \26 { \27 /*cout << "SC_START (begin)" << endl;*/ \28 \29 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \30 if (cycle_offset != 0) \31 { \32 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \33 } \34 \35 if (cycle_current > CYCLE_MAX) \36 { \37 TEST_KO("Maximal cycles Reached"); \38 } \39 \40 sc_start(cycle_offset); \41 \42 /*cout << "SC_START (end )" << endl;*/ \43 } while(0)44 45 17 void test (string name, 46 18 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_address_translation_unit::Parameters * _param) … … 52 24 #endif 53 25 54 Register_Address_Translation_unit * _Register_Address_Translation_unit = new Register_Address_Translation_unit (name.c_str(), 26 Register_Address_Translation_unit * _Register_Address_Translation_unit = new Register_Address_Translation_unit 27 (name.c_str(), 55 28 #ifdef STATISTICS 56 29 _parameters_statistics, 57 30 #endif 58 _param); 31 _param, 32 USE_ALL); 59 33 60 34 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Parameters.h
r81 r82 51 51 public : ~Parameters () ; 52 52 53 public : std::stringmsg_error (void);53 public : Parameters_test msg_error (void); 54 54 55 public : std::string print (uint32_t depth);56 public : friend std::ostream& operator<< (std::ostream& output_stream,57 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_address_translation_unit::Parameters & x);55 public : std::string print (uint32_t depth); 56 public : friend std::ostream& operator<< (std::ostream& output_stream, 57 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_address_translation_unit::Parameters & x); 58 58 }; 59 59 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Register_Address_Translation_unit.h
r81 r82 135 135 #endif 136 136 Parameters * param, 137 morpheo::behavioural::Tusage_t usage =USE_ALL137 morpheo::behavioural::Tusage_t usage 138 138 ); 139 139 public : ~Register_Address_Translation_unit (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Parameters_msg_error.cpp
r81 r82 19 19 namespace register_address_translation_unit { 20 20 21 22 21 #undef FUNCTION 23 22 #define FUNCTION "Register_Address_Translation_unit::msg_error" 24 std::stringParameters::msg_error(void)23 Parameters_test Parameters::msg_error(void) 25 24 { 26 25 log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin"); 27 26 28 std::string msg = "";27 Parameters_test test ("Register_Address_Translation_unit"); 29 28 30 return msg;29 return test; 31 30 32 31 log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 256 10 #define CYCLE_MAX (128*NB_ITERATION) 11 9 12 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 14 #include "Behavioural/include/Allocation.h" 12 13 #define NB_ITERATION 25614 #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 Register_translation_unit_Glue * _Register_translation_unit_Glue = new Register_translation_unit_Glue (name.c_str(), 25 Register_translation_unit_Glue * _Register_translation_unit_Glue = new Register_translation_unit_Glue 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_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/include/Parameters.h
r81 r82 35 35 public : ~Parameters () ; 36 36 37 public : std::stringmsg_error (void);37 public : Parameters_test msg_error (void); 38 38 39 public : std::string print (uint32_t depth);40 public : friend std::ostream& operator<< (std::ostream& output_stream,41 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_translation_unit_glue::Parameters & x);39 public : std::string print (uint32_t depth); 40 public : friend std::ostream& operator<< (std::ostream& output_stream, 41 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_translation_unit_glue::Parameters & x); 42 42 }; 43 43 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/include/Register_translation_unit_Glue.h
r81 r82 107 107 #endif 108 108 Parameters * param, 109 morpheo::behavioural::Tusage_t usage =USE_ALL109 morpheo::behavioural::Tusage_t usage 110 110 ); 111 111 public : ~Register_translation_unit_Glue (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/src/Parameters_msg_error.cpp
r81 r82 22 22 #undef FUNCTION 23 23 #define FUNCTION "Register_translation_unit_Glue::msg_error" 24 std::stringParameters::msg_error(void)24 Parameters_test Parameters::msg_error(void) 25 25 { 26 26 log_printf(FUNC,Register_translation_unit_Glue,FUNCTION,"Begin"); 27 27 28 std::string msg = "";28 Parameters_test test ("Register_translation_unit_Glue"); 29 29 30 return msg;30 return test; 31 31 32 32 log_printf(FUNC,Register_translation_unit_Glue,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_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_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_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 Register_translation_unit * _Register_translation_unit = new Register_translation_unit (name.c_str(), 25 Register_translation_unit * _Register_translation_unit = new Register_translation_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_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_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_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 14 #include "Behavioural/include/Allocation.h" 12 15 #include <list> 13 14 #define NB_ITERATION 115 #define CYCLE_MAX (128*NB_ITERATION)16 17 #define LABEL(str...) \18 { \19 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \20 msg (str); \21 msg (_("\n")); \22 } while(0)23 24 #define SC_START(cycle_offset) \25 do \26 { \27 /*cout << "SC_START (begin)" << endl;*/ \28 \29 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \30 if (cycle_offset != 0) \31 { \32 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \33 } \34 \35 if (cycle_current > CYCLE_MAX) \36 { \37 TEST_KO("Maximal cycles Reached"); \38 } \39 \40 sc_start(cycle_offset); \41 \42 /*cout << "SC_START (end )" << endl;*/ \43 } while(0)44 16 45 17 … … 62 34 #endif 63 35 64 Stat_List_unit * _Stat_List_unit = new Stat_List_unit (name.c_str(), 36 Stat_List_unit * _Stat_List_unit = new Stat_List_unit 37 (name.c_str(), 65 38 #ifdef STATISTICS 66 39 _parameters_statistics, 67 40 #endif 68 _param); 41 _param, 42 USE_ALL); 69 43 70 44 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/include/Parameters.h
r81 r82 68 68 public : ~Parameters () ; 69 69 70 public : std::stringmsg_error (void);70 public : Parameters_test msg_error (void); 71 71 72 public : std::string print (uint32_t depth);73 public : friend std::ostream& operator<< (std::ostream& output_stream,74 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::stat_list_unit::Parameters & x);72 public : std::string print (uint32_t depth); 73 public : friend std::ostream& operator<< (std::ostream& output_stream, 74 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::stat_list_unit::Parameters & x); 75 75 }; 76 76 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/include/Stat_List_unit.h
r81 r82 136 136 #endif 137 137 Parameters * param, 138 morpheo::behavioural::Tusage_t usage =USE_ALL138 morpheo::behavioural::Tusage_t usage 139 139 ); 140 140 public : ~Stat_List_unit (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Parameters_msg_error.cpp
r81 r82 22 22 #undef FUNCTION 23 23 #define FUNCTION "Stat_List_unit::msg_error" 24 std::stringParameters::msg_error(void)24 Parameters_test Parameters::msg_error(void) 25 25 { 26 26 log_printf(FUNC,Stat_List_unit,FUNCTION,"Begin"); 27 27 28 std::string msg = "";28 Parameters_test test("Stat_List_unit"); 29 29 30 30 if (not is_multiple(_nb_bank, _nb_reg_free)) 31 msg += " - nb_bank must be a multiple of nb_reg_free.\n";31 test.error(_("nb_bank must be a multiple of nb_reg_free.\n")); 32 32 33 33 if (_nb_general_register < _nb_gpr_use_init) 34 msg += " - the number of physical general register is insuffisant. (you need less "+toString(_nb_gpr_use_init)+" registers.\n";34 test.error(toString(_("the number of physical general register is insuffisant. (you need less %d registers.\n"),_nb_gpr_use_init)); 35 35 36 36 if (_nb_special_register < _nb_spr_use_init) 37 msg += " - the number of physical special register is insuffisant. (you need less "+toString(_nb_spr_use_init)+" registers.\n";37 test.error(toString(_("the number of physical special register is insuffisant. (you need less %d registers.\n"),_nb_spr_use_init)); 38 38 39 39 if (not is_power2(_nb_general_register)) 40 msg += " - the number of physical general register must be a power of 2.\n";40 test.error(_("the number of physical general register must be a power of 2.\n")); 41 41 42 42 if (not is_power2(_nb_special_register)) 43 msg += " - the number of physical special register must be a power of 2.\n";43 test.error(_("the number of physical special register must be a power of 2.\n")); 44 44 45 45 if (not is_power2(_nb_bank)) 46 msg += " - the number of bank must be a power of 2.\n";46 test.error(_("the number of bank must be a power of 2.\n")); 47 47 48 return msg;48 return test; 49 49 50 50 log_printf(FUNC,Stat_List_unit,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/include/Parameters.h
r81 r82 66 66 public : ~Parameters () ; 67 67 68 public : std::stringmsg_error (void);68 public : Parameters_test msg_error (void); 69 69 70 public : std::string print (uint32_t depth);71 public : friend std::ostream& operator<< (std::ostream& output_stream,72 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::Parameters & x);70 public : std::string print (uint32_t depth); 71 public : friend std::ostream& operator<< (std::ostream& output_stream, 72 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::Parameters & x); 73 73 }; 74 74 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/include/Register_translation_unit.h
r81 r82 155 155 #endif 156 156 Parameters * param, 157 morpheo::behavioural::Tusage_t usage =USE_ALL157 morpheo::behavioural::Tusage_t usage 158 158 ); 159 159 public : ~Register_translation_unit (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Parameters_msg_error.cpp
r81 r82 21 21 #undef FUNCTION 22 22 #define FUNCTION "Register_translation_unit::msg_error" 23 std::stringParameters::msg_error(void)23 Parameters_test Parameters::msg_error(void) 24 24 { 25 25 log_printf(FUNC,Register_translation_unit,FUNCTION,"Begin"); 26 26 27 std::string msg = "";27 Parameters_test test("Register_translation_unit"); 28 28 29 return msg;29 return test; 30 30 31 31 log_printf(FUNC,Register_translation_unit,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit_allocation.cpp
r81 r82 137 137 ,param_statistics 138 138 #endif 139 ,_param->_param_dependency_checking_unit); 139 ,_param->_param_dependency_checking_unit 140 ,_usage); 140 141 141 142 _component->set_component (_component_dependency_checking_unit->_component … … 155 156 ,param_statistics 156 157 #endif 157 ,_param->_param_free_list_unit); 158 ,_param->_param_free_list_unit 159 ,_usage); 158 160 159 161 _component->set_component (_component_free_list_unit->_component … … 173 175 ,param_statistics 174 176 #endif 175 ,_param->_param_register_address_translation_unit); 177 ,_param->_param_register_address_translation_unit 178 ,_usage); 176 179 177 180 _component->set_component (_component_register_address_translation_unit->_component … … 191 194 ,param_statistics 192 195 #endif 193 ,_param->_param_stat_list_unit); 196 ,_param->_param_stat_list_unit 197 ,_usage); 194 198 195 199 _component->set_component (_component_stat_list_unit->_component … … 209 213 ,param_statistics 210 214 #endif 211 ,_param->_param_register_translation_unit_glue); 215 ,_param->_param_register_translation_unit_glue 216 ,_usage); 212 217 213 218 _component->set_component (_component_register_translation_unit_glue->_component -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/SelfTest/src/test.cpp
r81 r82 6 6 * Test 7 7 */ 8 #define NB_ITERATION 256 9 #define CYCLE_MAX (128*NB_ITERATION) 8 10 9 11 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/SelfTest/include/test.h" … … 12 14 #include "Behavioural/include/Allocation.h" 13 15 14 #define NB_ITERATION 25615 #define CYCLE_MAX (128*NB_ITERATION)16 17 #define LABEL(str...) \18 { \19 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \20 msg (str); \21 msg (_("\n")); \22 } while(0)23 24 #define SC_START(cycle_offset) \25 do \26 { \27 /*cout << "SC_START (begin)" << endl;*/ \28 \29 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \30 if (cycle_offset != 0) \31 { \32 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \33 } \34 \35 if (cycle_current > CYCLE_MAX) \36 { \37 TEST_KO("Maximal cycles Reached"); \38 } \39 \40 sc_start(cycle_offset); \41 \42 /*cout << "SC_START (end )" << endl;*/ \43 } while(0)44 45 16 void test (string name, 46 17 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::rename_select::Parameters * _param) … … 52 23 #endif 53 24 54 Rename_select * _Rename_select = new Rename_select (name.c_str(), 25 Rename_select * _Rename_select = new Rename_select 26 (name.c_str(), 55 27 #ifdef STATISTICS 56 28 _parameters_statistics, 57 29 #endif 58 _param); 30 _param, 31 USE_ALL); 59 32 60 33 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/include/Parameters.h
r81 r82 58 58 public : ~Parameters () ; 59 59 60 public : std::stringmsg_error (void);60 public : Parameters_test msg_error (void); 61 61 62 public : std::string print (uint32_t depth);63 public : friend std::ostream& operator<< (std::ostream& output_stream,64 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::rename_select::Parameters & x);62 public : std::string print (uint32_t depth); 63 public : friend std::ostream& operator<< (std::ostream& output_stream, 64 morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::rename_select::Parameters & x); 65 65 }; 66 66 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/include/Rename_select.h
r81 r82 134 134 #endif 135 135 Parameters * param, 136 morpheo::behavioural::Tusage_t usage =USE_ALL136 morpheo::behavioural::Tusage_t usage 137 137 ); 138 138 public : ~Rename_select (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Parameters_msg_error.cpp
r81 r82 21 21 #undef FUNCTION 22 22 #define FUNCTION "Rename_select::msg_error" 23 std::stringParameters::msg_error(void)23 Parameters_test Parameters::msg_error(void) 24 24 { 25 25 log_printf(FUNC,Rename_select,FUNCTION,"Begin"); 26 26 27 std::string msg = "";27 Parameters_test test("Rename_select"); 28 28 29 29 if ((_nb_front_end_select == 0) or 30 30 (_nb_front_end_select > _nb_front_end)) 31 msg += " - nb_front_end_select must be in [1:nb_front_end].\n";31 test.error(_("nb_front_end_select must be in [1:nb_front_end].\n")); 32 32 33 33 if ((_priority != PRIORITY_STATIC) and 34 34 (_priority != PRIORITY_ROUND_ROBIN)) 35 msg += " - Unsupported priority scheme. Supported scheme are : "+toString(PRIORITY_STATIC)+" and "+toString(PRIORITY_ROUND_ROBIN)+".\n";35 test.error(toString(_("Unsupported priority scheme. Supported scheme are : %s and %s.\n"),toString(PRIORITY_STATIC).c_str(),toString(PRIORITY_ROUND_ROBIN).c_str())); 36 36 37 37 if ((_load_balancing != LOAD_BALANCING_BALANCE) and 38 38 (_load_balancing != LOAD_BALANCING_MAXIMUM_FOR_PRIORITY)) 39 msg += " - Unsupported load_balancing scheme. Supported scheme are : "+toString(LOAD_BALANCING_BALANCE)+" and "+toString(LOAD_BALANCING_MAXIMUM_FOR_PRIORITY)+".\n";39 test.error(toString(_("Unsupported load_balancing scheme. Supported scheme are : %s and %s.\n"),toString(LOAD_BALANCING_BALANCE).c_str(),toString(LOAD_BALANCING_MAXIMUM_FOR_PRIORITY).c_str())); 40 40 41 return msg;41 return test; 42 42 43 43 log_printf(FUNC,Rename_select,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/include/Random.h
r81 r82 34 34 public : custom_execute_transition_t * get_custom_execute_transition (void); 35 35 public : custom_execute_transition_t * get_custom_execute_reset (void); 36 37 private : static void function_transition 38 (morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_register_t * reg, 39 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_param_t * param); 36 40 37 private : static void Random::function_transition (morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_register_t * reg, 38 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_param_t * param); 39 private : static void Random::function_reset (morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_register_t * reg, 40 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_param_t * param); 41 }; 41 private : static void function_reset 42 (morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_register_t * reg, 43 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_param_t * param); 44 }; 42 45 43 46 }; // end namespace random -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/test.cpp
r81 r82 8 8 9 9 #define NB_ITERATION 1024 10 #define CYCLE_MAX 1024*NB_ITERATION 10 11 11 12 #include "Behavioural/Generic/Counter/SelfTest/include/test.h" … … 40 41 param_stat, 41 42 #endif 42 param); 43 param, 44 USE_ALL); 43 45 44 46 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h
r81 r82 26 26 #endif 27 27 #include "Behavioural/include/Component.h" 28 #include "Behavioural/include/Usage.h" 28 29 29 30 namespace morpheo { … … 39 40 // -----[ fields ]---------------------------------------------------- 40 41 // Parameters 41 protected : const std::string 42 43 pr otected : const Parameters _param;42 protected : const std::string _name; 43 protected : const Parameters _param; 44 private : const Tusage_t _usage; 44 45 45 46 #ifdef STATISTICS … … 78 79 morpheo::behavioural::Parameters_Statistics * param_statistics, 79 80 #endif 80 Parameters param ); 81 Parameters param, 82 Tusage_t usage); 81 83 82 84 public : Counter (Parameters param ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter.cpp
r81 r82 14 14 15 15 16 Counter::Counter 17 ( 16 18 #ifdef SYSTEMC 17 Counter::Counter (sc_module_name name,19 sc_module_name name, 18 20 #else 19 Counter::Counter (string name,21 std::string name, 20 22 #endif 21 23 #ifdef STATISTICS 22 24 morpheo::behavioural::Parameters_Statistics * param_statistics, 23 25 #endif 24 morpheo::behavioural::generic::counter::Parameters param ): 25 _name (name) 26 ,_param (param) 26 morpheo::behavioural::generic::counter::Parameters param, 27 Tusage_t usage): 28 _name (name), 29 _param (param), 30 _usage (usage) 27 31 { 28 32 log_printf(FUNC,Counter,"Counter","Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp
r81 r82 14 14 namespace counter { 15 15 16 17 16 void Counter::allocation (void) 18 17 { 19 18 log_printf(FUNC,Counter,"allocation","Begin"); 20 19 21 _component = new Component ( );20 _component = new Component (_usage); 22 21 23 22 Entity * entity = _component->set_entity (_name -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #include "Behavioural/Generic/Queue/SelfTest/include/test.h"10 #include "Common/include/Test.h"11 12 9 #define NB_ITERATION 1 13 10 #define CYCLE_MAX (2048*NB_ITERATION) 14 11 15 #define LABEL(str) \ 16 { \ 17 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \ 18 } while(0) 19 20 static uint32_t cycle = 0; 21 22 #define SC_START(cycle_offset) \ 23 do \ 24 { \ 25 /*cout << "SC_START (begin)" << endl;*/ \ 26 \ 27 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \ 28 if (cycle_current != cycle) \ 29 { \ 30 cycle = cycle_current; \ 31 cout << "##########[ cycle "<< cycle << " ]" << endl; \ 32 } \ 33 \ 34 if (cycle_current > CYCLE_MAX) \ 35 { \ 36 TEST_KO("Maximal cycles Reached"); \ 37 } \ 38 sc_start(cycle_offset); \ 39 /*cout << "SC_START (end )" << endl;*/ \ 40 } while(0) 12 #include "Behavioural/Generic/Queue/SelfTest/include/test.h" 13 #include "Common/include/Test.h" 41 14 42 15 void test (string name, … … 49 22 #endif 50 23 51 Queue * _Queue = new Queue (name.c_str(), 24 Queue * _Queue = new Queue 25 (name.c_str(), 52 26 #ifdef STATISTICS 53 27 _parameters_statistics, 54 28 #endif 55 _param); 29 _param, 30 USE_ALL); 56 31 57 32 #ifdef SYSTEMC … … 121 96 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) 122 97 { 123 LABEL("Iteration "+toString(iteration));98 LABEL("Iteration %d",iteration); 124 99 125 100 while (data_out <= nb_request) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/include/Queue.h
r81 r82 102 102 #endif 103 103 Parameters * param, 104 morpheo::behavioural::Tusage_t usage =USE_ALL104 morpheo::behavioural::Tusage_t usage 105 105 ); 106 106 public : ~Queue (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/src/test.cpp
r81 r82 8 8 9 9 #define NB_ITERATION 16 10 10 #define CYCLE_MAX 1024*NB_ITERATION 11 11 #include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/include/test.h" 12 12 #include "Common/include/Test.h" … … 36 36 morpheo::behavioural::Parameters_Statistics * _param_stat = new morpheo::behavioural::Parameters_Statistics (5,100); 37 37 #endif 38 RegisterFile_Monolithic * registerfile = new RegisterFile_Monolithic (name.c_str() 38 RegisterFile_Monolithic * registerfile = new RegisterFile_Monolithic 39 (name.c_str() 39 40 #ifdef STATISTICS 40 41 ,_param_stat 41 42 #endif 42 ,_param); 43 ,_param 44 ,USE_ALL); 43 45 44 46 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h
r81 r82 105 105 #endif 106 106 ,Parameters * param 107 ,morpheo::behavioural::Tusage_t usage =USE_ALL107 ,morpheo::behavioural::Tusage_t usage 108 108 ); 109 109 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h
r81 r82 17 17 namespace registerfile_monolithic { 18 18 19 typedef uint32_t Taddress_t;19 // typedef uint32_t Taddress_t; 20 20 typedef uint32_t Tdata_t; 21 21 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/src/test.cpp
r81 r82 13 13 #include "Common/include/Test.h" 14 14 15 16 #define LABEL(str) \17 { \18 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \19 } while(0)20 21 #define SC_START(cycle) \22 do \23 { \24 if (static_cast<uint32_t>(sc_simulation_time()) > CYCLE_MAX) \25 { \26 TEST_KO("Maximal cycles Reached"); \27 } \28 sc_start(cycle); \29 } while(0)30 31 15 void test (string name, 32 16 morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * _param) … … 39 23 #endif 40 24 41 RegisterFile_Multi_Banked * _RegisterFile_Multi_Banked = new RegisterFile_Multi_Banked (name.c_str(), 25 RegisterFile_Multi_Banked * _RegisterFile_Multi_Banked = new RegisterFile_Multi_Banked 26 (name.c_str(), 42 27 #ifdef STATISTICS 43 28 _param_stat, 44 29 #endif 45 _param); 30 _param, 31 USE_ALL); 46 32 47 33 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h
r81 r82 26 26 #include "Behavioural/include/Vhdl.h" 27 27 #endif 28 #include "Behavioural/include/Usage.h" 28 29 29 30 namespace morpheo { … … 41 42 // -----[ fields ]---------------------------------------------------- 42 43 // Parameters 43 protected : const std::string _name; 44 44 protected : const std::string _name; 45 45 protected : const Parameters * _param; 46 46 private : const Tusage_t _usage; 47 47 48 #ifdef STATISTICS 48 49 public : Stat * _stat; … … 100 101 morpheo::behavioural::Parameters_Statistics * param_statistics, 101 102 #endif 102 Parameters * param ); 103 Parameters * param, 104 Tusage_t usage); 103 105 104 106 public : ~RegisterFile_Multi_Banked (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h
r81 r82 18 18 namespace registerfile_multi_banked { 19 19 20 20 //typedef uint32_t Taddress_t; 21 21 typedef uint32_t Tdata_t; 22 22 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked.cpp
r81 r82 14 14 namespace registerfile_multi_banked { 15 15 16 16 RegisterFile_Multi_Banked::RegisterFile_Multi_Banked 17 ( 17 18 #ifdef SYSTEMC 18 RegisterFile_Multi_Banked::RegisterFile_Multi_Banked (sc_module_name name,19 sc_module_name name, 19 20 #else 20 RegisterFile_Multi_Banked::RegisterFile_Multi_Banked (string name,21 std::string name, 21 22 #endif 22 23 #ifdef STATISTICS 23 24 morpheo::behavioural::Parameters_Statistics * param_statistics, 24 25 #endif 25 morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * param ): 26 _name (name) 27 ,_param (param) 26 morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * param, 27 Tusage_t usage): 28 _name (name) 29 ,_param (param) 30 ,_usage (usage) 28 31 { 29 32 log_printf(FUNC,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_allocation.cpp
r81 r82 20 20 log_printf(FUNC,RegisterFile_Multi_Banked,"allocation","Begin"); 21 21 22 _component = new Component ( );22 _component = new Component (_usage); 23 23 24 24 Entity * entity = _component->set_entity (_name -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 1 10 #define CYCLE_MAX (256*NB_ITERATION) 11 9 12 #include "Behavioural/Generic/RegisterFile/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 12 #define NB_ITERATION 113 #define CYCLE_MAX (256*NB_ITERATION)14 15 #define LABEL(str) \16 { \17 cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \18 } while(0)19 20 #define SC_START(cycle) \21 do \22 { \23 if (static_cast<uint32_t>(sc_simulation_time()) > CYCLE_MAX) \24 { \25 TEST_KO("Maximal cycles Reached"); \26 } \27 sc_start(cycle); \28 } while(0)29 14 30 15 void test (string name, … … 41 26 _param_stat, 42 27 #endif 43 _param); 28 _param, 29 USE_ALL); 44 30 45 31 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/include/RegisterFile.h
r81 r82 29 29 #include "Behavioural/include/Vhdl.h" 30 30 #endif 31 #include "Behavioural/include/Usage.h" 31 32 32 33 namespace morpheo { … … 43 44 // -----[ fields ]---------------------------------------------------- 44 45 // Parameters 45 protected : const std::string _name; 46 46 protected : const std::string _name; 47 47 protected : const Parameters * _param; 48 private : const Tusage_t _usage; 48 49 49 50 #ifdef STATISTICS … … 95 96 morpheo::behavioural::Parameters_Statistics * param_statistics, 96 97 #endif 97 Parameters * param ); 98 Parameters * param , 99 Tusage_t usage); 98 100 99 101 public : ~RegisterFile (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile.cpp
r81 r82 14 14 15 15 16 RegisterFile::RegisterFile ( 16 17 #ifdef SYSTEMC 17 RegisterFile::RegisterFile (sc_module_name name,18 sc_module_name name, 18 19 #else 19 RegisterFile::RegisterFile (string name,20 std::string name, 20 21 #endif 21 22 #ifdef STATISTICS 22 23 morpheo::behavioural::Parameters_Statistics * param_statistics, 23 24 #endif 24 morpheo::behavioural::generic::registerfile::Parameters * param ): 25 _name (name) 26 ,_param (param) 25 morpheo::behavioural::generic::registerfile::Parameters * param, 26 Tusage_t usage): 27 _name (name) 28 ,_param (param) 29 ,_usage (usage) 27 30 { 28 31 log_printf(FUNC,RegisterFile,"RegisterFile","Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile_allocation.cpp
r81 r82 87 87 #endif 88 88 ,_param->_param_registerfile_monolithic 89 );89 ,_usage); 90 90 91 91 } … … 98 98 #endif 99 99 ,_param->_param_registerfile_multi_banked 100 );100 ,_usage); 101 101 102 102 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/test.cpp
r81 r82 8 8 9 9 #define NB_ITERATION 512 10 #define CYCLE_MAX (1024*NB_ITERATION) 10 11 11 12 #include "Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/include/test.h" … … 21 22 morpheo::behavioural::Parameters_Statistics * _param_stat = new morpheo::behavioural::Parameters_Statistics (5,50); 22 23 #endif 23 Select_Priority_Fixed * _Select_Priority_Fixed = new Select_Priority_Fixed (name.c_str(), 24 Select_Priority_Fixed * _Select_Priority_Fixed = new Select_Priority_Fixed 25 (name.c_str(), 24 26 #ifdef STATISTICS 25 27 _param_stat, 26 28 #endif 27 _param); 29 _param, 30 USE_ALL); 28 31 29 32 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h
r81 r82 91 91 #endif 92 92 Parameters * param , 93 morpheo::behavioural::Tusage_t usage =USE_ALL);93 morpheo::behavioural::Tusage_t usage); 94 94 95 95 public : ~Select_Priority_Fixed (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 64 10 #define CYCLE_MAX (1024*NB_ITERATION) 11 9 12 #include "Behavioural/Generic/Shifter/SelfTest/include/test.h" 10 13 #include "Common/include/BitManipulation.h" 11 14 #include "Common/include/Test.h" 12 13 #define NB_ITERATION 6414 15 15 16 void test (string name, … … 41 42 param_stat, 42 43 #endif 43 param); 44 ¶m, 45 USE_ALL); 44 46 45 47 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Parameters.h
r81 r82 59 59 public : ~Parameters () ; 60 60 61 public : std::stringmsg_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);61 public : Parameters_test 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); 65 65 }; 66 66 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Shifter.h
r81 r82 25 25 #endif 26 26 #include "Behavioural/include/Component.h" 27 #include "Behavioural/include/Usage.h" 27 28 28 29 namespace morpheo { … … 39 40 // -----[ fields ]---------------------------------------------------- 40 41 // Parameters 41 protected : const std::string _name; 42 protected : const std::string _name; 43 protected : const Parameters * _param; 44 private : const Tusage_t _usage; 42 45 43 protected : const Parameters _param;44 46 #ifdef STATISTICS 45 47 public : Stat * _stat; … … 84 86 morpheo::behavioural::Parameters_Statistics * param_statistics, 85 87 #endif 86 Parameters param ); 88 Parameters * param, 89 morpheo::behavioural::Tusage_t usage 90 ); 87 91 88 92 public : Shifter (Parameters param ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters_msg_error.cpp
r81 r82 15 15 namespace shifter { 16 16 17 std::stringParameters::msg_error(void)17 Parameters_test Parameters::msg_error(void) 18 18 { 19 std::string msg = "";19 Parameters_test test ("Shifter"); 20 20 21 21 if (_size_data < 2) 22 { 23 msg += " - size_data must be > 1\n"; 24 msg += " * size_data : " + toString(_size_data) + "\n"; 25 } 26 22 test.error("size_data must be > 1\n"); 23 27 24 if (is_positive(_nb_port) == false) 28 { 29 msg += " - nb_port must be > 0\n"; 30 msg += " * nb_port : " + toString(_nb_port) + "\n"; 31 } 32 25 test.error("nb_port must be > 0\n"); 26 33 27 if (_shift_value > _size_data) 34 { 35 msg += " - shift_value must be < size_data\n"; 36 msg += " * shift_value : " + toString(_shift_value) + "\n"; 37 msg += " * size_data : " + toString(_size_data) + "\n"; 38 } 39 28 test.error("shift_value must be < size_data\n"); 29 40 30 if ( (_rotate == internal_rotate) && (_carry != internal_logic)) 41 { 42 msg += " - Incompatible parameters : internal_rotate have never carry (must be set at \"internal_logic\"\n"; 43 msg += " * rotate : " + toString(_rotate) + "\n"; 44 msg += " * carry : " + toString(_carry ) + "\n"; 45 } 46 31 test.error("Incompatible parameters : internal_rotate have never carry (must be set at \"internal_logic\"\n"); 32 47 33 if (_type_completion_bool && (_size_data_completion != 1)) 48 { 49 msg += " - Incompatible parameters : you can't have the type of port in_SHIFTER_COMPLETION at bool. Because, This port must be more bits\n"; 50 msg += " * size_data_completion : " + toString (_size_data_completion) + "\n"; 51 } 34 test.error("Incompatible parameters : you can't have the type of port in_SHIFTER_COMPLETION at bool. Because, This port must be more bits\n"); 52 35 53 return msg;36 return test; 54 37 }; 55 38 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter.cpp
r81 r82 14 14 15 15 16 Shifter::Shifter ( 16 17 #ifdef SYSTEMC 17 Shifter::Shifter (sc_module_name name18 sc_module_name name 18 19 #else 19 Shifter::Shifter (string name20 std::string name 20 21 #endif 21 22 #ifdef STATISTICS 22 23 ,morpheo::behavioural::Parameters_Statistics * param_statistics 23 24 #endif 24 ,morpheo::behavioural::generic::shifter::Parameters param ): 25 _name (name) 26 ,_param (param) 25 ,morpheo::behavioural::generic::shifter::Parameters *param 26 ,morpheo::behavioural::Tusage_t usage ): 27 _name (name) 28 ,_param (param) 29 ,_usage (usage) 27 30 { 28 31 #ifdef SYSTEMC … … 50 53 dont_initialize (); 51 54 sensitive << (*(in_CLOCK)).neg(); 52 for (uint32_t i=0; i<param ._nb_port; i++)55 for (uint32_t i=0; i<param->_nb_port; i++) 53 56 { 54 57 sensitive << (*(in_SHIFTER_DATA [i])); 55 if (param ._shift_value == 0)58 if (param->_shift_value == 0) 56 59 sensitive << (*(in_SHIFTER_SHIFT [i])); 57 if (param ._direction == external_direction)60 if (param->_direction == external_direction) 58 61 sensitive << (*(in_SHIFTER_DIRECTION [i])); 59 if (_param ._rotate == external_rotate)62 if (_param->_rotate == external_rotate) 60 63 sensitive << (*(in_SHIFTER_TYPE [i])); 61 if (param ._carry == external_carry)64 if (param->_carry == external_carry) 62 65 sensitive << (*(in_SHIFTER_CARRY [i])); 63 if (param ._carry == external_completion)64 if (_param ._type_completion_bool == true)66 if (param->_carry == external_completion) 67 if (_param->_type_completion_bool == true) 65 68 sensitive << (*(in_SHIFTER_CARRY_IN [i])); 66 69 else … … 70 73 #ifdef SYSTEMCASS_SPECIFIC 71 74 // List dependency information 72 for (uint32_t i=0; i<param ._nb_port; i++)75 for (uint32_t i=0; i<param->_nb_port; i++) 73 76 { 74 77 (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_DATA [i])); 75 if (param ._shift_value == 0)78 if (param->_shift_value == 0) 76 79 (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_SHIFT [i])); 77 if (param ._direction == external_direction)80 if (param->_direction == external_direction) 78 81 (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_DIRECTION [i])); 79 if (_param ._rotate == external_rotate)82 if (_param->_rotate == external_rotate) 80 83 (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_TYPE [i])); 81 if (param ._carry == external_carry)84 if (param->_carry == external_carry) 82 85 (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_CARRY [i])); 83 if (param ._carry == external_completion)84 if (_param ._type_completion_bool == true)86 if (param->_carry == external_completion) 87 if (_param->_type_completion_bool == true) 85 88 (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_CARRY_IN [i])); 86 89 else -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_allocation.cpp
r81 r82 17 17 void Shifter::allocation (void) 18 18 { 19 _component = new Component ( );19 _component = new Component (_usage); 20 20 21 21 Entity * entity = _component->set_entity (_name … … 45 45 { 46 46 // Interface "shifter" 47 in_SHIFTER_DATA = new SC_IN (Tdata_t) * [_param ._nb_port];48 if (_param ._shift_value == 0)49 in_SHIFTER_SHIFT = new SC_IN (Tshift_t) * [_param ._nb_port];50 if (_param ._direction == external_direction)51 in_SHIFTER_DIRECTION = new SC_IN (Tdirection_t) * [_param ._nb_port];52 if (_param ._rotate == external_rotate)53 in_SHIFTER_TYPE = new SC_IN (Ttype_t) * [_param ._nb_port];54 if (_param ._carry == external_carry)55 in_SHIFTER_CARRY = new SC_IN (Tcarry_t) * [_param ._nb_port];56 if (_param ._carry == external_completion)57 if (_param ._type_completion_bool == true)58 in_SHIFTER_CARRY_IN = new SC_IN (Tcontrol_t) * [_param ._nb_port];47 in_SHIFTER_DATA = new SC_IN (Tdata_t) * [_param->_nb_port]; 48 if (_param->_shift_value == 0) 49 in_SHIFTER_SHIFT = new SC_IN (Tshift_t) * [_param->_nb_port]; 50 if (_param->_direction == external_direction) 51 in_SHIFTER_DIRECTION = new SC_IN (Tdirection_t) * [_param->_nb_port]; 52 if (_param->_rotate == external_rotate) 53 in_SHIFTER_TYPE = new SC_IN (Ttype_t) * [_param->_nb_port]; 54 if (_param->_carry == external_carry) 55 in_SHIFTER_CARRY = new SC_IN (Tcarry_t) * [_param->_nb_port]; 56 if (_param->_carry == external_completion) 57 if (_param->_type_completion_bool == true) 58 in_SHIFTER_CARRY_IN = new SC_IN (Tcontrol_t) * [_param->_nb_port]; 59 59 else 60 in_SHIFTER_COMPLETION= new SC_IN (Tdata_t) * [_param ._nb_port];61 out_SHIFTER_DATA = new SC_OUT(Tdata_t) * [_param ._nb_port];60 in_SHIFTER_COMPLETION= new SC_IN (Tdata_t) * [_param->_nb_port]; 61 out_SHIFTER_DATA = new SC_OUT(Tdata_t) * [_param->_nb_port]; 62 62 63 for (uint32_t i=0; i<_param ._nb_port; i++)63 for (uint32_t i=0; i<_param->_nb_port; i++) 64 64 { 65 65 Interface_fifo * interface = _interfaces->set_interface("shifter_"+toString(i) … … 71 71 ); 72 72 73 in_SHIFTER_DATA [i] = interface->set_signal_in <Tdata_t > ("data" ,_param ._size_data);74 if (_param ._shift_value == 0)75 in_SHIFTER_SHIFT [i] = interface->set_signal_in <Tshift_t > ("shift" ,static_cast<uint32_t>(ceil(log2(_param ._size_data))));76 if (_param ._direction == external_direction)73 in_SHIFTER_DATA [i] = interface->set_signal_in <Tdata_t > ("data" ,_param->_size_data); 74 if (_param->_shift_value == 0) 75 in_SHIFTER_SHIFT [i] = interface->set_signal_in <Tshift_t > ("shift" ,static_cast<uint32_t>(ceil(log2(_param->_size_data)))); 76 if (_param->_direction == external_direction) 77 77 in_SHIFTER_DIRECTION [i] = interface->set_signal_in <Tdirection_t> ("direction" ,1); 78 if (_param ._rotate == external_rotate)78 if (_param->_rotate == external_rotate) 79 79 in_SHIFTER_TYPE [i] = interface->set_signal_in <Ttype_t > ("type" ,1); 80 if (_param ._carry == external_carry)80 if (_param->_carry == external_carry) 81 81 in_SHIFTER_CARRY [i] = interface->set_signal_in <Tcarry_t > ("carry" ,1); 82 if (_param ._carry == external_completion)83 if (_param ._type_completion_bool == true)82 if (_param->_carry == external_completion) 83 if (_param->_type_completion_bool == true) 84 84 in_SHIFTER_CARRY_IN [i] = interface->set_signal_in <Tcontrol_t > ("carry_in" ,1); 85 85 else 86 in_SHIFTER_COMPLETION [i] = interface->set_signal_in <Tdata_t > ("completion",_param ._size_data_completion);87 out_SHIFTER_DATA [i] = interface->set_signal_out <Tdata_t > ("data" ,_param ._size_data);86 in_SHIFTER_COMPLETION [i] = interface->set_signal_in <Tdata_t > ("completion",_param->_size_data_completion); 87 out_SHIFTER_DATA [i] = interface->set_signal_out <Tdata_t > ("data" ,_param->_size_data); 88 88 } 89 89 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_deallocation.cpp
r81 r82 22 22 23 23 delete [] in_SHIFTER_DATA ; 24 if (_param ._shift_value == 0)24 if (_param->_shift_value == 0) 25 25 delete [] in_SHIFTER_SHIFT ; 26 if (_param ._direction == external_direction )26 if (_param->_direction == external_direction ) 27 27 delete [] in_SHIFTER_DIRECTION ; 28 if (_param ._rotate == external_rotate )28 if (_param->_rotate == external_rotate ) 29 29 delete [] in_SHIFTER_TYPE ; 30 if (_param ._carry == external_carry )30 if (_param->_carry == external_carry ) 31 31 delete [] in_SHIFTER_CARRY ; 32 if (_param ._carry == external_completion)33 if (_param ._type_completion_bool == true)32 if (_param->_carry == external_completion) 33 if (_param->_type_completion_bool == true) 34 34 delete [] in_SHIFTER_CARRY_IN ; 35 35 else -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_genMealy_shift.cpp
r81 r82 18 18 void Shifter::genMealy_shift (void) 19 19 { 20 for (uint32_t i=0; i<_param ._nb_port; i++)20 for (uint32_t i=0; i<_param->_nb_port; i++) 21 21 { 22 22 // Read 23 23 Tdata_t data_in = PORT_READ(in_SHIFTER_DATA [i]); 24 24 Tdata_t data_out = data_in; 25 Tshift_t shift_value = _param ._shift_value;25 Tshift_t shift_value = _param->_shift_value; 26 26 if (shift_value == 0) 27 27 shift_value = PORT_READ(in_SHIFTER_SHIFT [i]); 28 28 29 29 Tdirection_t direction; 30 if (_param ._direction == external_direction)30 if (_param->_direction == external_direction) 31 31 direction = PORT_READ(in_SHIFTER_DIRECTION [i]); 32 32 else 33 direction = _param ._internal_direction;33 direction = _param->_internal_direction; 34 34 35 35 Ttype_t type; 36 if (_param ._rotate == external_rotate)36 if (_param->_rotate == external_rotate) 37 37 type = PORT_READ(in_SHIFTER_TYPE [i]); 38 38 else 39 type = _param ._internal_type;39 type = _param->_internal_type; 40 40 41 41 Tcarry_t carry; 42 if (_param ._carry == external_carry)42 if (_param->_carry == external_carry) 43 43 carry = PORT_READ(in_SHIFTER_CARRY [i]); 44 44 else 45 carry = _param ._internal_carry;45 carry = _param->_internal_carry; 46 46 47 47 if (type == _shift) 48 48 { 49 data_out = shift <Tdata_t> (_param ._size_data, data_in, shift_value, direction == _left, carry == _arithmetic);49 data_out = shift <Tdata_t> (_param->_size_data, data_in, shift_value, direction == _left, carry == _arithmetic); 50 50 51 if (_param ._size_data_completion > 0)51 if (_param->_size_data_completion > 0) 52 52 { 53 53 Tdata_t completion; 54 54 55 if (_param ._type_completion_bool == true)55 if (_param->_type_completion_bool == true) 56 56 completion = (PORT_READ(in_SHIFTER_CARRY_IN [i])==true)?1:0; 57 57 else … … 66 66 else 67 67 { 68 mask = gen_mask<Tdata_t> (shift_value) << (_param ._size_data-shift_value);68 mask = gen_mask<Tdata_t> (shift_value) << (_param->_size_data-shift_value); 69 69 } 70 70 … … 73 73 } 74 74 else 75 data_out = rotate <Tdata_t> (_param ._size_data, data_in, shift_value, direction == _left);75 data_out = rotate <Tdata_t> (_param->_size_data, data_in, shift_value, direction == _left); 76 76 77 77 // Write -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_vhdl_body.cpp
r81 r82 17 17 void Shifter::vhdl_body (Vhdl * & vhdl) 18 18 { 19 //uint32_t log2_size_data = static_cast<uint32_t>(ceil(log2(_param ._size_data)));19 //uint32_t log2_size_data = static_cast<uint32_t>(ceil(log2(_param->_size_data))); 20 20 21 21 vhdl->set_body ("-- Compute all case of shift"); 22 22 23 for (uint32_t i=0; i<_param ._nb_port; i++)23 for (uint32_t i=0; i<_param->_nb_port; i++) 24 24 { 25 25 //-----[ Shift logic Left ]-------------------------------------------- 26 if (_param ._have_shift_logic_left)26 if (_param->_have_shift_logic_left) 27 27 vhdl->set_body ("shift_logic_left_"+toString(i)+" <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) sll CONV_INTEGER(shift_"+toString(i)+"));"); 28 28 //-----[ Shift logic Right ]------------------------------------------- 29 if (_param ._have_shift_logic_right)29 if (_param->_have_shift_logic_right) 30 30 vhdl->set_body ("shift_logic_right_"+toString(i)+" <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) srl CONV_INTEGER(shift_"+toString(i)+"));"); 31 31 //-----[ Shift arithmetic Left ]--------------------------------------- 32 if (_param ._have_shift_arithmetic_left)32 if (_param->_have_shift_arithmetic_left) 33 33 vhdl->set_body ("shift_arithmetic_left_"+toString(i)+" <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) sla CONV_INTEGER(shift_"+toString(i)+"));"); 34 34 //-----[ Shift arithmetic Right ]-------------------------------------- 35 if (_param ._have_shift_arithmetic_right)35 if (_param->_have_shift_arithmetic_right) 36 36 vhdl->set_body ("shift_arithmetic_right_"+toString(i)+" <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) sra CONV_INTEGER(shift_"+toString(i)+"));"); 37 37 //-----[ Rotate Left ]------------------------------------------------- 38 if (_param ._have_rotate_left)38 if (_param->_have_rotate_left) 39 39 vhdl->set_body ("rotate_left_"+toString(i)+" <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) rol CONV_INTEGER(shift_"+toString(i)+"));"); 40 40 //-----[ Rotate Right ]------------------------------------------------ 41 if (_param ._have_rotate_right)41 if (_param->_have_rotate_right) 42 42 vhdl->set_body ("rotate_right_"+toString(i)+" <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) ror CONV_INTEGER(shift_"+toString(i)+"));"); 43 43 } 44 44 45 if (_param ._size_data_completion > 0)45 if (_param->_size_data_completion > 0) 46 46 { 47 47 vhdl->set_body (""); 48 48 vhdl->set_body ("-- Mask"); 49 49 50 for (uint32_t i=0; i<_param ._nb_port; i++)50 for (uint32_t i=0; i<_param->_nb_port; i++) 51 51 { 52 52 std::string print_shifter_completion; 53 53 54 if (_param ._type_completion_bool == true)54 if (_param->_type_completion_bool == true) 55 55 print_shifter_completion = "in_SHIFTER_"+toString(i)+"_CARRY_IN"; 56 56 else 57 57 print_shifter_completion = "in_SHIFTER_"+toString(i)+"_COMPLETION"; 58 58 59 if (_param ._size_data == _param._size_data_completion)59 if (_param->_size_data == _param->_size_data_completion) 60 60 { 61 61 vhdl->set_body ("shifter_completion_left_"+toString(i)+" <= "+print_shifter_completion+";"); … … 64 64 else 65 65 { 66 vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param ._size_data-1,_param._size_data_completion)+" <= "+std_logic_others(_param._size_data-_param._size_data_completion,0)+";");67 vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param ._size_data_completion )+" <= "+print_shifter_completion+";");68 69 vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param ._size_data-1,_param._size_data-_param._size_data_completion)+" <= "+print_shifter_completion+";");70 vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param ._size_data-_param._size_data_completion )+" <= "+std_logic_others(_param._size_data-_param._size_data_completion,0)+";");66 vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param->_size_data-1,_param->_size_data_completion)+" <= "+std_logic_others(_param->_size_data-_param->_size_data_completion,0)+";"); 67 vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param->_size_data_completion )+" <= "+print_shifter_completion+";"); 68 69 vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param->_size_data-1,_param->_size_data-_param->_size_data_completion)+" <= "+print_shifter_completion+";"); 70 vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param->_size_data-_param->_size_data_completion )+" <= "+std_logic_others(_param->_size_data-_param->_size_data_completion,0)+";"); 71 71 } 72 72 … … 80 80 vhdl->set_body ("-- Multiplexor"); 81 81 82 for (uint32_t i=0; i<_param ._nb_port; i++)82 for (uint32_t i=0; i<_param->_nb_port; i++) 83 83 { 84 84 vhdl->set_body ("out_SHIFTER_"+toString(i)+"_DATA <="); … … 86 86 87 87 //-----[ Shift arithmetic Left ]--------------------------------------- 88 if (_param ._have_shift_arithmetic_left)89 { 90 bool have_when = false; 91 std::string print_when = ""; 92 std::string print_and = ""; 93 94 if (_param ._direction == external_direction)88 if (_param->_have_shift_arithmetic_left) 89 { 90 bool have_when = false; 91 std::string print_when = ""; 92 std::string print_and = ""; 93 94 if (_param->_direction == external_direction) 95 95 { 96 96 have_when = true; … … 98 98 print_and = " and "; 99 99 } 100 if (_param ._rotate == external_rotate)100 if (_param->_rotate == external_rotate) 101 101 { 102 102 have_when = true; … … 104 104 print_and = " and "; 105 105 } 106 if (_param ._carry == external_carry)106 if (_param->_carry == external_carry) 107 107 { 108 108 have_when = true; … … 117 117 } 118 118 //-----[ Shift arithmetic Right ]-------------------------------------- 119 if (_param ._have_shift_arithmetic_right)120 { 121 bool have_when = false; 122 std::string print_when = ""; 123 std::string print_and = ""; 124 125 if (_param ._direction == external_direction)119 if (_param->_have_shift_arithmetic_right) 120 { 121 bool have_when = false; 122 std::string print_when = ""; 123 std::string print_and = ""; 124 125 if (_param->_direction == external_direction) 126 126 { 127 127 have_when = true; … … 129 129 print_and = " and "; 130 130 } 131 if (_param ._rotate == external_rotate)131 if (_param->_rotate == external_rotate) 132 132 { 133 133 have_when = true; … … 135 135 print_and = " and "; 136 136 } 137 if (_param ._carry == external_carry)137 if (_param->_carry == external_carry) 138 138 { 139 139 have_when = true; … … 148 148 } 149 149 //-----[ Shift logic Left ]-------------------------------------------- 150 if (_param ._have_shift_logic_left)151 { 152 bool have_when = false; 153 std::string print_when = ""; 154 std::string print_and = ""; 155 156 if (_param ._direction == external_direction)150 if (_param->_have_shift_logic_left) 151 { 152 bool have_when = false; 153 std::string print_when = ""; 154 std::string print_and = ""; 155 156 if (_param->_direction == external_direction) 157 157 { 158 158 have_when = true; … … 160 160 print_and = " and "; 161 161 } 162 if (_param ._rotate == external_rotate)162 if (_param->_rotate == external_rotate) 163 163 { 164 164 have_when = true; … … 166 166 print_and = " and "; 167 167 } 168 if (_param ._carry == external_carry)168 if (_param->_carry == external_carry) 169 169 { 170 170 have_when = true; … … 177 177 std::string print_expr_completion; 178 178 179 if (_param ._size_data_completion == 0)179 if (_param->_size_data_completion == 0) 180 180 print_expr_completion = "shift_logic_left_"+toString(i)+" "; 181 181 else … … 186 186 } 187 187 //-----[ Shift logic Right ]------------------------------------------- 188 if (_param ._have_shift_logic_right)189 { 190 bool have_when = false; 191 std::string print_when = ""; 192 std::string print_and = ""; 193 194 if (_param ._direction == external_direction)188 if (_param->_have_shift_logic_right) 189 { 190 bool have_when = false; 191 std::string print_when = ""; 192 std::string print_and = ""; 193 194 if (_param->_direction == external_direction) 195 195 { 196 196 have_when = true; … … 198 198 print_and = " and "; 199 199 } 200 if (_param ._rotate == external_rotate)200 if (_param->_rotate == external_rotate) 201 201 { 202 202 have_when = true; … … 204 204 print_and = " and "; 205 205 } 206 if (_param ._carry == external_carry)206 if (_param->_carry == external_carry) 207 207 { 208 208 have_when = true; … … 215 215 std::string print_expr_completion; 216 216 217 if (_param ._size_data_completion == 0)217 if (_param->_size_data_completion == 0) 218 218 print_expr_completion = "shift_logic_right_"+toString(i); 219 219 else … … 224 224 } 225 225 //-----[ Rotate Left ]------------------------------------------------- 226 if (_param ._have_rotate_left)227 { 228 bool have_when = false; 229 std::string print_when = ""; 230 std::string print_and = ""; 231 232 if (_param ._direction == external_direction)226 if (_param->_have_rotate_left) 227 { 228 bool have_when = false; 229 std::string print_when = ""; 230 std::string print_and = ""; 231 232 if (_param->_direction == external_direction) 233 233 { 234 234 have_when = true; … … 236 236 print_and = " and "; 237 237 } 238 if (_param ._rotate == external_rotate)238 if (_param->_rotate == external_rotate) 239 239 { 240 240 have_when = true; … … 250 250 } 251 251 //-----[ Rotate Right ]------------------------------------------------ 252 if (_param ._have_rotate_right)253 { 254 bool have_when = false; 255 std::string print_when = ""; 256 std::string print_and = ""; 257 258 if (_param ._direction == external_direction)252 if (_param->_have_rotate_right) 253 { 254 bool have_when = false; 255 std::string print_when = ""; 256 std::string print_and = ""; 257 258 if (_param->_direction == external_direction) 259 259 { 260 260 have_when = true; … … 262 262 print_and = " and "; 263 263 } 264 if (_param ._rotate == external_rotate)264 if (_param->_rotate == external_rotate) 265 265 { 266 266 have_when = true; … … 281 281 /* 282 282 //-----[ Shift logic Left ]-------------------------------------------- 283 if (_param ._have_shift_logic_left)283 if (_param->_have_shift_logic_left) 284 284 { 285 285 … … 287 287 288 288 //-----[ Shift logic Right ]------------------------------------------- 289 if (_param ._have_shift_logic_right)289 if (_param->_have_shift_logic_right) 290 290 { 291 291 … … 293 293 294 294 //-----[ Shift arithmetic Left ]--------------------------------------- 295 if (_param ._have_shift_arithmetic_left)295 if (_param->_have_shift_arithmetic_left) 296 296 { 297 297 … … 299 299 300 300 //-----[ Shift arithmetic Right ]-------------------------------------- 301 if (_param ._have_shift_arithmetic_right)301 if (_param->_have_shift_arithmetic_right) 302 302 { 303 303 … … 305 305 306 306 //-----[ Rotate Left ]------------------------------------------------- 307 if (_param ._have_rotate_left)307 if (_param->_have_rotate_left) 308 308 { 309 309 … … 311 311 312 312 //-----[ Rotate Right ]------------------------------------------------ 313 if (_param ._have_rotate_right)313 if (_param->_have_rotate_right) 314 314 { 315 315 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 1024 10 #define CYCLE_MAX (128*NB_ITERATION) 11 9 12 #include "Behavioural/Generic/Sort/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 14 #include "Common/include/BitManipulation.h" 12 15 #include "Behavioural/include/Allocation.h" 13 14 #define NB_ITERATION 102415 #define CYCLE_MAX (128*NB_ITERATION)16 17 #define LABEL(str...) \18 { \19 msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time())); \20 msg (str); \21 msg (_("\n")); \22 } while(0)23 24 #define SC_START(cycle_offset) \25 do \26 { \27 /*cout << "SC_START (begin)" << endl;*/ \28 \29 uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \30 if (cycle_offset != 0) \31 { \32 cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \33 } \34 \35 if (cycle_current > CYCLE_MAX) \36 { \37 TEST_KO("Maximal cycles Reached"); \38 } \39 \40 sc_start(cycle_offset); \41 \42 /*cout << "SC_START (end )" << endl;*/ \43 } while(0)44 45 16 46 17 class entry_t … … 62 33 Sort * _Sort = new Sort (name.c_str(), 63 34 #ifdef STATISTICS 64 35 _parameters_statistics, 65 36 #endif 66 _param); 37 _param, 38 USE_ALL); 67 39 68 40 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/include/Sort.h
r81 r82 91 91 #endif 92 92 Parameters * param, 93 morpheo::behavioural::Tusage_t usage =USE_ALL93 morpheo::behavioural::Tusage_t usage 94 94 ); 95 95 public : ~Sort (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/include/Types.h
r81 r82 16 16 namespace sort { 17 17 18 typedef uint32_t Taddress_t;18 // typedef uint32_t Taddress_t; 19 19 typedef uint32_t Tdata_t; 20 20 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/SelfTest/src/test.cpp
r81 r82 7 7 */ 8 8 9 #define NB_ITERATION 10 10 #define CYCLE_MAX (128*NB_ITERATION) 11 9 12 #include "Behavioural/Generic/Victim/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" 11 14 #include "Behavioural/include/Allocation.h" 12 13 #define NB_ITERATION 1014 #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, … … 53 25 Victim * _Victim = new Victim (name.c_str(), 54 26 #ifdef STATISTICS 55 27 _parameters_statistics, 56 28 #endif 57 _param); 29 _param, 30 USE_ALL); 58 31 59 32 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/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/Generic/Victim/Victim_Pseudo_LRU/SelfTest/include/test.h" 10 13 #include "Common/include/Test.h" … … 39 42 param_stat, 40 43 #endif 41 ¶m); 44 ¶m, 45 USE_ALL); 42 46 43 47 #ifdef SYSTEMC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h
r81 r82 41 41 #endif 42 42 #include "Behavioural/include/Component.h" 43 #include "Behavioural/include/Usage.h" 43 44 44 45 namespace morpheo { … … 55 56 // -----[ fields ]---------------------------------------------------- 56 57 // Parameters 57 protected : const std::string _name; 58 protected : const std::string _name; 59 protected : const Parameters * _param; 60 private : const Tusage_t _usage; 58 61 59 protected : const Parameters * _param;60 62 #ifdef STATISTICS 61 63 public : Stat * _stat; … … 104 106 morpheo::behavioural::Parameters_Statistics * param_statistics, 105 107 #endif 106 Parameters * param ); 108 Parameters * param , 109 morpheo::behavioural::Tusage_t usage); 107 110 108 111 public : Victim_Pseudo_LRU (Parameters param ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU.cpp
r81 r82 14 14 namespace victim_pseudo_lru { 15 15 16 Victim_Pseudo_LRU::Victim_Pseudo_LRU 17 ( 16 18 #ifdef SYSTEMC 17 Victim_Pseudo_LRU::Victim_Pseudo_LRU (sc_module_name name,19 sc_module_name name, 18 20 #else 19 Victim_Pseudo_LRU::Victim_Pseudo_LRU (std::string name,21 std::string name, 20 22 #endif 21 23 #ifdef STATISTICS 22 24 morpheo::behavioural::Parameters_Statistics * param_statistics, 23 25 #endif 24 morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters * param ): 25 _name (name) 26 ,_param (param) 26 morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters * param , 27 morpheo::behavioural::Tusage_t usage): 28 _name (name) 29 ,_param (param) 30 ,_usage (usage) 27 31 { 28 32 log_printf(FUNC,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_allocation.cpp
r81 r82 18 18 void Victim_Pseudo_LRU::allocation (void) 19 19 { 20 _component = new Component ( );20 _component = new Component (_usage); 21 21 22 22 Entity * entity = _component->set_entity (_name -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/include/Types.h
r81 r82 16 16 namespace victim { 17 17 18 typedef uint32_t Taddress_t;18 // typedef uint32_t Taddress_t; 19 19 typedef uint32_t Tentity_t; 20 20 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/include/Victim.h
r81 r82 102 102 #endif 103 103 Parameters * param, 104 morpheo::behavioural::Tusage_t usage =USE_ALL104 morpheo::behavioural::Tusage_t usage 105 105 ); 106 106 public : ~Victim (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim_allocation.cpp
r81 r82 65 65 ,param_statistics 66 66 #endif 67 ,_param->_param_victim_pseudo_lru); 67 ,_param->_param_victim_pseudo_lru 68 ,_usage); 68 69 break; 69 70 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Selftest
r81 r82 37 37 38 38 execute : all_selftest 39 @$(MAKE) $(EXEC_LOG); 39 @\ 40 $(MAKE) $(EXEC_LOG); \ 41 declare -i all_ok=1; \ 42 for i in $(EXEC_LOG); do \ 43 $(GREP) -q "Test OK" $$i; \ 44 declare -i test_ok=$$?; \ 45 $(GREP) -q "Test KO" $$i; \ 46 declare -i test_ko=$$?; \ 47 if $(TEST) $$test_ko -eq 0 -o $$test_ok -ne 0; \ 48 then all_ok=0; \ 49 fi; \ 50 done; \ 51 if $(TEST) $$all_ok -eq 1; \ 52 then echo "-------------------| Test OK"; exit 0; \ 53 else echo "-------------------| Test KO"; exit 1; \ 54 fi; 40 55 41 56 reconfig : … … 117 132 @\ 118 133 $(ECHO) "Execute : $*";\ 119 export SYSTEMC=$(SYSTEMC_$(SIMULATOR)) ; $(EXEC_PREFIX) ./$(DIR_BIN)/$(EXEC).x $(EXEC_PARAMS) $* `$(CAT) $<` &> $@ 120 declare -i count=`$(GREP) -ch "Test OK" $@`; \ 121 declare timing=`$(GREP) -h "Timing" $@`; \ 122 if $(TEST) $$count -ne 0; \ 134 export SYSTEMC=$(SYSTEMC_$(SIMULATOR)) ; $(EXEC_PREFIX) ./$(DIR_BIN)/$(EXEC).x $(EXEC_PARAMS) $* `$(CAT) $<` &> $@; \ 135 declare timing=`$(GREP) -h "Timing" $@`; \ 136 $(GREP) -q "Test OK" $@; \ 137 declare -i test_ok=$$?; \ 138 $(GREP) -q "Test KO" $@; \ 139 declare -i test_ko=$$?; \ 140 if $(TEST) $$test_ko -ne 0 -a $$test_ok -eq 0; \ 123 141 then echo -e " $* ... OK\t$$timing";\ 124 else echo " $* ... KO"; exit 1;\142 else echo " $* ... KO"; \ 125 143 fi; 126 144 … … 128 146 @\ 129 147 $(ECHO) "Execute : $*";\ 130 export SYSTEMC=$(SYSTEMC_$(SIMULATOR)) ; $(EXEC_PREFIX) ./$(DIR_BIN)/$(EXEC).x $(EXEC_PARAMS) $* `$(CAT) $<` &> $@ 131 declare -i count=`$(GREP) -ch "Test OK" $@`; \ 132 if $(TEST) $$count -ne 0; \ 133 then echo " $* ... OK"; \ 134 else echo " $* ... KO"; exit 1; \ 148 export SYSTEMC=$(SYSTEMC_$(SIMULATOR)) ; $(EXEC_PREFIX) ./$(DIR_BIN)/$(EXEC).x $(EXEC_PARAMS) $* `$(CAT) $<` &> $@; \ 149 declare timing=`$(GREP) -h "Timing" $@`; \ 150 $(GREP) -q "Test OK" $@; \ 151 declare -i test_ok=$$?; \ 152 $(GREP) -q "Test KO" $@; \ 153 declare -i test_ko=$$?; \ 154 if $(TEST) $$test_ko -ne 0 -a $$test_ok -eq 0; \ 155 then echo -e " $* ... OK\t$$timing";\ 156 else echo " $* ... KO"; \ 135 157 fi; 136 158 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.flags
r81 r82 6 6 7 7 #-----[ Simulator ]---------------------------------------- 8 SIMULATOR = systemcass _deps8 SIMULATOR = systemcass 9 9 #SIMULATOR = systemc 10 10 … … 23 23 # -DVHDL_TESTBENCH_ASSERT \ 24 24 # -DPOSITION \ 25 # -DNO_TRANSLAT E\25 # -DNO_TRANSLATION \ 26 26 27 27 # Flags : … … 39 39 # * Dynamique : at the runtime 40 40 # * consomation 41 # NO_TRANSLAT E- No translate message41 # NO_TRANSLATION - No translate message 42 42 # NO_INIT - No init a lot of register -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/Makefile
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/Makefile.defs
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/Makefile.deps
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/Makefile
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/configuration.cfg
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/include/test.h
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/main.cpp
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/test.cpp
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/Makefile
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/New_Component.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \documentclass[10pt,a4paper,twocolumn]{article} 2 6 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/sty/header.sty
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \def\review{YYYY/MM/DD} 2 6 %\def\review{\number\day/\number\month/\number\year\xspace} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/01_introduction.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \Section{Introduction} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/02_features.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \Section{Features} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/03_description.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \Section{Functional Description} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/04_pinout.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \Section{Pin out} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/05_parameters.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \Section{Parameters} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/06_performance.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \Section{Performance} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/07_details.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \Section{Details} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/08_history.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \Section{Revision History} 2 6 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/root.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \input{\dirdoc/01_introduction} 2 6 \input{\dirdoc/02_features} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/New_Component.h
- Property svn:keywords deleted
r81 r82 13 13 #endif 14 14 15 #include <iostream>16 #include "Common/include/ToString.h"17 #include "Common/include/Debug.h"18 15 16 #include "Behavioural/@DIRECTORY/include/Parameters.h" 19 17 #include "Behavioural/@DIRECTORY/include/Types.h" 20 #include "Behavioural/@DIRECTORY/include/Parameters.h"21 18 #ifdef STATISTICS 22 19 #include "Behavioural/include/Stat.h" … … 27 24 #endif 28 25 #include "Behavioural/include/Usage.h" 26 27 #include "Common/include/ToString.h" 28 #include "Common/include/Debug.h" 29 30 #include <iostream> 29 31 30 32 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/Parameters.h
- Property svn:keywords deleted
r81 r82 9 9 */ 10 10 11 #include "Behavioural/include/Parameters.h" 11 12 #include "Common/include/Debug.h" 12 #include "Behavioural/include/Parameters.h"13 13 14 14 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/Types.h
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component.cpp
- Property svn:keywords deleted
r81 r82 31 31 ,_usage (usage) 32 32 { 33 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");33 log_begin(@COMPONENT,FUNCTION); 34 34 35 35 usage_environment(_usage); 36 36 37 log_printf(INFO,@COMPONENT,FUNCTION, "Allocation");37 log_printf(INFO,@COMPONENT,FUNCTION,_("Allocation")); 38 38 39 39 allocation ( … … 46 46 if (usage_is_set(_usage,USE_STATISTICS)) 47 47 { 48 log_printf(INFO,@COMPONENT,FUNCTION, "Allocation of statistics");48 log_printf(INFO,@COMPONENT,FUNCTION,_("Allocation of statistics")); 49 49 50 50 statistics_allocation(param_statistics); … … 56 56 { 57 57 // generate the vhdl 58 log_printf(INFO,@COMPONENT,FUNCTION, "Generate the vhdl");58 log_printf(INFO,@COMPONENT,FUNCTION,_("Generate the vhdl")); 59 59 60 60 vhdl(); … … 65 65 if (usage_is_set(_usage,USE_SYSTEMC)) 66 66 { 67 log_printf(INFO,@COMPONENT,FUNCTION, "Method - transition");67 log_printf(INFO,@COMPONENT,FUNCTION,_("Method - transition")); 68 68 69 69 SC_METHOD (transition); … … 77 77 #endif 78 78 } 79 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");79 log_end(@COMPONENT,FUNCTION); 80 80 }; 81 81 … … 84 84 @COMPONENT::~@COMPONENT (void) 85 85 { 86 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");86 log_begin(@COMPONENT,FUNCTION); 87 87 88 88 #ifdef STATISTICS … … 93 93 #endif 94 94 95 log_printf(INFO,@COMPONENT,FUNCTION, "Deallocation");95 log_printf(INFO,@COMPONENT,FUNCTION,_("Deallocation")); 96 96 deallocation (); 97 97 98 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");98 log_end(@COMPONENT,FUNCTION); 99 99 }; 100 100 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_allocation.cpp
- Property svn:keywords deleted
r81 r82 8 8 #include "Behavioural/@DIRECTORY/include/@COMPONENT.h" 9 9 #include "Behavioural/include/Allocation.h" 10 #include "Common/include/Max.h" 10 11 11 12 namespace morpheo { … … 24 25 ) 25 26 { 26 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");27 log_begin(@COMPONENT,FUNCTION); 27 28 28 29 _component = new Component (_usage); … … 43 44 ,IN 44 45 ,SOUTH, 45 "Generalist interface"46 _("Generalist interface") 46 47 #endif 47 48 ); … … 57 58 #endif 58 59 59 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");60 log_end(@COMPONENT,FUNCTION); 60 61 }; 61 62 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_deallocation.cpp
- Property svn:keywords deleted
r81 r82 17 17 void @COMPONENT::deallocation (void) 18 18 { 19 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");19 log_begin(@COMPONENT,FUNCTION); 20 20 21 21 if (usage_is_set(_usage,USE_SYSTEMC)) … … 28 28 delete _component; 29 29 30 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");30 log_end(@COMPONENT,FUNCTION); 31 31 }; 32 32 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_end_cycle.cpp
- Property svn:keywords deleted
r81 r82 17 17 void @COMPONENT::end_cycle () 18 18 { 19 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");19 log_begin(@COMPONENT,FUNCTION); 20 20 21 21 #ifdef STATISTICS … … 31 31 #endif 32 32 33 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");33 log_end(@COMPONENT,FUNCTION); 34 34 }; 35 35 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_statistics_allocation.cpp
- Property svn:keywords deleted
r81 r82 17 17 void @COMPONENT::statistics_allocation (morpheo::behavioural::Parameters_Statistics * param_statistics) 18 18 { 19 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");19 log_begin(@COMPONENT,FUNCTION); 20 20 21 21 _stat = new Stat (static_cast<std::string>(_name), … … 23 23 param_statistics); 24 24 25 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");25 log_end(@COMPONENT,FUNCTION); 26 26 }; 27 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_statistics_deallocation.cpp
- Property svn:keywords deleted
r81 r82 17 17 void @COMPONENT::statistics_deallocation (void) 18 18 { 19 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");19 log_begin(@COMPONENT,FUNCTION); 20 20 21 log_printf(INFO,@COMPONENT,FUNCTION, "Generate Statistics file");21 log_printf(INFO,@COMPONENT,FUNCTION,_("Generate Statistics file")); 22 22 23 23 delete _stat; 24 24 25 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");25 log_end(@COMPONENT,FUNCTION); 26 26 }; 27 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_transition.cpp
- Property svn:keywords deleted
r81 r82 17 17 void @COMPONENT::transition (void) 18 18 { 19 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");19 log_begin(@COMPONENT,FUNCTION); 20 20 21 21 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) … … 23 23 #endif 24 24 25 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");25 log_end(@COMPONENT,FUNCTION); 26 26 }; 27 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_vhdl.cpp
- Property svn:keywords deleted
r81 r82 18 18 void @COMPONENT::vhdl (void) 19 19 { 20 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");20 log_begin(@COMPONENT,FUNCTION); 21 21 22 22 Vhdl * vhdl = new Vhdl (_name); … … 32 32 delete vhdl; 33 33 34 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");34 log_end(@COMPONENT,FUNCTION); 35 35 }; 36 36 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_vhdl_body.cpp
- Property svn:keywords deleted
r81 r82 17 17 void @COMPONENT::vhdl_body (Vhdl * & vhdl) 18 18 { 19 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");19 log_begin(@COMPONENT,FUNCTION); 20 20 vhdl->set_body (""); 21 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");21 log_end(@COMPONENT,FUNCTION); 22 22 }; 23 23 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_vhdl_declaration.cpp
- Property svn:keywords deleted
r81 r82 17 17 void @COMPONENT::vhdl_declaration (Vhdl * & vhdl) 18 18 { 19 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");20 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");19 log_begin(@COMPONENT,FUNCTION); 20 log_end(@COMPONENT,FUNCTION); 21 21 }; 22 22 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters.cpp
- Property svn:keywords deleted
r81 r82 16 16 Parameters::Parameters () 17 17 { 18 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");18 log_begin(@COMPONENT,FUNCTION); 19 19 test(); 20 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");20 log_end(@COMPONENT,FUNCTION); 21 21 }; 22 22 … … 25 25 // Parameters::Parameters (Parameters & param) 26 26 // { 27 // log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");27 // log_begin(@COMPONENT,FUNCTION); 28 28 // test(); 29 // log_ printf(FUNC,@COMPONENT,FUNCTION,"End");29 // log_end(@COMPONENT,FUNCTION); 30 30 // }; 31 31 … … 34 34 Parameters::~Parameters () 35 35 { 36 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");37 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");36 log_begin(@COMPONENT,FUNCTION); 37 log_end(@COMPONENT,FUNCTION); 38 38 }; 39 39 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters_msg_error.cpp
- Property svn:keywords deleted
r81 r82 18 18 Parameters_test Parameters::msg_error(void) 19 19 { 20 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");20 log_begin(@COMPONENT,FUNCTION); 21 21 22 22 Parameters_test test ("@COMPONENT"); 23 23 24 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");24 log_end(@COMPONENT,FUNCTION); 25 25 26 26 return test; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters_print.cpp
- Property svn:keywords deleted
r81 r82 17 17 std::string Parameters::print (uint32_t depth) 18 18 { 19 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");19 log_begin(@COMPONENT,FUNCTION); 20 20 21 21 XML xml ("@COMPONENT_LOWER"); … … 25 25 xml.balise_close(); 26 26 27 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");27 log_end(@COMPONENT,FUNCTION); 28 28 29 29 return xml.get_body(depth); … … 35 35 morpheo::behavioural::@NAMESPACE_USE::Parameters & x) 36 36 { 37 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");37 log_begin(@COMPONENT,FUNCTION); 38 38 39 39 output_stream << x.print(0); 40 40 41 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");41 log_end(@COMPONENT,FUNCTION); 42 42 43 43 return output_stream; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/Makefile
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/Makefile.defs
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/Makefile.deps
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/Makefile
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/configuration.cfg
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/include/test.h
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/main.cpp
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/test.cpp
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/Makefile
- Property svn:keywords deleted
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/New_Component.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \documentclass[10pt,a4paper,twocolumn]{article} 2 6 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/sty/header.sty
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \def\review{YYYY/MM/DD} 2 6 %\def\review{\number\day/\number\month/\number\year\xspace} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/01_introduction.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \Section{Introduction} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/02_features.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \Section{Features} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/03_description.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \Section{Functional Description} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/04_pinout.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \Section{Pin out} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/05_parameters.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \Section{Parameters} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/06_performance.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \Section{Performance} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/07_details.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \Section{Details} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/08_history.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \Section{Revision History} 2 6 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/root.tex
- Property svn:keywords deleted
r81 r82 1 %------------------------------------------------------------------------------ 2 % $Id$ 3 %------------------------------------------------------------------------------ 4 1 5 \input{\dirdoc/01_introduction} 2 6 \input{\dirdoc/02_features} -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/include/New_Component.h
- Property svn:keywords deleted
r81 r82 13 13 #endif 14 14 15 #include <iostream> 16 #include "Common/include/ToString.h" 17 #include "Common/include/Debug.h" 15 #include "Behavioural/@DIRECTORY/include/Parameters.h" 18 16 #include "Behavioural/include/Types.h" 19 17 20 #include "Behavioural/@DIRECTORY/include/Parameters.h"21 18 #ifdef STATISTICS 22 19 #include "Behavioural/include/Stat.h" … … 27 24 #endif 28 25 #include "Behavioural/include/Usage.h" 26 27 #include "Common/include/ToString.h" 28 #include "Common/include/Debug.h" 29 30 #include <iostream> 29 31 30 32 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/include/Parameters.h
- Property svn:keywords deleted
r81 r82 9 9 */ 10 10 11 #include "Behavioural/include/Parameters.h" 11 12 #include "Common/include/Debug.h" 12 #include "Behavioural/include/Parameters.h"13 13 14 14 namespace morpheo { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component.cpp
- Property svn:keywords deleted
r81 r82 31 31 ,_usage (usage) 32 32 { 33 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");33 log_begin(@COMPONENT,FUNCTION); 34 34 35 35 usage_environment(_usage); 36 36 37 log_printf(INFO,@COMPONENT,FUNCTION, "Allocation");37 log_printf(INFO,@COMPONENT,FUNCTION,_("Allocation")); 38 38 39 39 allocation ( … … 46 46 if (usage_is_set(_usage,USE_STATISTICS)) 47 47 { 48 log_printf(INFO,@COMPONENT,FUNCTION, "Allocation of statistics");48 log_printf(INFO,@COMPONENT,FUNCTION,_("Allocation of statistics")); 49 49 50 50 statistics_allocation(param_statistics); … … 56 56 { 57 57 // generate the vhdl 58 log_printf(INFO,@COMPONENT,FUNCTION, "Generate the vhdl");58 log_printf(INFO,@COMPONENT,FUNCTION,_("Generate the vhdl")); 59 59 60 60 vhdl(); … … 65 65 if (usage_is_set(_usage,USE_SYSTEMC)) 66 66 { 67 log_printf(INFO,@COMPONENT,FUNCTION, "Method - transition");67 log_printf(INFO,@COMPONENT,FUNCTION,_("Method - transition")); 68 68 69 69 SC_METHOD (transition); … … 77 77 #endif 78 78 } 79 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");79 log_end(@COMPONENT,FUNCTION); 80 80 }; 81 81 … … 84 84 @COMPONENT::~@COMPONENT (void) 85 85 { 86 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");86 log_begin(@COMPONENT,FUNCTION); 87 87 88 88 #ifdef STATISTICS … … 93 93 #endif 94 94 95 log_printf(INFO,@COMPONENT,FUNCTION, "Deallocation");95 log_printf(INFO,@COMPONENT,FUNCTION,_("Deallocation")); 96 96 deallocation (); 97 97 98 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");98 log_end(@COMPONENT,FUNCTION); 99 99 }; 100 100 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_allocation.cpp
- Property svn:keywords deleted
r81 r82 16 16 #undef FUNCTION 17 17 #define FUNCTION "@COMPONENT::allocation" 18 void @COMPONENT::allocation ( 18 void @COMPONENT::allocation 19 ( 19 20 #ifdef STATISTICS 20 21 morpheo::behavioural::Parameters_Statistics * param_statistics 21 22 #else 22 23 void 23 24 #endif 24 25 ) 25 26 { 26 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");27 log_begin@COMPONENT,FUNCTION); 27 28 28 29 _component = new Component (_usage); … … 56 57 std::string src,dest; 57 58 58 59 59 // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 60 _component->test_map(); 60 if (DEBUG_@COMPONENT == true) 61 _component->test_map(); 61 62 62 63 #ifdef POSITION 63 64 if (usage_is_set(_usage,USE_POSITION)) 64 65 _component->generate_file(); 65 66 #endif 66 67 67 log_printf(FUNC,@COMPONENT,FUNCTION,"End");68 log_end(@COMPONENT,FUNCTION); 68 69 }; 69 70 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_deallocation.cpp
- Property svn:keywords deleted
r81 r82 17 17 void @COMPONENT::deallocation (void) 18 18 { 19 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");19 log_begin(@COMPONENT,FUNCTION); 20 20 21 21 if (usage_is_set(_usage,USE_SYSTEMC)) … … 28 28 delete _component; 29 29 30 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");30 log_end(@COMPONENT,FUNCTION); 31 31 }; 32 32 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_end_cycle.cpp
- Property svn:keywords deleted
r81 r82 17 17 void @COMPONENT::end_cycle () 18 18 { 19 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");19 log_begin(@COMPONENT,FUNCTION); 20 20 21 21 #ifdef STATISTICS … … 31 31 #endif 32 32 33 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");33 log_end(@COMPONENT,FUNCTION); 34 34 }; 35 35 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_statistics_allocation.cpp
- Property svn:keywords deleted
r81 r82 17 17 void @COMPONENT::statistics_allocation (morpheo::behavioural::Parameters_Statistics * param_statistics) 18 18 { 19 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");19 log_begin(@COMPONENT,FUNCTION); 20 20 21 21 _stat = new Stat (static_cast<std::string>(_name), … … 23 23 param_statistics); 24 24 25 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");25 log_end(@COMPONENT,FUNCTION); 26 26 }; 27 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_statistics_deallocation.cpp
- Property svn:keywords deleted
r81 r82 17 17 void @COMPONENT::statistics_deallocation (void) 18 18 { 19 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");19 log_begin(@COMPONENT,FUNCTION); 20 20 21 log_printf(INFO,@COMPONENT,FUNCTION, "Generate Statistics file");21 log_printf(INFO,@COMPONENT,FUNCTION,_("Generate Statistics file")); 22 22 23 23 delete _stat; 24 24 25 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");25 log_end(@COMPONENT,FUNCTION); 26 26 }; 27 27 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_transition.cpp
- Property svn:keywords deleted
r81 r82 18 18 void @COMPONENT::transition (void) 19 19 { 20 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");20 log_begin(@COMPONENT,FUNCTION); 21 21 22 22 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) … … 24 24 #endif 25 25 26 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");26 log_end(@COMPONENT,FUNCTION); 27 27 }; 28 28 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_vhdl.cpp
- Property svn:keywords deleted
r81 r82 18 18 void @COMPONENT::vhdl (void) 19 19 { 20 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");20 log_begin(@COMPONENT,FUNCTION); 21 21 22 22 Vhdl * vhdl = new Vhdl (_name); … … 29 29 delete vhdl; 30 30 31 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");31 log_end(@COMPONENT,FUNCTION); 32 32 }; 33 33 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/Parameters.cpp
- Property svn:keywords deleted
r81 r82 16 16 Parameters::Parameters () 17 17 { 18 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");18 log_begin(@COMPONENT,FUNCTION); 19 19 test(); 20 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");20 log_end(@COMPONENT,FUNCTION); 21 21 }; 22 22 … … 25 25 // Parameters::Parameters (Parameters & param) 26 26 // { 27 // log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");27 // log_begin(@COMPONENT,FUNCTION); 28 28 // test(); 29 // log_ printf(FUNC,@COMPONENT,FUNCTION,"End");29 // log_end(@COMPONENT,FUNCTION); 30 30 // }; 31 31 … … 34 34 Parameters::~Parameters () 35 35 { 36 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");37 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");36 log_begin(@COMPONENT,FUNCTION); 37 log_end(@COMPONENT,FUNCTION); 38 38 }; 39 39 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/Parameters_msg_error.cpp
- Property svn:keywords deleted
r81 r82 18 18 Parameters_test Parameters::msg_error(void) 19 19 { 20 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");20 log_begin(@COMPONENT,FUNCTION); 21 21 22 22 Parameters_test test ("@COMPONENT"); 23 23 24 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");24 log_end(@COMPONENT,FUNCTION); 25 25 26 26 return test; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/Parameters_print.cpp
- Property svn:keywords deleted
r81 r82 17 17 std::string Parameters::print (uint32_t depth) 18 18 { 19 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");19 log_begin(@COMPONENT,FUNCTION); 20 20 21 21 XML xml ("@COMPONENT_LOWER"); … … 25 25 xml.balise_close(); 26 26 27 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");27 log_end(@COMPONENT,FUNCTION); 28 28 29 29 return xml.get_body(depth); … … 35 35 morpheo::behavioural::@NAMESPACE_USE::Parameters & x) 36 36 { 37 log_ printf(FUNC,@COMPONENT,FUNCTION,"Begin");37 log_begin(@COMPONENT,FUNCTION); 38 38 39 39 output_stream << x.print(0); 40 40 41 log_ printf(FUNC,@COMPONENT,FUNCTION,"End");41 log_end(@COMPONENT,FUNCTION); 42 42 43 43 return output_stream; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h
r81 r82 1 1 #ifndef morpheo_behavioural_Allocation_h 2 2 #define morpheo_behavioural_Allocation_h 3 4 /* 5 * $Id$ 6 * 7 * [ Description ] 8 * 9 */ 3 10 4 11 #include "Common/include/Debug.h" … … 46 53 { \ 47 54 sig = interface->set_signal_in <type> (name, size); \ 48 } 55 } \ 56 else \ 57 { \ 58 log_printf(INFO,true,FUNCTION,_("%s %s.%s.%s : size is nul."),MSG_INFORMATION,_component->get_name().c_str(),interface->get_name().c_str(),name); \ 59 } 60 49 61 #define ALLOC_SIGNAL_OUT( sig, name, type, size) \ 50 62 if (size > 0) \ 51 63 { \ 52 64 sig = interface->set_signal_out<type> (name, size); \ 65 } \ 66 else \ 67 { \ 68 log_printf(INFO,true,FUNCTION,_("%s %s.%s.%s : size is nul."),MSG_INFORMATION,_component->get_name().c_str(),interface->get_name().c_str(),name); \ 53 69 } 54 70 … … 63 79 64 80 #define INSTANCE_SC_SIGNAL(component, sig) \ 65 (*(component->sig)) (*(sig)); 66 67 #define DELETE_SC_SIGNAL( sig) \ 68 delete sig; 81 { \ 82 TEST_PTR(component->sig); \ 83 TEST_PTR(sig); \ 84 (*(component->sig)) (*(sig)); \ 85 } 86 87 #define DELETE_SC_SIGNAL( sig) \ 88 { \ 89 delete sig; \ 90 } 69 91 70 92 // ---------------------------------------------------------------------- … … 166 188 sig [alloc_signal_it1] = interface[alloc_signal_it1]->set_signal_in <type> (name, size); \ 167 189 } \ 190 else \ 191 { \ 192 log_printf(INFO,true,FUNCTION,_("%s %s.%s.%s : size is nul."),MSG_INFORMATION,_component->get_name().c_str(),interface[alloc_signal_it1]->get_name().c_str(),name); \ 193 } \ 168 194 } \ 169 195 } … … 177 203 { \ 178 204 sig [alloc_signal_it1] = interface[alloc_signal_it1]->set_signal_out<type> (name, size); \ 205 } \ 206 else \ 207 { \ 208 log_printf(INFO,true,FUNCTION,_("%s %s.%s.%s : size is nul."),MSG_INFORMATION,_component->get_name().c_str(),interface[alloc_signal_it1]->get_name().c_str(),name); \ 179 209 } \ 180 210 } \ … … 208 238 for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \ 209 239 { \ 240 TEST_PTR(component->sig [alloc_signal_it1]); \ 241 TEST_PTR(sig [alloc_signal_it1]); \ 210 242 (*(component->sig[alloc_signal_it1])) (*(sig[alloc_signal_it1])); \ 211 243 } … … 330 362 sig [alloc_signal_it1][alloc_signal_it2] = interface[alloc_signal_it1][alloc_signal_it2]->set_signal_in <type> (name, size); \ 331 363 } \ 364 else \ 365 { \ 366 log_printf(INFO,true,FUNCTION,_("%s %s.%s.%s : size is nul."),MSG_INFORMATION,_component->get_name().c_str(),interface[alloc_signal_it1][alloc_signal_it2]->get_name().c_str(),name); \ 367 } \ 332 368 } \ 333 369 } \ … … 345 381 { \ 346 382 sig [alloc_signal_it1][alloc_signal_it2] = interface[alloc_signal_it1][alloc_signal_it2]->set_signal_out <type> (name, size); \ 383 } \ 384 else \ 385 { \ 386 log_printf(INFO,true,FUNCTION,_("%s %s.%s.%s : size is nul."),MSG_INFORMATION,_component->get_name().c_str(),interface[alloc_signal_it1][alloc_signal_it2]->get_name().c_str(),name); \ 347 387 } \ 348 388 } \ … … 393 433 for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \ 394 434 { \ 435 TEST_PTR(component->sig [alloc_signal_it1][alloc_signal_it2]); \ 436 TEST_PTR(sig [alloc_signal_it1][alloc_signal_it2]); \ 395 437 (*(component->sig[alloc_signal_it1][alloc_signal_it2])) (*(sig[alloc_signal_it1][alloc_signal_it2])); \ 396 438 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h
r81 r82 5 5 * $Id$ 6 6 * 7 * [ 7 * [ Description ] 8 8 * 9 9 */ … … 65 65 #define INSTANCE_ALL 0x7 66 66 67 typedef struct68 {69 //public : Component * _component;70 public : Entity * _entity ;71 public : Tinstance_t _instance ;72 } Tcomponent_t;73 74 67 class Component 75 68 { 76 // -----[ fields ]---------------------------------------------------- 69 typedef struct 70 { 71 public : Component * _component; 72 public : Entity * _entity ; 73 public : Tinstance_t _instance ; 74 } Tcomponent_t; 75 76 // -----[ fields ]---------------------------------------------------- 77 77 private : const Tusage_t _usage; 78 78 private : Entity * _entity ; 79 79 private : std::list<Tcomponent_t*> * _list_component; 80 80 81 // -----[ 82 public : Component (Tusage_t usage =USE_ALL);81 // -----[ methods ]--------------------------------------------------- 82 public : Component (Tusage_t usage); 83 83 public : Component (const Component & component); 84 84 public : ~Component (); 85 86 public : std::string get_name (void); 85 87 86 88 public : Entity * set_entity (std::string name … … 124 126 private : bool test_map (uint32_t depth, bool recursive); 125 127 128 // public : bool test_equi (bool recursive=true); 129 // private : bool test_equi (uint32_t depth, bool recursive); 130 126 131 #ifdef POSITION 127 132 public : void interface_map (std::string component_src , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Debug_component.h
r81 r82 43 43 # define DEBUG_Decod_unit false 44 44 # define DEBUG_Decod false 45 # define DEBUG_Decod_queue true 45 46 # define DEBUG_Ifetch_unit false 46 47 # define DEBUG_Address_management false 47 48 # define DEBUG_Ifetch_queue false 48 49 # define DEBUG_Ifetch_unit_Glue false 49 # define DEBUG_Prediction_unit false50 # define DEBUG_Prediction_unit true 50 51 # define DEBUG_Branch_Target_Buffer false 51 52 # define DEBUG_Branch_Target_Buffer_Glue false … … 55 56 # define DEBUG_Meta_Predictor false 56 57 # define DEBUG_Meta_Predictor_Glue false 57 # define DEBUG_Two_Level_Branch_Predictorfalse58 # define DEBUG_Two_Level_Branch_Predictor_Gluefalse59 # define DEBUG_Branch_History_Tablefalse60 # define DEBUG_Pattern_History_Tablefalse61 # define DEBUG_Prediction_unit_Glue true62 # define DEBUG_Return_Address_Stack true58 # define DEBUG_Two_Level_Branch_Predictor false 59 # define DEBUG_Two_Level_Branch_Predictor_Glue false 60 # define DEBUG_Branch_History_Table false 61 # define DEBUG_Pattern_History_Table false 62 # define DEBUG_Prediction_unit_Glue false 63 # define DEBUG_Return_Address_Stack false 63 64 # define DEBUG_Update_Prediction_Table true 64 65 # define DEBUG_Multi_OOO_Engine false -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h
r81 r82 26 26 { 27 27 // -----[ fields ]---------------------------------------------------- 28 private : const std::string 29 private : const std::string 28 private : const std::string _name ; 29 private : const std::string _type ; 30 30 #ifdef POSITION 31 31 private : const schema_t _schema ; … … 36 36 37 37 #ifdef POSITION 38 private : std::string 38 private : std::string _comment ; 39 39 40 40 private : bool _is_map ; … … 51 51 ,schema_t schema 52 52 #endif 53 ,Tusage_t usage =USE_ALL53 ,Tusage_t usage 54 54 ); 55 55 public : Entity (const Entity & entity); 56 56 public : ~Entity (); 57 57 58 public : std::string 59 public : std::string 58 public : std::string get_name (void); 59 public : std::string get_type (void); 60 60 61 61 #ifdef POSITION 62 62 public : void set_comment (std::string comment); 63 private : std::string 63 private : std::string get_comment (void ); 64 64 #endif 65 65 public : Interfaces * set_interfaces (void); 66 private : std::string 66 private : std::string get_interfaces (void); 67 67 public : Interfaces * get_interfaces_list(void); 68 68 … … 78 78 #endif 79 79 80 public : bool test_map (uint32_t depth,bool top_level); 80 public : bool test_map (uint32_t depth,bool top_level, bool is_behavioural); 81 // public : bool test_equi (uint32_t depth); 81 82 82 83 #ifdef POSITION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h
r81 r82 63 63 ,localisation_t localisation 64 64 #endif 65 ,Tusage_t usage =USE_ALL65 ,Tusage_t usage 66 66 ); 67 67 … … 220 220 std::string counter_name , 221 221 std::string reset_name ); 222 public : std::string 222 public : std::string testbench_test (Vhdl * & vhdl , 223 223 std::string counter_name, 224 224 std::string reset_name); 225 public : std::string testbench_test_ok (Vhdl * & vhdl ); 226 protected : std::string testbench_test_name (Vhdl * & vhdl); 227 protected : std::string testbench_test_ok_name(Vhdl * & vhdl); 228 protected : std::string testbench_test_transaction_name(Vhdl * & vhdl); 229 #endif 230 231 public : bool test_map (uint32_t depth, bool top_level); 225 public : std::string testbench_test_ok (Vhdl * & vhdl ); 226 protected : std::string testbench_test_name (Vhdl * & vhdl); 227 protected : std::string testbench_test_ok_name(Vhdl * & vhdl); 228 protected : std::string testbench_test_transaction_name(Vhdl * & vhdl); 229 #endif 230 231 public : bool test_map (uint32_t depth, bool top_level, bool is_behavioural); 232 // public : bool test_equi (uint32_t depth); 232 233 233 234 #ifdef POSITION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface_fifo.h
r81 r82 45 45 ,localisation_t localisation 46 46 #endif 47 ,Tusage_t usage =USE_ALL47 ,Tusage_t usage 48 48 ); 49 49 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h
r81 r82 33 33 // -----[ methods ]--------------------------------------------------- 34 34 public : Interfaces (std::string name, 35 Tusage_t usage =USE_ALL);35 Tusage_t usage); 36 36 public : Interfaces (const Interfaces & interfaces); 37 37 public : ~Interfaces (); … … 80 80 #endif 81 81 82 public : bool test_map (uint32_t depth, bool top_level); 82 public : bool test_map (uint32_t depth, bool top_level, bool is_behavioural); 83 // public : bool test_equi (uint32_t depth); 83 84 84 85 public : friend std::ostream& operator<< (std::ostream& output_stream, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters.h
r81 r82 44 44 45 45 public : bool have_error (void) { return (_error.length() != 0);}; 46 public : void error (std::string str) { _error += "[ ERROR ]<" + _component + "> " + str + "\n";}47 public : void warning (std::string str) { _warning += "[ WARNING ]<" + _component + "> " + str + "\n";}48 public : void information (std::string str) { _information += "[INFORMATION]<" + _component + "> " + str + "\n";}46 public : void error (std::string str) { _error += MSG_ERROR ; _error += " <" + _component + "> " + str + "\n";} 47 public : void warning (std::string str) { _warning += MSG_WARNING ; _warning += " <" + _component + "> " + str + "\n";} 48 public : void information (std::string str) { _information += MSG_INFORMATION; _information += " <" + _component + "> " + str + "\n";} 49 49 public : std::string print (void) { return _error + _warning + _information;}; 50 50 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h
r81 r82 79 79 public : ~Signal (); 80 80 81 public : std::string 81 public : std::string get_name (void); 82 82 public : uint32_t get_size (void); 83 83 public : void set_size (uint32_t size); … … 92 92 public : bool presence_testbench (void); 93 93 94 public : bool test_map (uint32_t depth, bool top_level); 94 public : bool test_map (uint32_t depth, bool top_level, bool is_behavioural); 95 // public : bool test_equi (uint32_t depth); 95 96 96 97 public : void link (Signal * signal_dest, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h
r81 r82 4 4 #include "Common/include/ToString.h" 5 5 6 // Identification : MORPHEO_MAJOR_VERSION.MORPHEO_MINOR_VERSION.MORPHEO_REVISION7 // Revision : svn variable8 9 6 #define MORPHEO_MAJOR_VERSION 0 10 7 #define MORPHEO_MINOR_VERSION 2 11 #define MORPHEO_REVISION 0 12 //$Revision$ 8 #define MORPHEO_REVISION 82 9 10 // Identification : MORPHEO_MAJOR_VERSION.MORPHEO_MINOR_VERSION.MORPHEO_REVISION 13 11 14 12 #define MORPHEO_VERSION morpheo::toString(MORPHEO_MAJOR_VERSION)+"."+morpheo::toString(MORPHEO_MINOR_VERSION)+"."+morpheo::toString(MORPHEO_REVISION) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp
r81 r82 2 2 * $Id$ 3 3 * 4 * [ 4 * [ Description ] 5 5 * 6 6 */ … … 32 32 33 33 if (entity_dest == NULL) 34 throw (E rrorMorpheo ("<Component::port_map> in component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_dest+"\" is unknow."));34 throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_dest+"\" is unknow.\n")); 35 35 36 36 Signal * signal_dest = entity_dest->find_signal (port_dest); 37 37 38 38 if (signal_dest == NULL) 39 throw (E rrorMorpheo ("<Component::port_map> in component \""+name_entity+"\",try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_dest+"\" have not the signal \""+port_dest+"\"."));39 throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\",try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_dest+"\" have not the signal \""+port_dest+"\".\n")); 40 40 41 41 // Second entity … … 43 43 44 44 if (entity_src == NULL) 45 throw (E rrorMorpheo ("<Component::port_map> in component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_src+"\" is unknow."));45 throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_src+"\" is unknow.\n")); 46 46 47 47 Signal * signal_src = entity_src->find_signal (port_src); 48 48 49 49 if (signal_src == NULL) 50 throw (E rrorMorpheo ("<Component::port_map> in component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_src+"\" have not the signal \""+port_src+"\"."));50 throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_src+"\" have not the signal \""+port_src+"\".\n")); 51 51 52 52 // If all is ok, mapping 53 log_printf(TRACE,Behavioural,FUNCTION, "Signal \"%s.%s\"\tlink with \"%s.%s\""53 log_printf(TRACE,Behavioural,FUNCTION, _("Signal \"%s.%s\"\tlink with \"%s.%s\"") 54 54 ,entity_src ->get_name().c_str() 55 55 ,signal_src ->get_name().c_str() … … 62 62 63 63 if (src_is_port == true) 64 throw (E rrorMorpheo ("<Component::port_map> in component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_src+" is the Top_level, and we can't be use interface's port of the top level as a source."));64 throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_src+" is the Top_level, and we can't be use interface's port of the top level as a source.\n")); 65 65 66 66 // 2 cases : … … 106 106 catch (morpheo::ErrorMorpheo & error) 107 107 { 108 throw (ErrorMorpheo ("<Component::port_map> in component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but "+error.what ()));108 throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but "+error.what ())); 109 109 } 110 110 //catch (...) … … 117 117 }; // end namespace behavioural 118 118 }; // end namespace morpheo 119 120 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_print.cpp
r81 r82 2 2 * $Id$ 3 3 * 4 * [ 4 * [ Description ] 5 5 * 6 6 */ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_component.cpp
r81 r82 29 29 Tcomponent_t * entry = new Tcomponent_t; 30 30 31 //entry->_component= component;31 entry->_component= component; 32 32 entry->_instance = instance; 33 33 entry->_entity = entity; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_test_map.cpp
r81 r82 15 15 bool Component::test_map (bool recursive) 16 16 { 17 log_printf(NONE,Behavioural,FUNCTION, "Test port map and interface."); 17 18 return test_map (0, recursive); 18 19 } … … 26 27 bool test_ok = true; 27 28 28 if (_list_component->empty () == true) 29 bool is_behavioural = _list_component->empty (); 30 if (is_behavioural) 29 31 { 30 32 log_printf(NONE,Behavioural,FUNCTION, "%s* Component \"%s\" is a behavioural description",tab.c_str(),name.c_str()); … … 33 35 { 34 36 log_printf(NONE,Behavioural,FUNCTION, "%s* Component \"%s\" is a structural description",tab.c_str(),name.c_str()); 37 } 35 38 36 log_printf(INFO,Behavioural,FUNCTION, "%s* Test port I/O",tab.c_str()); 39 40 // log_printf(NONE,Behavioural,FUNCTION, "%s* Test port I/O",tab.c_str()); 41 42 test_ok &= _entity->test_map(depth+1,true,is_behavioural); 43 44 // log_printf(NONE,Behavioural,FUNCTION, "%s* Test all internal component",tab.c_str()); 37 45 38 test_ok &= _entity->test_map(1,true);39 40 log_printf(INFO,Behavioural,FUNCTION, "%s* Test all internal component",tab.c_str());41 42 for (std::list<Tcomponent_t *>::iterator i= _list_component->begin();43 i != _list_component->end();44 ++i)45 test_ok &= (*i)->_entity->test_map(1,false);46 47 // if (recursive) 48 // for (std::list<Tcomponent_t *>::iterator i= _list_component->begin(); 49 // i != _list_component->end(); 50 // ++i) 51 // test_ok &= (*i)->_component->test_map(1,recursive); 46 for (std::list<Tcomponent_t *>::iterator i= _list_component->begin(); 47 i != _list_component->end(); 48 ++i) 49 { 50 test_ok &= (*i)->_entity->test_map(depth+1,false,is_behavioural); 51 if (recursive) 52 try 53 { 54 test_ok &= (*i)->_component->test_map(depth+1,recursive); 55 } 56 catch (morpheo::ErrorMorpheo & error) 57 { 58 // no error propagation, only top level 59 } 52 60 } 53 61 … … 55 63 56 64 if (test_ok == false) 57 throw (ERRORMORPHEO (FUNCTION, "A lot of port is not connected."));65 throw (ERRORMORPHEO (FUNCTION,_("A lot of port is not connected.\n"))); 58 66 59 67 return test_ok; 60 68 }; 61 69 70 // #undef FUNCTION 71 // #define FUNCTION "Component::test_equi" 72 // bool Component::test_equi (bool recursive) 73 // { 74 // log_printf(NONE,Behavioural,FUNCTION, "Test port equi and interface."); 75 // return test_equi (0, recursive); 76 // } 77 78 // bool Component::test_equi (uint32_t depth, bool recursive) 79 // { 80 // log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 81 82 // std::string tab = std::string(depth,'\t'); 83 // std::string name = _entity->get_name(); 84 // bool test_ok = true; 85 86 // test_ok &= _entity->test_equi(depth+1); 87 88 // for (std::list<Tcomponent_t *>::iterator i= _list_component->begin(); 89 // i != _list_component->end(); 90 // ++i) 91 // { 92 // test_ok &= (*i)->_entity->test_equi(depth+1); 93 // if (recursive) 94 // try 95 // { 96 // test_ok &= (*i)->_component->test_equi(depth+1,recursive); 97 // } 98 // catch (morpheo::ErrorMorpheo & error) 99 // { 100 // // no error propagation, only top level 101 // } 102 // } 103 104 // log_printf(FUNC,Behavioural,FUNCTION,"End"); 105 106 // if (test_ok == false) 107 // throw (ERRORMORPHEO (FUNCTION,_("A lot of port is not connected.\n"))); 108 109 // return test_ok; 110 // }; 111 62 112 63 113 }; // end namespace behavioural -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_test_map.cpp
r81 r82 14 14 #undef FUNCTION 15 15 #define FUNCTION "Entity::test_map" 16 bool Entity::test_map (uint32_t depth, bool top_level )16 bool Entity::test_map (uint32_t depth, bool top_level, bool is_behavioural) 17 17 { 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 19 20 20 std::string tab = std::string(depth,'\t'); 21 log_printf(NONE,Behavioural,FUNCTION, "%s* Test mapping :Entity \"%s\"",tab.c_str(),_name.c_str());21 log_printf(NONE,Behavioural,FUNCTION, "%s* Entity \"%s\"",tab.c_str(),_name.c_str()); 22 22 23 bool _return = _interfaces->test_map(depth+1,top_level );23 bool _return = _interfaces->test_map(depth+1,top_level, is_behavioural); 24 24 25 25 #ifndef DEBUG … … 35 35 }; 36 36 37 // #undef FUNCTION 38 // #define FUNCTION "Entity::test_equi" 39 // bool Entity::test_equi (uint32_t depth) 40 // { 41 // log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 42 43 // std::string tab = std::string(depth,'\t'); 44 // log_printf(NONE,Behavioural,FUNCTION, "%s* Entity \"%s\"",tab.c_str(),_name.c_str()); 45 46 // bool _return = _interfaces->test_equi(depth+1); 47 48 // #ifndef DEBUG 49 // if (_return == false) 50 // { 51 // std::cerr << "In entity \"" << _name << "\" (type : \"" << _type << "\"), a lot of port is not connected !" << std::endl; 52 // } 53 // #endif 54 55 // log_printf(FUNC,Behavioural,FUNCTION,"End"); 56 57 // return _return; 58 // }; 59 37 60 }; // end namespace behavioural 38 61 }; // end namespace morpheo -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo.cpp
r81 r82 45 45 ,interface_fifo._localisation 46 46 #endif 47 ,interface_fifo._usage 47 48 ) 48 49 { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_test_map.cpp
r81 r82 14 14 #undef FUNCTION 15 15 #define FUNCTION "Interface::test_map" 16 bool Interface::test_map (uint32_t depth, bool top_level )16 bool Interface::test_map (uint32_t depth, bool top_level, bool is_behavioural) 17 17 { 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 26 26 i != _list_signal->end(); 27 27 ++i) 28 _return &= (*i)->test_map(depth+1,top_level );28 _return &= (*i)->test_map(depth+1,top_level, is_behavioural); 29 29 30 30 log_printf(FUNC,Behavioural,FUNCTION,"End"); … … 33 33 }; 34 34 35 // #undef FUNCTION 36 // #define FUNCTION "Interface::test_equi" 37 // bool Interface::test_equi (uint32_t depth) 38 // { 39 // log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 40 41 // std::string tab = std::string(depth,'\t'); 42 // bool _return = true; 43 44 // log_printf(NONE,Behavioural,FUNCTION, "%s* Interface \"%s\"",tab.c_str(),_name.c_str()); 45 46 // for (std::list<Signal*>::iterator i = _list_signal->begin(); 47 // i != _list_signal->end(); 48 // ++i) 49 // _return &= (*i)->test_equi(depth+1); 50 51 // log_printf(FUNC,Behavioural,FUNCTION,"End"); 52 53 // return _return; 54 // }; 55 35 56 }; // end namespace behavioural 36 57 }; // end namespace morpheo -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_test_map.cpp
r81 r82 14 14 #undef FUNCTION 15 15 #define FUNCTION "Interfaces::test_map" 16 bool Interfaces::test_map (uint32_t depth, bool top_level )16 bool Interfaces::test_map (uint32_t depth, bool top_level, bool is_behavioural) 17 17 { 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); … … 27 27 i != _list_interface->end(); 28 28 ++i) 29 _return &= (*i)->test_map(depth+1, top_level );29 _return &= (*i)->test_map(depth+1, top_level, is_behavioural); 30 30 31 31 log_printf(FUNC,Behavioural,FUNCTION,"End"); … … 34 34 }; 35 35 36 // #undef FUNCTION 37 // #define FUNCTION "Interfaces::test_equi" 38 // bool Interfaces::test_equi (uint32_t depth) 39 // { 40 // log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 41 42 // std::string tab = std::string(depth,'\t'); 43 44 // bool _return = true; 45 46 // log_printf(NONE,Behavioural,FUNCTION, "%s* Interfaces \"%s\"",tab.c_str(),_name.c_str()); 47 48 // for (std::list<Interface_fifo*>::iterator i = _list_interface->begin(); 49 // i != _list_interface->end(); 50 // ++i) 51 // _return &= (*i)->test_equi(depth+1); 52 53 // log_printf(FUNC,Behavioural,FUNCTION,"End"); 54 55 // return _return; 56 // }; 57 36 58 }; // end namespace behavioural 37 59 }; // end namespace morpheo -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters_test.cpp
r81 r82 20 20 Parameters_test x = msg_error(); 21 21 22 std::cerr << x.print() << std::endl;22 std::cerr << x.print(); 23 23 24 24 if (x.have_error()) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_connect.cpp
r81 r82 2 2 * $Id$ 3 3 * 4 * [ 4 * [ Description ] 5 5 * 6 6 */ … … 27 27 // log_printf(ALL,Behavioural,FUNCTION," * sc_signal : %.8x",signal_dest->_sc_signal); 28 28 // log_printf(ALL,Behavioural,FUNCTION," * type_info : %s",toString(signal_dest->_type_info).c_str()); 29 30 TEST_PTR(_sc_signal); 31 TEST_PTR(signal_dest->_sc_signal); 29 32 30 33 if ((_direction == IN ) and (signal_dest->_direction == IN )) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp
r81 r82 77 77 signal_dest->_connect_from_signal = signal_src; 78 78 79 80 81 79 // vhdl_testbench : to read an output producte by a internal component 82 80 // TODO : à vérifier !!!!!!!!!!!! -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_test_map.cpp
r81 r82 14 14 #undef FUNCTION 15 15 #define FUNCTION "Signal::test_map" 16 bool Signal::test_map (uint32_t depth, bool top_level )16 bool Signal::test_map (uint32_t depth, bool top_level, bool is_behavioural) 17 17 { 18 18 log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 19 19 20 std::string str = ""; 21 std::string tab = std::string(depth,'\t'); 20 std::string str = ""; 21 std::string tab = std::string(depth,'\t'); 22 bool _return = true; 23 22 24 // log_printf(NONE,Behavioural,FUNCTION, "%s* Signal \"%s\"",tab.c_str(),_name.c_str()); 23 25 // log_printf(NONE,Behavioural,FUNCTION, "%s%d - %d - %d",tab.c_str(), … … 25 27 // _is_map_as_component_src, 26 28 // _is_map_as_component_dest); 27 bool _return = true; 29 // log_printf(NONE,Behavioural,FUNCTION, "%stop_level %d, is_behavioural %d",tab.c_str(), 30 // top_level, 31 // is_behavioural); 28 32 29 if (top_level == true) 30 { 31 switch (_direction) 32 { 33 case morpheo::behavioural::IN : 33 // behavioural | top_level 34 //-------------+----------- 35 // 0 | 0 - 36 // 0 | 1 - 37 // 1 | 0 - 38 // 1 | 1 - 39 40 if (not (is_behavioural and top_level)) 41 if (top_level == true) 42 { 43 switch (_direction) 34 44 { 35 if (_is_map_as_toplevel_dest == false) 36 { 37 _return = false; 38 39 str = "Signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface."; 40 } 41 break; 45 case morpheo::behavioural::IN : 46 { 47 if (_is_map_as_toplevel_dest == false) 48 { 49 _return = false; 50 51 str = "Signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface."; 52 } 53 break; 54 } 55 case morpheo::behavioural::OUT : 56 { 57 if (_is_map_as_toplevel_dest == false) 58 { 59 _return = false; 60 str = "Signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface."; 61 } 62 break; 63 } 64 case morpheo::behavioural::INTERNAL : 65 { 66 if (_is_map_as_component_src == false) 67 { 68 _return = false; 69 70 str = "Internal signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface."; 71 } 72 73 if (_is_map_as_component_dest == false) 74 { 75 if (_return == false) 76 str+="\n"; 77 78 _return = false; 79 80 str += "Internal signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface."; 81 } 82 83 break; 84 } 85 //case morpheo::behavioural::INOUT : 86 default : break; 42 87 } 43 case morpheo::behavioural::OUT : 88 } 89 else 90 { 91 // internal signal : 92 // Component --- I/O (as_src) 93 // Component --- Component (as_src and as_dest) 94 95 switch (_direction) 44 96 { 45 if (_is_map_as_toplevel_dest == false) 46 { 47 _return = false; 48 str = "Signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface."; 49 } 50 break; 97 case morpheo::behavioural::IN : 98 { 99 if (_is_map_as_component_src == false) 100 { 101 _return = false; 102 103 str = "Signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface."; 104 } 105 break; 106 } 107 case morpheo::behavioural::OUT : 108 { 109 if (_is_map_as_component_src == false) 110 { 111 _return = false; 112 113 str = "Signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface."; 114 } 115 break; 116 } 117 case morpheo::behavioural::INTERNAL : 118 { 119 if (_is_map_as_component_src == false) 120 { 121 _return = false; 122 123 str = "Internal signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface."; 124 } 125 126 if (_is_map_as_component_dest == false) 127 { 128 if (_return == false) 129 str+="\n"; 130 131 _return = false; 132 133 str += "Internal signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface."; 134 } 135 136 break; 137 } 138 //case morpheo::behavioural::INOUT : 139 default : break; 51 140 } 52 //case morpheo::behavioural::INTERNAL : 53 //case morpheo::behavioural::INOUT : 54 default : break; 55 } 56 } 57 else 58 { 59 // internal signal : 60 // Component --- I/O (as_src) 61 // Component --- Component (as_src and as_dest) 62 63 switch (_direction) 64 { 65 case morpheo::behavioural::IN : 66 { 67 if (_is_map_as_component_src == false) 68 { 69 _return = false; 70 71 str = "Signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface."; 72 } 73 break; 74 } 75 case morpheo::behavioural::OUT : 76 { 77 if (_is_map_as_component_src == false) 78 { 79 _return = false; 80 81 str = "Signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface."; 82 } 83 break; 84 } 85 case morpheo::behavioural::INTERNAL : 86 { 87 if (_is_map_as_component_src == false) 88 { 89 _return = false; 90 91 str = "Internal signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface."; 92 } 93 94 if (_is_map_as_component_dest == false) 95 { 96 if (_return == false) 97 str+="\n"; 98 99 _return = false; 100 101 str += "Internal signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface."; 102 } 103 104 break; 105 } 106 //case morpheo::behavioural::INOUT : 107 default : break; 108 } 109 } 110 111 log_printf(FUNC,Behavioural,FUNCTION,"End"); 112 113 141 } 114 142 115 143 if (_return == false) … … 125 153 // log_printf(NONE,Behavioural,FUNCTION, "%s* Signal \"%s\" is OK.",tab.c_str(),_name.c_str()); 126 154 } 155 156 log_printf(FUNC,Behavioural,FUNCTION,"End"); 127 157 128 158 return _return; 129 159 }; 130 160 161 // #undef FUNCTION 162 // #define FUNCTION "Signal::test_equi" 163 // bool Signal::test_equi (uint32_t depth) 164 // { 165 // log_printf(FUNC,Behavioural,FUNCTION,"Begin"); 166 167 // std::string str = ""; 168 // std::string tab = std::string(depth,'\t'); 169 // bool _return = true; 170 171 172 173 // if (_return == false) 174 // { 175 // log_printf(NONE,Behavioural,FUNCTION, "%s* %s",tab.c_str(),str.c_str()); 176 177 // #ifndef DEBUG 178 // std::cerr << str << std::endl; 179 // #endif 180 // } 181 // else 182 // { 183 // // log_printf(NONE,Behavioural,FUNCTION, "%s* Signal \"%s\" is OK.",tab.c_str(),_name.c_str()); 184 // } 185 186 // return _return; 187 // }; 188 131 189 }; // end namespace behavioural 132 190 }; // end namespace morpheo -
trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h
r81 r82 2 2 #define DEBUG_H 3 3 4 /* 5 * $Id$ 6 * 7 * [ Description ] 8 * 9 * function to help the debugging : 10 * 11 * - debug_tab 12 * - log_printf 13 * - log_begin 14 * - log_end 15 * - breakpoint 16 * 17 * Debug's Level : 18 * - None : print elementary information 19 * - Info : print basic information 20 * - Trace : trace internal variable 21 * - Func : trace call and return function 22 * - All : print all information 23 */ 24 4 25 #include "Common/include/Message.h" 5 26 #include "Behavioural/include/Debug_component.h" 27 #include "Behavioural/include/Environment.h" 6 28 #include <stdio.h> 7 29 #include <string.h> … … 9 31 #include <sstream> 10 32 #include <string> 11 12 std::string debug_tab (void);13 void debug_function_begin (std::string component, std::string function);14 void debug_function_end (std::string component, std::string function);15 16 // Debug's Level :17 // * None : print elementary information18 // * Info : print basic information19 // * Trace : trace internal variable20 // * Func : trace call and return function21 // * All : print all information22 33 23 34 enum _debug_verbosity … … 30 41 }; 31 42 43 std::string debug_tab (void); 44 void debug_tab_inc (void); 45 void debug_tab_dec (void); 46 32 47 #ifdef DEBUG 33 48 # define log_printf(level, component, func, str... ) \ … … 39 54 ( DEBUG_ ## component == true )) ) \ 40 55 { \ 41 msg(_("%s"),debug_tab().c_str()); \ 56 if (DEBUG >= DEBUG_FUNC) \ 57 { \ 58 msg(_("%s"),debug_tab().c_str()); \ 59 } \ 42 60 if (DEBUG >= DEBUG_ALL ) \ 43 61 { \ … … 64 82 } \ 65 83 } while(0) 84 85 # define log_begin(component, func) \ 86 do \ 87 { \ 88 debug_tab_inc (); \ 89 log_printf(FUNC,component,func,"Begin"); \ 90 } while(0) 91 92 # define log_end(component, func) \ 93 do \ 94 { \ 95 log_printf(FUNC,component,func,"End"); \ 96 debug_tab_dec (); \ 97 } while(0) 98 66 99 #else 67 100 # define log_printf(level, component, func, str... ) \ 101 do \ 102 { \ 103 } while(0) 104 105 # define log_begin(component, func) \ 106 do \ 107 { \ 108 } while(0) 109 110 # define log_end(component, func) \ 68 111 do \ 69 112 { \ … … 77 120 msg(_("Breakpoint : file %s, line %d. Enter Any key to continue\n"),__FILE__,__LINE__); \ 78 121 msg(str); \ 79 msg(_("\n")); \80 122 getchar(); \ 81 123 } while(0) 82 124 125 #ifdef DEBUG_TEST 126 #define TEST_PTR(x) \ 127 do \ 128 { \ 129 if (x == NULL) \ 130 err(_("%s File %s, Line %d, this pointeur is null"),MSG_ERROR,__FILE__,__LINE__); \ 131 } \ 132 while (0) 133 #else 134 #define TEST_PTR(x) \ 135 do \ 136 { \ 137 } \ 138 while (0) 139 #endif 140 141 83 142 #endif // !DEBUG_H -
trunk/IPs/systemC/processor/Morpheo/Common/include/ErrorMorpheo.h
r81 r82 30 30 std::string file ) throw() 31 31 { 32 _msg = "<"+funcname+"> at line " + toString(line) + ", in file " + file + " : "+msg;32 _msg = toString("<%s> at line %d, in file %s : %s",funcname.c_str(),line,file.c_str(),msg.c_str()); 33 33 } 34 34 public : ~ErrorMorpheo (void) throw() {} -
trunk/IPs/systemC/processor/Morpheo/Common/include/Message.h
r81 r82 11 11 #include <stdio.h> 12 12 #include <string.h> 13 #include <libintl.h>13 #include "Translation.h" 14 14 15 15 namespace morpheo { 16 16 17 #ifdef NO_TRANSLATE 18 # define _(String) (String) 19 #else 20 # define _(String) gettext (String) 21 #endif 17 #define MSG_ERROR _("[ ERROR ]") 18 #define MSG_WARNING _("[ WARNING ]") 19 #define MSG_INFORMATION _("[INFORMATION]") 22 20 23 #define msg(arg...) fprintf(stdout,arg); 24 #define err(arg...) fprintf(stderr,arg); 21 #define msg(arg...) \ 22 do \ 23 { \ 24 fprintf(stdout,arg); \ 25 } while (0) 26 27 #define err(arg...) \ 28 do \ 29 { \ 30 fprintf(stderr,"%s ",MSG_ERROR); \ 31 fprintf(stderr,arg); \ 32 } while (0) 33 25 34 26 35 }; // end namespace morpheo -
trunk/IPs/systemC/processor/Morpheo/Common/include/ToString.h
r81 r82 16 16 #include <string> 17 17 #include <limits> 18 #include <stdio.h> 19 #include <stdlib.h> 20 #include <stdarg.h> 18 21 19 22 namespace morpheo { … … 99 102 return out.str(); 100 103 } 104 105 std::string toString (const char *fmt, ...); 101 106 102 107 }; // end namespace morpheo -
trunk/IPs/systemC/processor/Morpheo/Common/src/Debug.cpp
r81 r82 1 /* 2 * $Id$ 3 * 4 * [ Description ] 5 * 6 */ 7 1 8 #include "Common/include/Debug.h" 2 9 3 10 static uint32_t _debug_depth = 0; 4 5 11 6 12 std::string debug_tab (void) … … 9 15 } 10 16 11 void debug_ function_begin (std::string component, std::string function)17 void debug_tab_inc (void) 12 18 { 13 _debug_depth ++; 14 15 log_printf(FUNC,true,function.c_str(),"%sBegin",debug_tab().c_str()); 19 // _debug_depth ++; 16 20 } 17 21 18 void debug_ function_end (std::string component, std::string function)22 void debug_tab_dec (void) 19 23 { 20 log_printf(FUNC,true,function.c_str(),"%sEnd",debug_tab().c_str()); 21 22 _debug_depth --; 24 // _debug_depth --; 23 25 } -
trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Documents/article-07sympa/fr/root.tex
r81 r82 11 11 12 12 L'approche actuelle pour dévelloper des systèmes embarquées est fondée sur le secret. Les composants matériels et/ou logicielle sont fermés. Les concepteurs utilisant ces Intellectual Proprity (IP) ne sont pas assuré d'absence de chevaux de troie, de la pérénité de ce composant (arrêt de la production ou changement de protocole de communication). 13 14 13 La nouvelle approche se base sur l'utilisation de composant ouvert. Ceci engendre la disponibilité du code source et rendre plus facile l'intégration sur FPGA. Ceci permet d'avoir des systèmes sur puces (SOC). 15 14 -
trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Include/doc-style.sty
r81 r82 14 14 \usepackage[latin1]{inputenc} % Pour utiliser les caractères accentués dans votre texte 15 15 \usepackage{openbib} 16 16 \usepackage[draft]{fixme} 17 17 \bibliographystyle{plain} 18 19 20 18 21 19 % Titres de figures en 9 points helvetica gras -
trunk/IPs/systemC/processor/Morpheo/Script/execute.sh
r81 r82 1 1 #!/bin/sh 2 #----------------------------------------------------------- 3 # $Id$ 4 #----------------------------------------------------------- 2 5 3 6 declare -a COMMAND; -
trunk/IPs/systemC/processor/Morpheo/Script/execute_n.sh
r81 r82 1 1 #!/bin/sh 2 #----------------------------------------------------------- 3 # $Id$ 4 #----------------------------------------------------------- 2 5 3 6 #-----[ variable ]------------------------------------------ -
trunk/IPs/systemC/processor/Morpheo/Script/first_run.sh
r81 r82 1 1 #!/bin/sh 2 #----------------------------------------------------------- 3 # $Id$ 4 #----------------------------------------------------------- 2 5 3 6 #-----[ usage ]--------------------------------------------- -
trunk/IPs/systemC/processor/Morpheo/Script/lock.sh
r81 r82 1 1 #!/bin/sh 2 #----------------------------------------------------------- 3 # $Id$ 4 #----------------------------------------------------------- 2 5 3 6 #-----[ usage ]--------------------------------------------- -
trunk/IPs/systemC/processor/Morpheo/Script/range.sh
r81 r82 1 1 #!/bin/sh 2 #----------------------------------------------------------- 3 # $Id$ 4 #----------------------------------------------------------- 2 5 3 6 #-----[ usage ]--------------------------------------------- -
trunk/IPs/systemC/processor/Morpheo/Script/unlock.sh
r81 r82 1 1 #!/bin/sh 2 #----------------------------------------------------------- 3 # $Id$ 4 #----------------------------------------------------------- 2 5 3 6 #-----[ usage ]--------------------------------------------- -
trunk/IPs/systemC/processor/Morpheo/Script/xilinx_extract_info.sh
r81 r82 1 1 #!/bin/sh 2 #----------------------------------------------------------- 3 # $Id$ 4 #----------------------------------------------------------- 2 5 3 6 for i in *.fpga.log; do
Note: See TracChangeset
for help on using the changeset viewer.