Changeset 101 for trunk/IPs/systemC
- Timestamp:
- Jan 15, 2009, 6:19:08 PM (16 years ago)
- Location:
- trunk/IPs/systemC
- Files:
-
- 127 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/Environment/Cache/include/Cache_OneLevel.h
r81 r101 32 32 33 33 34 public : void reset (void); 35 public : void transition (void); 36 private : void update_lru (uint32_t familly, uint32_t num_associativity); 37 private : uint32_t index_victim (uint32_t familly); 38 private : Address translate_address (uint32_t address); 39 public : type_rsp_cache_t access (uint32_t num_port, uint32_t address, uint32_t trdid, type_req_cache_t type, direction_req_cache_t dir); 40 private : type_rsp_cache_t access_cached (uint32_t num_port, uint32_t address, uint32_t trdid, direction_req_cache_t dir); 41 private : type_rsp_cache_t access_uncached (uint32_t num_port, uint32_t address, uint32_t trdid); 42 private : type_rsp_cache_t access_invalidate (uint32_t num_port, uint32_t address, uint32_t trdid); 43 private : type_rsp_cache_t access_flush (uint32_t num_port, uint32_t address, uint32_t trdid); 44 private : uint32_t hit_write_buffer (uint32_t trdid, Address address); 45 private : uint32_t hit_cache (uint32_t trdid, Address address); 46 private : uint32_t hit_access_port (uint32_t trdid, Address address); 47 public : uint32_t need_slot (void); 48 public : uint32_t latence (uint32_t num_port); 49 public : uint32_t update_latence (uint32_t num_port, uint32_t latence); 50 public : std::string information (uint32_t depth); 34 public : void reset (void); 35 public : void transition (void); 36 private : void update_lru (uint32_t familly, uint32_t num_associativity); 37 private : uint32_t index_victim (uint32_t familly); 38 private : Address translate_address (uint32_t address); 39 public : type_rsp_cache_t access (uint32_t num_port, uint32_t address, uint32_t trdid, type_req_cache_t type, direction_req_cache_t dir); 40 private : type_rsp_cache_t access_cached (uint32_t num_port, uint32_t address, uint32_t trdid, direction_req_cache_t dir); 41 private : type_rsp_cache_t access_uncached (uint32_t num_port, uint32_t address, uint32_t trdid); 42 private : type_rsp_cache_t access_invalidate (uint32_t num_port, uint32_t address, uint32_t trdid); 43 private : type_rsp_cache_t access_flush (uint32_t num_port, uint32_t address, uint32_t trdid); 44 private : type_rsp_cache_t access_lock (uint32_t num_port, uint32_t address, uint32_t trdid); 45 private : type_rsp_cache_t access_prefetch (uint32_t num_port, uint32_t address, uint32_t trdid); 46 private : type_rsp_cache_t access_synchronization (uint32_t num_port, uint32_t address, uint32_t trdid); 47 private : uint32_t hit_write_buffer (uint32_t trdid, Address address); 48 private : uint32_t hit_cache (uint32_t trdid, Address address); 49 private : uint32_t hit_access_port (uint32_t trdid, Address address); 50 public : uint32_t need_slot (void); 51 public : uint32_t latence (uint32_t num_port); 52 public : uint32_t update_latence (uint32_t num_port, uint32_t latence); 53 public : std::string information (uint32_t depth); 51 54 52 55 public : friend std::ostream& operator<< (std::ostream& output, Cache_OneLevel & x); -
trunk/IPs/systemC/Environment/Cache/include/Types.h
r81 r101 32 32 typedef enum 33 33 { 34 CACHED , // address can be in the cache 35 UNCACHED , // Always miss (not address in cache) 36 INVALIDATE , // The direction is not used 37 PREFETCH , // The direction is not used 38 FLUSH // The direction is not used 34 CACHED , // address can be in the cache 35 UNCACHED , // Always miss (not address in cache) 36 INVALIDATE , // The direction is not used 37 PREFETCH , // The direction is not used 38 FLUSH , // The direction is not used 39 LOCK , // The direction is not used 40 SYNCHRONIZATION // The direction is not used 39 41 } type_req_cache_t; 40 42 -
trunk/IPs/systemC/Environment/Cache/src/Cache_OneLevel_access.cpp
r81 r101 20 20 // << " * direction : " << dir << std::endl; 21 21 22 // no difference with the simple read cached (have no add a prefetch cache) 22 23 switch (type) 23 24 { 24 case UNCACHED : return access_uncached (num_port,address,trdid ); break; 25 case INVALIDATE : return access_invalidate (num_port,address,trdid ); break; 26 case FLUSH : return access_flush (num_port,address,trdid ); break; 27 case PREFETCH : // no difference with the simple read cached (have no add a prefetch cache) 28 case CACHED : return access_cached (num_port,address,trdid,dir); break; 29 default : std::cout << "<Cache_Onelevel.access> unknow type : " << std::endl; exit(1); break; 25 case UNCACHED : return access_uncached (num_port,address,trdid ); break; 26 case INVALIDATE : return access_invalidate (num_port,address,trdid ); break; 27 case FLUSH : return access_flush (num_port,address,trdid ); break; 28 case PREFETCH : return access_prefetch (num_port,address,trdid ); break; 29 case LOCK : return access_lock (num_port,address,trdid ); break; 30 case SYNCHRONIZATION : return access_synchronization (num_port,address,trdid ); break; 31 case CACHED : return access_cached (num_port,address,trdid,dir); break; 32 default : std::cout << "<Cache_Onelevel.access> unknow type : " << std::endl; exit(1); break; 30 33 } 31 34 } -
trunk/IPs/systemC/Environment/Data/src/Data_entity.cpp
r81 r101 1 1 #include "../include/Data.h" 2 #include "../../Common/include/Debug.h" 2 3 3 4 namespace environment { … … 6 7 Entity Data::entity (uint32_t address, uint32_t size) 7 8 { 9 // _cout(DATA, " * Data::entity\n"); 10 // _cout(DATA, " * address : %.8x\n",address); 11 // _cout(DATA, " * size : %d\n" ,size ); 12 8 13 for (uint32_t num_seg = 0; num_seg < nb_seg; num_seg ++) 9 14 if (segment[num_seg]->test (address,size) == true) -
trunk/IPs/systemC/Environment/Data/src/Segment_test.cpp
r81 r101 1 1 #include "../include/Segment.h" 2 #include "../../Common/include/Debug.h" 2 3 3 4 namespace environment { … … 11 12 bool Segment::test (uint32_t address, uint32_t size) 12 13 { 14 // _cout(DATA," * Segment::test\n"); 15 // _cout(DATA," * address : %.8x\n",address ); 16 // _cout(DATA," * size : %d\n" ,size ); 17 // _cout(DATA," * segment base : %.8x\n",this->base); 18 // _cout(DATA," * segment size : %.8x\n",this->size); 19 13 20 bool res = (((address ) >= (this->base )) and 14 21 ((address+size) <= (this->base+this->size))); -
trunk/IPs/systemC/Environment/src/Cache_Access_dreq_type2cache_type.cpp
r81 r101 10 10 switch (dreq_type) 11 11 { 12 case DCACHE_TYPE_LOAD_8 : direction=cache::READ ; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 1;break;13 case DCACHE_TYPE_LOAD_16 : direction=cache::READ ; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 2;break;14 case DCACHE_TYPE_LOAD_32 : direction=cache::READ ; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 4;break;15 case DCACHE_TYPE_LOAD_64 : direction=cache::READ ; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 8;break;16 case DCACHE_TYPE_INVALIDATE : direction=cache::NONE ; type=cache::INVALIDATE ; nb_bytes = 1;break;17 case DCACHE_TYPE_FLUSH : direction=cache::NONE ; type=cache::FLUSH ; nb_bytes = 1;break;18 case DCACHE_TYPE_PREFETCH : direction=cache::NONE ; type=cache::INVALIDATE ; nb_bytes = 1;break;19 // case DCACHE_TYPE_STORE_8_ACK : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 1;break;20 case DCACHE_TYPE_STORE_8 : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 1;break;21 case DCACHE_TYPE_STORE_16 : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 2;break;22 case DCACHE_TYPE_STORE_32 : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 4;break;23 case DCACHE_TYPE_STORE_64 : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 8;break;24 case DCACHE_TYPE_ LOCK :25 case DCACHE_TYPE_ SYNCHRONIZATION :12 case DCACHE_TYPE_LOAD_8 : direction=cache::READ ;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 1;break; 13 case DCACHE_TYPE_LOAD_16 : direction=cache::READ ;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 2;break; 14 case DCACHE_TYPE_LOAD_32 : direction=cache::READ ;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 4;break; 15 case DCACHE_TYPE_LOAD_64 : direction=cache::READ ;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 8;break; 16 case DCACHE_TYPE_INVALIDATE : direction=cache::NONE ;type=cache::INVALIDATE ;nb_bytes = 1;break; 17 case DCACHE_TYPE_FLUSH : direction=cache::NONE ;type=cache::FLUSH ;nb_bytes = 1;break; 18 case DCACHE_TYPE_PREFETCH : direction=cache::NONE ;type=cache::PREFETCH ;nb_bytes = 1;break; 19 // case DCACHE_TYPE_STORE_8_ACK : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 1;break; 20 case DCACHE_TYPE_STORE_8 : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 1;break; 21 case DCACHE_TYPE_STORE_16 : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 2;break; 22 case DCACHE_TYPE_STORE_32 : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 4;break; 23 case DCACHE_TYPE_STORE_64 : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 8;break; 24 case DCACHE_TYPE_SYNCHRONIZATION : direction=cache::NONE ;type=cache::SYNCHRONIZATION ;nb_bytes = 1;break; 25 case DCACHE_TYPE_LOCK : direction=cache::NONE ;type=cache::LOCK ;nb_bytes = 1;break; 26 26 default : {std::cerr << "<ireq_type2cache_type> Unkown type (" << dreq_type << ")" << std::endl; exit(1);} 27 27 } -
trunk/IPs/systemC/Environment/src/Cache_Access_ireq_type2cache_type.cpp
r81 r101 13 13 case ICACHE_TYPE_INVALIDATE : {direction=cache::NONE ; type=cache::INVALIDATE; break;} 14 14 case ICACHE_TYPE_PREFETCH : {direction=cache::NONE ; type=cache::PREFETCH ; break;} 15 case ICACHE_TYPE_LOCK : 15 case ICACHE_TYPE_LOCK : {direction=cache::NONE ; type=cache::LOCK ; break;} 16 16 default : {std::cerr << "<ireq_type2cache_type> Unkown type (" << ireq_type << ")" << std::endl; exit(1);} 17 17 } -
trunk/IPs/systemC/Environment/src/Environment_transition.cpp
r88 r101 1 1 #include "../include/Environment.h" 2 3 #define CYCLE_MAX 0 4 #include "../../processor/Morpheo/Common/include/Test.h" 2 5 3 6 using namespace morpheo; … … 171 174 uint32_t size = param->daccess_size_data [i]/8; 172 175 173 // _cout(ENVIRONMENT," * information\n"); 174 // _cout(ENVIRONMENT," * context : %d\n" ,static_cast<uint32_t>(context)); 175 // _cout(ENVIRONMENT," * packet : %d\n" ,static_cast<uint32_t>(packet )); 176 // _cout(ENVIRONMENT," * address : %.x\n",static_cast<uint32_t>(address)); 177 // _cout(ENVIRONMENT," * type : %d\n" ,static_cast<uint32_t>(type )); 178 // _cout(ENVIRONMENT," * size : %d\n" ,static_cast<uint32_t>(size )); 179 180 // search the entity 181 data::Entity entity = component_data->entity(static_cast<uint32_t>(address),size); 182 183 std::cout << entity << std::endl; 176 _cout(ENVIRONMENT," * information\n"); 177 _cout(ENVIRONMENT," * context : %d\n" ,static_cast<uint32_t>(context)); 178 _cout(ENVIRONMENT," * packet : %d\n" ,static_cast<uint32_t>(packet )); 179 _cout(ENVIRONMENT," * address : %.x\n",static_cast<uint32_t>(address)); 180 _cout(ENVIRONMENT," * type : %d\n" ,static_cast<uint32_t>(type )); 181 _cout(ENVIRONMENT," * size : %d\n" ,static_cast<uint32_t>(size )); 184 182 185 183 bool uncached = false; … … 209 207 default :{ must_read=false; must_write=false; must_ack=false; must_ack_on_error=false; break;} 210 208 } 209 210 // search the entity 211 data::Entity entity = component_data->entity(static_cast<uint32_t>(address),nb_bytes); 212 213 std::cout << entity << std::endl; 211 214 212 215 // Test the type of the address … … 250 253 ,static_cast<uint32_t>((wdata>> 0)&0xff) 251 254 ); 255 256 if (wdata == 0) 257 std::cout << STR_OK << std::endl; 258 else 259 std::cout << STR_KO << std::endl; 252 260 253 261 stop (context); … … 289 297 // Read 290 298 _cout(ENVIRONMENT," * Read (%d bytes)\n",size); 291 bus_error |= !component_data->read(address, size,read_dram[0]); // always read a complete word299 bus_error |= !component_data->read(address,nb_bytes,read_dram[0]); // always read a complete word 292 300 293 301 _cout(ENVIRONMENT," * Rdata : "); 294 for (uint32_t i=0; i< size; i++)302 for (uint32_t i=0; i<nb_bytes; i++) 295 303 _cout(ENVIRONMENT,"%.2x",0xff&static_cast<uint32_t>(read_dram[0][i])); 296 304 _cout(ENVIRONMENT,".\n"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/SelfTest/src/test.cpp
r97 r101 80 80 } 81 81 82 { 83 cout << "------------------------------------------------------" << endl; 84 85 Instance * instance = new Instance ("../../../Files/Instance_scalar_3.cfg", 86 generator1, 87 _get_custom_information 88 ); 89 instance->toFile("data_out"); 90 91 delete instance; 92 } 93 94 { 95 cout << "------------------------------------------------------" << endl; 96 97 Instance * instance = new Instance ("../../../Files/Instance_scalar_4.cfg", 98 generator1, 99 _get_custom_information 100 ); 101 instance->toFile("data_out"); 102 103 delete instance; 104 } 105 82 106 delete configuration1; 83 107 delete instance1; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/include/Operation.h
r81 r101 28 28 void operation_l_addc (execute_operation_t * op, execute_register_t * reg, execute_param_t * param); 29 29 void operation_l_sub (execute_operation_t * op, execute_register_t * reg, execute_param_t * param); 30 //void operation_l_mul (execute_operation_t * op, execute_register_t * reg, execute_param_t * param);31 //void operation_l_mulu (execute_operation_t * op, execute_register_t * reg, execute_param_t * param);32 //void operation_l_div (execute_operation_t * op, execute_register_t * reg, execute_param_t * param);33 //void operation_l_divu (execute_operation_t * op, execute_register_t * reg, execute_param_t * param);30 void operation_l_mul (execute_operation_t * op, execute_register_t * reg, execute_param_t * param); 31 void operation_l_mulu (execute_operation_t * op, execute_register_t * reg, execute_param_t * param); 32 void operation_l_div (execute_operation_t * op, execute_register_t * reg, execute_param_t * param); 33 void operation_l_divu (execute_operation_t * op, execute_register_t * reg, execute_param_t * param); 34 34 void operation_l_and (execute_operation_t * op, execute_register_t * reg, execute_param_t * param); 35 35 void operation_l_or (execute_operation_t * op, execute_register_t * reg, execute_param_t * param); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/src/Operation.cpp
r100 r101 90 90 91 91 bool overflow = ovf (param->_size_data,gpr1,gpr2,gpr3); 92 bool carry_out = carry(param->_size_data,gpr1,gpr2,gpr3); 92 // bool carry_out = carry(param->_size_data,gpr1,gpr2,gpr3); 93 // In ISA : l.sub don't change flag carry 94 bool carry_out = get_flag(op->_data_rc,FLAG_CY); 93 95 94 96 // Result … … 104 106 105 107 #undef FUNCTION 108 #define FUNCTION "Functionnal_unit::operation_l_mul" 109 void operation_l_mul (execute_operation_t * op, execute_register_t * reg, execute_param_t * param) 110 { 111 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_mul"); 112 113 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 114 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 115 Tgeneral_data_t gpr3 ; 116 bool overflow ; 117 bool carry_out ; 118 119 if (param->_size_data == 32) 120 { 121 int64_t res = static_cast<int64_t>(gpr1) * static_cast<int64_t>(gpr2); 122 123 log_printf(TRACE,Functionnal_unit,FUNCTION," * res : %llx",res); 124 125 gpr3 = param->_mask_data & static_cast<Tgeneral_data_t>(res); 126 carry_out = res != gpr3; 127 overflow = carry_out; 128 } 129 else 130 { 131 throw ERRORMORPHEO(FUNCTION,_("64 bits multiplcation : not yet implemented\n")); 132 } 133 134 // Result 135 op->_timing = param->_timing[op->_type][op->_operation]; 136 op->_data_rd = gpr3; 137 op->_data_re = 0; 138 op->_data_re = set_flag(op->_data_re,FLAG_OV,overflow ); 139 op->_data_re = set_flag(op->_data_re,FLAG_CY,carry_out); 140 op->_exception = (overflow==1)?EXCEPTION_ALU_RANGE:EXCEPTION_ALU_NONE; 141 op->_no_sequence = 0; 142 //op->_address = 0; 143 }; 144 145 #undef FUNCTION 146 #define FUNCTION "Functionnal_unit::operation_l_mulu" 147 void operation_l_mulu (execute_operation_t * op, execute_register_t * reg, execute_param_t * param) 148 { 149 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_mulu"); 150 151 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 152 Tgeneral_data_t gpr2 = unsigned(param->_size_data,op->_data_rb); 153 Tgeneral_data_t gpr3 ; 154 bool overflow ; 155 bool carry_out ; 156 157 if (param->_size_data == 32) 158 { 159 uint64_t res = static_cast<uint64_t>(gpr1) * static_cast<uint64_t>(gpr2); 160 161 log_printf(TRACE,Functionnal_unit,FUNCTION," * res : %llx",res); 162 163 gpr3 = param->_mask_data & static_cast<Tgeneral_data_t>(res); 164 carry_out = res != gpr3; 165 overflow = carry_out; 166 } 167 else 168 { 169 throw ERRORMORPHEO(FUNCTION,_("64 bits multiplcation : not yet implemented\n")); 170 } 171 172 // Result 173 op->_timing = param->_timing[op->_type][op->_operation]; 174 op->_data_rd = gpr3; 175 op->_data_re = 0; 176 op->_data_re = set_flag(op->_data_re,FLAG_OV,overflow ); 177 op->_data_re = set_flag(op->_data_re,FLAG_CY,carry_out); 178 op->_exception = (overflow==1)?EXCEPTION_ALU_RANGE:EXCEPTION_ALU_NONE; 179 op->_no_sequence = 0; 180 //op->_address = 0; 181 }; 182 183 #undef FUNCTION 184 #define FUNCTION "Functionnal_unit::operation_l_div" 185 void operation_l_div (execute_operation_t * op, execute_register_t * reg, execute_param_t * param) 186 { 187 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_div"); 188 189 Tgeneral_data_t gpr1 = signed(param->_size_data,op->_data_ra); 190 Tgeneral_data_t gpr2 = signed(param->_size_data,op->_data_rb); 191 Tgeneral_data_t gpr3 = (gpr2!=0)?(gpr1/gpr2):0; 192 bool overflow = ovf (param->_size_data,gpr1,gpr2,gpr3); 193 bool carry_out = (gpr2==0); 194 195 // Result 196 op->_timing = param->_timing[op->_type][op->_operation]; 197 op->_data_rd = gpr3; 198 op->_data_re = 0; 199 op->_data_re = set_flag(op->_data_re,FLAG_OV,overflow ); 200 op->_data_re = set_flag(op->_data_re,FLAG_CY,carry_out); 201 op->_exception = (overflow==1)?EXCEPTION_ALU_RANGE:EXCEPTION_ALU_NONE; 202 op->_no_sequence = 0; 203 //op->_address = 0; 204 }; 205 206 #undef FUNCTION 207 #define FUNCTION "Functionnal_unit::operation_l_divu" 208 void operation_l_divu (execute_operation_t * op, execute_register_t * reg, execute_param_t * param) 209 { 210 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_divu"); 211 212 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 213 Tgeneral_data_t gpr2 = unsigned(param->_size_data,op->_data_rb); 214 Tgeneral_data_t gpr3 = (gpr2!=0)?(gpr1/gpr2):0; 215 bool overflow = ovf (param->_size_data,gpr1,gpr2,gpr3); 216 bool carry_out = (gpr2==0); 217 218 // Result 219 op->_timing = param->_timing[op->_type][op->_operation]; 220 op->_data_rd = gpr3; 221 op->_data_re = 0; 222 op->_data_re = set_flag(op->_data_re,FLAG_OV,overflow ); 223 op->_data_re = set_flag(op->_data_re,FLAG_CY,carry_out); 224 op->_exception = (overflow==1)?EXCEPTION_ALU_RANGE:EXCEPTION_ALU_NONE; 225 op->_no_sequence = 0; 226 //op->_address = 0; 227 }; 228 229 #undef FUNCTION 106 230 #define FUNCTION "Functionnal_unit::operation_l_and" 107 231 void operation_l_and (execute_operation_t * op, execute_register_t * reg, execute_param_t * param) … … 465 589 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 466 590 591 // Tgeneral_data_t is unsigned 467 592 bool f_out = (gpr1 >= gpr2); 468 593 … … 485 610 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 486 611 612 // Tgeneral_data_t is unsigned 487 613 bool f_out = (gpr1 > gpr2); 488 614 … … 505 631 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 506 632 633 // Tgeneral_data_t is unsigned 507 634 bool f_out = (gpr1 <= gpr2); 508 635 … … 525 652 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 526 653 654 // Tgeneral_data_t is unsigned 527 655 bool f_out = (gpr1 < gpr2); 528 656 … … 544 672 Tgeneral_data_t gpr1 = op->_data_ra; 545 673 Tgeneral_data_t gpr2 = (op->_has_immediat==1)?op->_immediat:op->_data_rb; 546 547 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ra : %.8x",unsigned(param->_size_data,op->_data_ra)); 548 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ras : %.8x", signed(param->_size_data,op->_data_ra)); 549 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rb : %.8x",unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb)); 550 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rbs : %.8x", signed(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb)); 551 674 552 675 bool f_out; 553 676 554 switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2))) 555 { 556 case 1 /*b01*/ : f_out = 1 ; break; 557 case 2 /*b10*/ : f_out = 0 ; break; 558 default : f_out = signed(param->_size_data,gpr1) >= signed(param->_size_data,gpr2); break; 559 } 560 561 log_printf(TRACE,Functionnal_unit,FUNCTION," * f_out : %.8x",f_out); 677 if (param->_size_data == 32) 678 f_out = static_cast<int32_t>(gpr1) >= static_cast<int32_t>(gpr2); 679 else 680 f_out = static_cast<int64_t>(gpr1) >= static_cast<int64_t>(gpr2); 681 682 // switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2))) 683 // { 684 // case 1 /*b01*/ : f_out = 1 ; break; 685 // case 2 /*b10*/ : f_out = 0 ; break; 686 // default : f_out = signed(param->_size_data,gpr1) >= signed(param->_size_data,gpr2); break; 687 // } 562 688 563 689 // Result … … 581 707 bool f_out; 582 708 583 switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2))) 584 { 585 case 1 /*b01*/ : f_out = 1; break; 586 case 2 /*b10*/ : f_out = 0; break; 587 default : f_out = signed(param->_size_data,gpr1) > signed(param->_size_data,gpr2); break; 588 } 709 if (param->_size_data == 32) 710 f_out = static_cast<int32_t>(gpr1) > static_cast<int32_t>(gpr2); 711 else 712 f_out = static_cast<int64_t>(gpr1) > static_cast<int64_t>(gpr2); 713 714 // switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2))) 715 // { 716 // case 1 /*b01*/ : f_out = 1; break; 717 // case 2 /*b10*/ : f_out = 0; break; 718 // default : f_out = signed(param->_size_data,gpr1) > signed(param->_size_data,gpr2); break; 719 // } 589 720 590 721 // Result … … 608 739 bool f_out; 609 740 610 switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2))) 611 { 612 case 1 /*b01*/ : f_out = 0; break; 613 case 2 /*b10*/ : f_out = 1; break; 614 default : f_out = signed(param->_size_data,gpr1) <= signed(param->_size_data,gpr2); break; 615 } 741 if (param->_size_data == 32) 742 f_out = static_cast<int32_t>(gpr1) <= static_cast<int32_t>(gpr2); 743 else 744 f_out = static_cast<int64_t>(gpr1) <= static_cast<int64_t>(gpr2); 745 746 // switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2))) 747 // { 748 // case 1 /*b01*/ : f_out = 0; break; 749 // case 2 /*b10*/ : f_out = 1; break; 750 // default : f_out = signed(param->_size_data,gpr1) <= signed(param->_size_data,gpr2); break; 751 // } 616 752 617 753 // Result … … 635 771 bool f_out; 636 772 637 switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2))) 638 { 639 case 1 /*b01*/ : f_out = 0; break; 640 case 2 /*b10*/ : f_out = 1; break; 641 default : f_out = signed(param->_size_data,gpr1) < signed(param->_size_data,gpr2); break; 642 } 773 if (param->_size_data == 32) 774 f_out = static_cast<int32_t>(gpr1) < static_cast<int32_t>(gpr2); 775 else 776 f_out = static_cast<int64_t>(gpr1) < static_cast<int64_t>(gpr2); 777 778 // switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2))) 779 // { 780 // case 1 /*b01*/ : f_out = 0; break; 781 // case 2 /*b10*/ : f_out = 1; break; 782 // default : f_out = signed(param->_size_data,gpr1) < signed(param->_size_data,gpr2); break; 783 // } 643 784 644 785 // Result -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/test.cpp
r100 r101 18 18 public : const Tcontext_t _front_end_id ; 19 19 public : const Tcontext_t _ooo_engine_id; 20 public : const Tpacket_t_packet_id ;20 public : const uint32_t _packet_id ; 21 21 public : const Toperation_t _operation ; 22 22 public : const Ttype_t _type ; … … 40 40 Tcontext_t front_end_id , 41 41 Tcontext_t ooo_engine_id, 42 Tpacket_tpacket_id ,42 uint32_t packet_id , 43 43 Toperation_t operation , 44 44 Ttype_t type , … … 356 356 transaction_in.push_back(execute_transaction(_param,0,0,0, 99,OPERATION_FIND_L_FL1 ,TYPE_FIND,0,0 ,0x80000000,0x0 ,0 ,1,63,32 ,0,15,FLAG_CY ,EXCEPTION_NONE ,0)); 357 357 358 //transaction_in.push_back(execute_transaction(_param,0,0,0,100,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x12344321,0x1 ,0 ,1,63,0x12344320,1,15,0 ,EXCEPTION_NONE ,0));359 //transaction_in.push_back(execute_transaction(_param,0,0,0,101,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x12345678,0xffffffff,0 ,1,56,0x12345679,1,3 ,0 ,EXCEPTION_NONE ,0));360 //transaction_in.push_back(execute_transaction(_param,0,0,0,102,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x12345678,0x12345678,0 ,1,56,0x0 ,1,3 ,0 ,EXCEPTION_NONE ,0));361 //transaction_in.push_back(execute_transaction(_param,0,0,0,103,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x0 ,0x0 ,0 ,1,56,0x0 ,1,3 ,0 ,EXCEPTION_NONE ,0));362 // transaction_in.push_back(execute_transaction(_param,0,0,0,104,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x70000000,0x90000000,0 ,1,56,0x0 ,1,3 ,FLAG_CY ,EXCEPTION_NONE,0));363 // transaction_in.push_back(execute_transaction(_param,0,0,0,105,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x80001000,0x80000000,0 ,1,1 ,0x1000 ,1,0 ,FLAG_CY|FLAG_OV,EXCEPTION_ALU_RANGE,0));364 // transaction_in.push_back(execute_transaction(_param,0,0,0,106,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x00000001,0x7fffffff,FLAG_CY|FLAG_OV,1,1 ,0x80000000,1,0 , FLAG_OV,EXCEPTION_ALU_RANGE,0));358 transaction_in.push_back(execute_transaction(_param,0,0,0,100,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x12344321,0x1 ,0 ,1,63,0x12344320,1,15,0 ,EXCEPTION_NONE ,0)); 359 transaction_in.push_back(execute_transaction(_param,0,0,0,101,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x12345678,0xffffffff,0 ,1,56,0x12345679,1,3 ,0 ,EXCEPTION_NONE ,0)); 360 transaction_in.push_back(execute_transaction(_param,0,0,0,102,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x12345678,0x12345678,0 ,1,56,0x0 ,1,3 ,0 ,EXCEPTION_NONE ,0)); 361 transaction_in.push_back(execute_transaction(_param,0,0,0,103,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x0 ,0x0 ,0 ,1,56,0x0 ,1,3 ,0 ,EXCEPTION_NONE ,0)); 362 transaction_in.push_back(execute_transaction(_param,0,0,0,104,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x70000000,0x90000000,0 ,1,56,0xe0000000,1,3 , FLAG_OV,EXCEPTION_ALU_RANGE,0)); 363 transaction_in.push_back(execute_transaction(_param,0,0,0,105,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x80001000,0x80000000,0 ,1,1 ,0x1000 ,1,0 , FLAG_OV,EXCEPTION_ALU_RANGE,0)); 364 transaction_in.push_back(execute_transaction(_param,0,0,0,106,OPERATION_ALU_L_SUB ,TYPE_ALU,0,0 ,0x00000001,0x7fffffff,FLAG_CY|FLAG_OV,1,1 ,0x80000002,1,0 ,FLAG_CY ,EXCEPTION_NONE ,0)); 365 365 366 366 transaction_in.push_back(execute_transaction(_param,0,0,0,120,OPERATION_TEST_L_SFEQ ,TYPE_TEST,0,0 ,0xdead ,0xdead ,0 ,0,63,0x0 ,1,15,FLAG_F ,EXCEPTION_NONE ,0)); // + == + … … 440 440 transaction_in.push_back(execute_transaction(_param,0,0,0,232,OPERATION_TEST_L_SFGES ,TYPE_TEST,0,0 ,0x21071981,0x25071959,0 ,0,63,0x0 ,1,15,0 ,EXCEPTION_NONE ,0)); // + < + 441 441 transaction_in.push_back(execute_transaction(_param,0,0,0,233,OPERATION_TEST_L_SFGES ,TYPE_TEST,0,0 ,0xdeadbeef,0xdeadbeef,0 ,0,63,0x0 ,1,15,FLAG_F ,EXCEPTION_NONE ,0)); // - == - 442 transaction_in.push_back(execute_transaction(_param,0,0,0,234,OPERATION_TEST_L_SFGES ,TYPE_TEST,0,0 ,0xdeadbabe,0xdeadbeef,0 ,0,63,0x0 ,1,15, FLAG_F,EXCEPTION_NONE ,0)); // - > -442 transaction_in.push_back(execute_transaction(_param,0,0,0,234,OPERATION_TEST_L_SFGES ,TYPE_TEST,0,0 ,0xdeadbabe,0xdeadbeef,0 ,0,63,0x0 ,1,15,0 ,EXCEPTION_NONE ,0)); // - > - 443 443 transaction_in.push_back(execute_transaction(_param,0,0,0,235,OPERATION_TEST_L_SFGES ,TYPE_TEST,0,0 ,0xdeadbeef,0xdeadbabe,0 ,0,63,0x0 ,1,15,0 ,EXCEPTION_NONE ,0)); // - < - 444 444 transaction_in.push_back(execute_transaction(_param,0,0,0,236,OPERATION_TEST_L_SFGES ,TYPE_TEST,0,0 ,0xdeadbeef,0x21524111,0 ,0,63,0x0 ,1,15,0 ,EXCEPTION_NONE ,0)); // - == + (in unsigned) … … 569 569 transaction_in.push_back(execute_transaction(_param,0,0,0,628,OPERATION_SPECIAL_L_MFSPR ,TYPE_SPECIAL,1,GROUP_CUSTOM_7<<11, 0,0x0 ,0 ,1,63,0xa ,0, 0,0 ,EXCEPTION_ALU_NONE ,0,(GROUP_CUSTOM_7<<11)|0)); 570 570 571 transaction_in.push_back(execute_transaction(_param,0,0,0,700,OPERATION_MUL_L_MUL ,TYPE_MUL,0,0 ,0x00000001,0x00000001,0 ,1,63,0x00000001,1,15,0 ,EXCEPTION_NONE ,0)); 572 transaction_in.push_back(execute_transaction(_param,0,0,0,701,OPERATION_MUL_L_MUL ,TYPE_MUL,0,0 ,0x00002107,0x00001981,0 ,1,63,0x034a5387,1,15,0 ,EXCEPTION_NONE ,0)); 573 transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MUL ,TYPE_MUL,0,0 ,0x00048698,0x0000dead,0 ,1,63,0xefc6c4b8,1,15,FLAG_CY|FLAG_OV,EXCEPTION_ALU_RANGE,0)); 574 transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MUL ,TYPE_MUL,0,0 ,0x40000000,0x00000002,0 ,1,63,0x80000000,1,15, FLAG_OV,EXCEPTION_ALU_RANGE,0)); 575 transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MUL ,TYPE_MUL,0,0 ,0x40000000,0x00000004,0 ,1,63,0x00000000,1,15,FLAG_CY ,EXCEPTION_NONE ,0)); 576 577 transaction_in.push_back(execute_transaction(_param,0,0,0,700,OPERATION_MUL_L_MULU ,TYPE_MUL,0,0 ,0x00000001,0x00000001,0 ,1,63,0x00000001,1,15,0 ,EXCEPTION_NONE ,0)); 578 transaction_in.push_back(execute_transaction(_param,0,0,0,701,OPERATION_MUL_L_MULU ,TYPE_MUL,0,0 ,0x00002107,0x00001981,0 ,1,63,0x034a5387,1,15,0 ,EXCEPTION_NONE ,0)); 579 transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MULU ,TYPE_MUL,0,0 ,0x00048698,0x0000dead,0 ,1,63,0xefc6c4b8,1,15,FLAG_CY|FLAG_OV,EXCEPTION_ALU_RANGE,0)); 580 transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MULU ,TYPE_MUL,0,0 ,0x40000000,0x00000002,0 ,1,63,0x80000000,1,15, FLAG_OV,EXCEPTION_ALU_RANGE,0)); 581 transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MULU ,TYPE_MUL,0,0 ,0x40000000,0x00000004,0 ,1,63,0x00000000,1,15,FLAG_CY ,EXCEPTION_NONE ,0)); 582 583 584 571 585 LABEL("Reset"); 572 586 in_NRESET.write(0); … … 585 599 586 600 LABEL("Iteration %d",iteration); 587 601 588 602 while (nb_transaction_out > 0) 589 603 { 590 604 Tcontrol_t val = ((rand()%100) < percent_transaction_execute_in) and not transaction_in.empty(); 591 605 in_EXECUTE_IN_VAL .write(val); … … 601 615 in_EXECUTE_IN_OOO_ENGINE_ID .write(transaction_in.front()._ooo_engine_id); 602 616 if (_param->_have_port_rob_ptr) 603 in_EXECUTE_IN_PACKET_ID .write(transaction_in.front()._packet_id);617 in_EXECUTE_IN_PACKET_ID .write(static_cast<Tpacket_t>(transaction_in.front()._packet_id)); 604 618 in_EXECUTE_IN_OPERATION .write(transaction_in.front()._operation ); 605 619 in_EXECUTE_IN_TYPE .write(transaction_in.front()._type ); … … 624 638 // TEST 625 639 if (_param->_have_port_rob_ptr) 626 TEST(Tpacket_t , out_EXECUTE_OUT_PACKET_ID .read(), transaction_out.front()._packet_id);640 TEST(Tpacket_t , out_EXECUTE_OUT_PACKET_ID .read(), static_cast<Tpacket_t>(transaction_out.front()._packet_id )); 627 641 if (_param->_have_port_context_id) 628 642 TEST(Tcontext_t , out_EXECUTE_OUT_CONTEXT_ID .read(), transaction_out.front()._context_id ); … … 649 663 TEST(Tgeneral_data_t , out_EXECUTE_OUT_DATA_RD .read(), transaction_out.front()._data_rd ); 650 664 TEST(Tgeneral_data_t , out_EXECUTE_OUT_ADDRESS .read(), transaction_out.front()._address ); 651 break;652 665 } 653 666 … … 659 672 TEST(Tgeneral_data_t , out_EXECUTE_OUT_DATA_RD .read(), transaction_out.front()._data_rd ); 660 673 TEST(Tgeneral_data_t , out_EXECUTE_OUT_ADDRESS .read(), transaction_out.front()._address ); 661 break;662 674 } 663 675 … … 685 697 686 698 SC_START(1); 687 699 } 688 700 689 701 } 702 690 703 /******************************************************** 691 704 * Simulation - End -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_allocation.cpp
r97 r101 174 174 if (_param->_timing[TYPE_ALU ][OPERATION_ALU_L_ADDC ]._latence > 0) 175 175 _function_execute[TYPE_ALU ][OPERATION_ALU_L_ADDC ] = &(operation_l_addc ); 176 //if (_param->_timing[TYPE_ALU ][OPERATION_ALU_L_SUB ]._latence > 0)177 //_function_execute[TYPE_ALU ][OPERATION_ALU_L_SUB ] = &(operation_l_sub );176 if (_param->_timing[TYPE_ALU ][OPERATION_ALU_L_SUB ]._latence > 0) 177 _function_execute[TYPE_ALU ][OPERATION_ALU_L_SUB ] = &(operation_l_sub ); 178 178 if (_param->_timing[TYPE_ALU ][OPERATION_ALU_L_AND ]._latence > 0) 179 179 _function_execute[TYPE_ALU ][OPERATION_ALU_L_AND ] = &(operation_l_and ); … … 214 214 if (_param->_timing[TYPE_TEST ][OPERATION_TEST_L_SFNE ]._latence > 0) 215 215 _function_execute[TYPE_TEST ][OPERATION_TEST_L_SFNE ] = &(operation_l_sfne ); 216 //if (_param->_timing[TYPE_MUL ][OPERATION_MUL_L_MUL ]._latence > 0)217 //_function_execute[TYPE_MUL ][OPERATION_MUL_L_MUL ] = &(operation_l_mul );218 //if (_param->_timing[TYPE_MUL ][OPERATION_MUL_L_MULU ]._latence > 0)219 // _function_execute[TYPE_DIV][OPERATION_MUL_L_MULU ] = &(operation_l_mulu );220 //if (_param->_timing[TYPE_DIV ][OPERATION_DIV_L_DIV ]._latence > 0)221 //_function_execute[TYPE_DIV ][OPERATION_DIV_L_DIV ] = &(operation_l_div );222 //if (_param->_timing[TYPE_DIV ][OPERATION_DIV_L_DIVU ]._latence > 0)223 //_function_execute[TYPE_DIV ][OPERATION_DIV_L_DIVU ] = &(operation_l_divu );216 if (_param->_timing[TYPE_MUL ][OPERATION_MUL_L_MUL ]._latence > 0) 217 _function_execute[TYPE_MUL ][OPERATION_MUL_L_MUL ] = &(operation_l_mul ); 218 if (_param->_timing[TYPE_MUL ][OPERATION_MUL_L_MULU ]._latence > 0) 219 _function_execute[TYPE_MUL ][OPERATION_MUL_L_MULU ] = &(operation_l_mulu ); 220 if (_param->_timing[TYPE_DIV ][OPERATION_DIV_L_DIV ]._latence > 0) 221 _function_execute[TYPE_DIV ][OPERATION_DIV_L_DIV ] = &(operation_l_div ); 222 if (_param->_timing[TYPE_DIV ][OPERATION_DIV_L_DIVU ]._latence > 0) 223 _function_execute[TYPE_DIV ][OPERATION_DIV_L_DIVU ] = &(operation_l_divu ); 224 224 if (_param->_timing[TYPE_EXTEND ][OPERATION_EXTEND_L_EXTEND_S ]._latence > 0) 225 225 _function_execute[TYPE_EXTEND ][OPERATION_EXTEND_L_EXTEND_S ] = &(operation_l_extend_s); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/Memory.h
r88 r101 133 133 // Address's Read must be aligned 134 134 135 if ((address & _mask_addr) != 0)136 TEST_KO("<Memory_t::read> Address is not aligned");135 // if ((address & _mask_addr) != 0) 136 // TEST_KO("<Memory_t::read> Address is not aligned"); 137 137 138 138 if (context>_nb_context) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_genMealy_dcache.cpp
r81 r101 24 24 void Load_store_unit::function_speculative_load_commit_genMealy_dcache (void) 25 25 { 26 log_ printf(FUNC,Load_store_unit,FUNCTION,"Begin");27 log_ printf(FUNC,Load_store_unit,FUNCTION,"End");26 log_begin(Load_store_unit,FUNCTION); 27 log_end (Load_store_unit,FUNCTION); 28 28 }; 29 29 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_genMealy_insert.cpp
r88 r101 24 24 void Load_store_unit::function_speculative_load_commit_genMealy_insert (void) 25 25 { 26 log_printf(FUNC,Load_store_unit,FUNCTION,"Begin"); 26 log_begin(Load_store_unit,FUNCTION); 27 log_function(Load_store_unit,FUNCTION,_name.c_str()); 27 28 28 29 // ~~~~~[ Output "memory_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 52 53 PORT_WRITE(out_MEMORY_IN_ACK [i], ack [i]); 53 54 54 log_ printf(FUNC,Load_store_unit,FUNCTION,"End");55 log_end(Load_store_unit,FUNCTION); 55 56 }; 56 57 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_genMealy_retire.cpp
r81 r101 24 24 void Load_store_unit::function_speculative_load_commit_genMealy_retire (void) 25 25 { 26 log_ printf(FUNC,Load_store_unit,FUNCTION,"Begin");27 log_ printf(FUNC,Load_store_unit,FUNCTION,"End");26 log_begin(Load_store_unit,FUNCTION); 27 log_end (Load_store_unit,FUNCTION); 28 28 }; 29 29 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_genMoore.cpp
r97 r101 24 24 void Load_store_unit::function_speculative_load_commit_genMoore (void) 25 25 { 26 log_printf(FUNC,Load_store_unit,FUNCTION,"Begin"); 26 log_begin(Load_store_unit,FUNCTION); 27 log_function(Load_store_unit,FUNCTION,_name.c_str()); 27 28 28 29 // ~~~~~[ Interface "memory_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 44 45 // Test store and load queue 45 46 46 log_printf(TRACE,Load_store_unit,FUNCTION," genMoore :Test MEMORY_OUT");47 48 log_printf(TRACE,Load_store_unit,FUNCTION," * Load queue");47 log_printf(TRACE,Load_store_unit,FUNCTION," * Test MEMORY_OUT"); 48 49 log_printf(TRACE,Load_store_unit,FUNCTION," * Load queue"); 49 50 for (internal_MEMORY_OUT_PTR=0; internal_MEMORY_OUT_PTR<_param->_size_load_queue; internal_MEMORY_OUT_PTR++) 50 51 // for (uin32_t i=0; (i<_param->_size_load_queue) and not (find_load); i++) … … 71 72 _load_queue [internal_MEMORY_OUT_PTR]._is_load_signed, 72 73 _load_queue [internal_MEMORY_OUT_PTR]._access_size); 73 log_printf(TRACE,Load_store_unit,FUNCTION," * data : %.8x",data_new); 74 log_printf(TRACE,Load_store_unit,FUNCTION," * data (old) : %.8x",data_old); 75 log_printf(TRACE,Load_store_unit,FUNCTION," * data (new) : %.8x",data_new); 74 76 log_printf(TRACE,Load_store_unit,FUNCTION," * rdata : %.8x",_load_queue [internal_MEMORY_OUT_PTR]._rdata); 75 77 log_printf(TRACE,Load_store_unit,FUNCTION," * shift : %d",_load_queue [internal_MEMORY_OUT_PTR]._shift); … … 91 93 if (not internal_MEMORY_OUT_VAL) 92 94 { 93 log_printf(TRACE,Load_store_unit,FUNCTION," * Store queue");95 log_printf(TRACE,Load_store_unit,FUNCTION," * Store queue"); 94 96 if (_store_queue [reg_STORE_QUEUE_PTR_READ]._state == STORE_QUEUE_COMMIT) 95 97 { … … 143 145 Tdcache_data_t dcache_req_wdata ; 144 146 145 log_printf(TRACE,Load_store_unit,FUNCTION," genMoore :Test DCACHE_REQ");147 log_printf(TRACE,Load_store_unit,FUNCTION," * Test DCACHE_REQ"); 146 148 147 149 internal_DCACHE_REQ_VAL = 0; … … 152 154 if (_speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._state == SPECULATIVE_ACCESS_QUEUE_WAIT_CACHE) 153 155 { 154 log_printf(TRACE,Load_store_unit,FUNCTION," * speculative_access_queue[%d]",internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ);156 log_printf(TRACE,Load_store_unit,FUNCTION," * speculative_access_queue [%d]",internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ); 155 157 156 158 internal_DCACHE_REQ_VAL = 1; … … 169 171 170 172 dcache_req_packet_id = DCACHE_REQ_IS_LOAD(_speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._load_queue_ptr_write); 171 dcache_req_address = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._address & _param->_mask_address_msb;173 dcache_req_address = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._address;// & _param->_mask_address_msb; 172 174 dcache_req_type = operation_to_dcache_type(_speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._operation); 175 176 // log_printf(TRACE,Load_store_unit,FUNCTION," * address : %.8x",_speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._address); 177 // log_printf(TRACE,Load_store_unit,FUNCTION," * mask : %.8x",_param->_mask_address_msb); 178 log_printf(TRACE,Load_store_unit,FUNCTION," * dcache_req_address : %.8x",dcache_req_address); 179 173 180 #ifdef SYSTEMC_VHDL_COMPATIBILITY 174 181 dcache_req_wdata = 0; … … 210 217 PORT_WRITE(out_DCACHE_REQ_WDATA [0], dcache_req_wdata ); 211 218 212 log_ printf(FUNC,Load_store_unit,FUNCTION,"End");219 log_end(Load_store_unit,FUNCTION); 213 220 }; 214 221 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_transition.cpp
r97 r101 260 260 ( internal_MEMORY_IN_ACK == 1)) 261 261 { 262 log_printf(TRACE,Load_store_unit,FUNCTION," * MEMORY_IN [%d]",internal_MEMORY_IN_PORT); 263 262 264 // Test operation : 263 265 //~~~~~~~~~~~~~~~~~ … … 440 442 (PORT_READ(in_MEMORY_OUT_ACK[0]) == 1)) 441 443 { 442 log_printf(TRACE,Load_store_unit,FUNCTION," * MEMORY_OUT transaction");444 log_printf(TRACE,Load_store_unit,FUNCTION," * MEMORY_OUT[0] transaction"); 443 445 444 446 switch (internal_MEMORY_OUT_SELECT_QUEUE) … … 498 500 (PORT_READ(in_DCACHE_REQ_ACK[0]) == 1)) 499 501 { 500 log_printf(TRACE,Load_store_unit,FUNCTION," * DCACHE_REQ ");502 log_printf(TRACE,Load_store_unit,FUNCTION," * DCACHE_REQ[0]"); 501 503 502 504 switch (internal_DCACHE_REQ_SELECT_QUEUE) … … 602 604 ( internal_DCACHE_RSP_ACK == 1)) 603 605 { 604 log_printf(TRACE,Load_store_unit,FUNCTION," * DCACHE_RSP ");606 log_printf(TRACE,Load_store_unit,FUNCTION," * DCACHE_RSP [0]"); 605 607 606 608 // don't use context_id : because there are one queue for all thread … … 610 612 Tdcache_error_t error = PORT_READ(in_DCACHE_RSP_ERROR [0]); 611 613 612 log_printf(TRACE,Load_store_unit,FUNCTION," * original packet_id : %d", packet_id); 614 log_printf(TRACE,Load_store_unit,FUNCTION," * original packet_id : %d" , packet_id); 615 log_printf(TRACE,Load_store_unit,FUNCTION," * rdata : %.8x", rdata); 616 log_printf(TRACE,Load_store_unit,FUNCTION," * error : %d" , error); 613 617 614 618 if (DCACHE_RSP_IS_LOAD(packet_id) == 1) … … 623 627 throw ErrorMorpheo(_("Receive of respons, but the corresponding operation don't wait a respons.")); 624 628 #endif 625 629 630 _load_queue [packet_id]._rdata = rdata; 626 631 627 632 if (error != DCACHE_ERROR_NONE) … … 639 644 // FIXME : convention : if bus error, the cache return the fautive address ! 640 645 // But, the load's address is aligned ! 641 _load_queue [packet_id]._rdata = rdata; 642 646 643 647 switch (_load_queue [packet_id]._state) 644 648 { … … 695 699 uint32_t j = (*_speculative_access_queue_control)[i]; 696 700 697 log_printf(TRACE,Load_store_unit,FUNCTION," [%.4d] %.4d %.4d %.4d, %.4d, %.4d, %.4d %.4d, %.8x, %.1d %. 6d, %.2d, %s",701 log_printf(TRACE,Load_store_unit,FUNCTION," [%.4d] %.4d %.4d %.4d, %.4d, %.4d, %.4d %.4d, %.8x, %.1d %.4d, %.2d, %s", 698 702 j, 699 703 _speculative_access_queue[j]._context_id , … … 719 723 uint32_t j = i; 720 724 721 log_printf(TRACE,Load_store_unit,FUNCTION," [%.4d] %.4d %.4d %.4d, %.4d, %.4d, %.4d, %.8x %.1x %.1d %.2d %.1d %.2d, %.8x, %.1d %. 6d, %.2d, %s",725 log_printf(TRACE,Load_store_unit,FUNCTION," [%.4d] %.4d %.4d %.4d, %.4d, %.4d, %.4d, %.8x %.1x %.1d %.2d %.1d %.2d, %.8x, %.1d %.4d, %.2d, %s", 722 726 j, 723 727 _load_queue[j]._context_id , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_vhdl.cpp
r100 r101 33 33 (_param->_size_queue, 34 34 _param->_size_internal_queue, 35 0 35 0, 36 false, 37 false 36 38 ); 37 39 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h
r97 r101 14 14 15 15 #include <iostream> 16 #include < queue>16 #include <list> 17 17 #include "Common/include/ToString.h" 18 18 #include "Common/include/Debug.h" … … 99 99 100 100 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 101 private : std:: queue<execute_queue_entry_t *> * _queue;101 private : std::list<execute_queue_entry_t *> * _queue; 102 102 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 103 103 private : Tcontrol_t internal_EXECUTE_QUEUE_IN_ACK ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_allocation.cpp
r97 r101 96 96 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 97 97 98 _queue = new std:: queue<execute_queue_entry_t *>;98 _queue = new std::list<execute_queue_entry_t *>; 99 99 100 100 #ifdef POSITION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_deallocation.cpp
r88 r101 72 72 { 73 73 delete _queue->front(); 74 _queue->pop ();74 _queue->pop_front(); 75 75 } 76 76 delete _queue; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_genMoore.cpp
r96 r101 23 23 void Execute_queue::genMoore (void) 24 24 { 25 log_printf(FUNC,Execute_queue,FUNCTION,"Begin"); 25 log_begin(Execute_queue,FUNCTION); 26 log_function(Execute_queue,FUNCTION,_name.c_str()); 26 27 27 28 // -----[ Interface "execute_queue_in" ]-------------------------------- … … 59 60 } 60 61 61 log_ printf(FUNC,Execute_queue,FUNCTION,"End");62 log_end(Execute_queue,FUNCTION); 62 63 }; 63 64 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_transition.cpp
r96 r101 23 23 void Execute_queue::transition (void) 24 24 { 25 log_printf(FUNC,Execute_queue,FUNCTION,"Begin"); 25 log_begin(Execute_queue,FUNCTION); 26 log_function(Execute_queue,FUNCTION,_name.c_str()); 26 27 27 28 if (PORT_READ(in_NRESET) == 0) … … 32 33 // > 2) flush all slot in one cycle 33 34 34 while (_queue->empty() == false) 35 _queue->pop(); 35 _queue->clear(); 36 36 } 37 37 else … … 53 53 PORT_READ(in_EXECUTE_QUEUE_IN_DATA )); 54 54 55 _queue->push (entry);55 _queue->push_back(entry); 56 56 } 57 57 … … 60 60 { 61 61 delete _queue->front(); 62 _queue->pop ();62 _queue->pop_front(); 63 63 } 64 64 } … … 69 69 #endif 70 70 71 #if DEBUG_Execute_queue and (DEBUG >= DEBUG_TRACE) 72 log_printf(TRACE,Execute_queue,FUNCTION," * Dump Execute_queue"); 73 { 74 uint32_t i=0; 75 for (std::list<execute_queue_entry_t *>::iterator it=_queue->begin(); 76 it!=_queue->end(); 77 ++it) 78 { 79 log_printf(TRACE,Execute_queue,FUNCTION," [%d] %.2d %.2d %.2d, %.4d, %.1d, %.2d %.1d, %.8x %.8x", 80 i, 81 (*it)->_context_id , 82 (*it)->_front_end_id , 83 (*it)->_ooo_engine_id, 84 (*it)->_packet_id , 85 //(*it)->_operation , 86 //(*it)->_type , 87 (*it)->_flags , 88 (*it)->_exception , 89 (*it)->_no_sequence , 90 (*it)->_address , 91 (*it)->_data 92 ); 93 i++; 94 } 95 } 96 #endif 97 71 98 72 99 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) … … 74 101 #endif 75 102 76 log_ printf(FUNC,Execute_queue,FUNCTION,"End");103 log_end(Execute_queue,FUNCTION); 77 104 }; 78 105 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl.cpp
r100 r101 35 35 (_param->_size_queue, 36 36 _param->_size_internal_queue, 37 0 37 0, 38 false, 39 false 38 40 ); 39 41 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_genMoore.cpp
r88 r101 23 23 void Write_queue::genMoore (void) 24 24 { 25 log_printf(FUNC,Write_queue,FUNCTION,"Begin"); 25 log_begin(Write_queue,FUNCTION); 26 log_function(Write_queue,FUNCTION,_name.c_str()); 26 27 27 28 // -----[ Interface "Write_queue_in" ]-------------------------------- … … 109 110 } 110 111 } 111 log_ printf(FUNC,Write_queue,FUNCTION,"End");112 log_end(Write_queue,FUNCTION); 112 113 }; 113 114 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_transition.cpp
r97 r101 24 24 void Write_queue::transition (void) 25 25 { 26 log_printf(FUNC,Write_queue,FUNCTION,"Begin"); 26 log_begin(Write_queue,FUNCTION); 27 log_function(Write_queue,FUNCTION,_name.c_str()); 27 28 28 29 if (PORT_READ(in_NRESET) == 0) … … 87 88 #endif 88 89 90 #if DEBUG_Write_queue and (DEBUG >= DEBUG_TRACE) 91 log_printf(TRACE,Write_queue,FUNCTION," * Dump Write_queue"); 92 { 93 uint32_t i=0; 94 95 for (std::list<write_queue_entry_t *>::iterator it=_queue->begin(); 96 it!=_queue->end(); 97 ++it) 98 { 99 log_printf(TRACE,Write_queue,FUNCTION," [%d] %.2d %.2d %.2d, %.4d, %.1d %.4d %.8x, %.1d %.4d %.1d, %.2d %.1d, %.8x", 100 i, 101 (*it)->_context_id , 102 (*it)->_front_end_id , 103 (*it)->_ooo_engine_id, 104 (*it)->_packet_id , 105 //(*it)->_operation , 106 //(*it)->_type , 107 (*it)->_write_rd , 108 (*it)->_num_reg_rd , 109 (*it)->_data_rd , 110 (*it)->_write_re , 111 (*it)->_num_reg_re , 112 (*it)->_data_re , 113 (*it)->_exception , 114 (*it)->_no_sequence , 115 (*it)->_address ); 116 i++; 117 } 118 } 119 #endif 120 89 121 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 90 122 end_cycle (); 91 123 #endif 92 124 93 log_ printf(FUNC,Write_queue,FUNCTION,"End");125 log_end(Write_queue,FUNCTION); 94 126 }; 95 127 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Parameters.cpp
r88 r101 104 104 0, 105 105 nb_general_register[i], 106 1); 106 1, 107 "1"); 107 108 108 109 __param_spr [i] = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters … … 122 123 0, 123 124 nb_special_register[i], 124 1); 125 1, 126 "1"); 125 127 126 128 _param_gpr [i] = new morpheo::behavioural::generic::registerfile::Parameters (__param_gpr [i]); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/src/test.cpp
r98 r101 213 213 // Initialisation 214 214 215 const bool test1 = true; 216 const bool test2 = true; 217 const bool test3 = true; 218 const bool test4 = true; 219 const bool test5 = true; 220 const bool test6 = true; 221 const bool test7 = true; 222 const bool test8 = true; 223 const bool test9 = true; 224 const bool test10 = true; 225 const bool test11 = true; 226 const bool test12 = true; 227 215 228 const uint32_t seed = 0; 216 229 //const uint32_t seed = static_cast<uint32_t>(time(NULL)); … … 264 277 uint32_t context = rand()%_param->_nb_context; 265 278 266 if ( 1)279 if (test1) 267 280 { 268 281 SC_START(3); … … 285 298 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 286 299 287 do 288 { 289 in_DECOD_EVENT_VAL [port]->write(rand()%percent_transaction_decod_event); 290 291 SC_START(1); 292 } 293 while (not ( in_DECOD_EVENT_VAL [port]->read() and 294 out_DECOD_EVENT_ACK [port]->read())); 295 in_DECOD_EVENT_VAL [port]->write(0); 300 in_DECOD_EVENT_VAL [port]->write(1); 301 302 SC_START(0); 303 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 304 TEST(Tcontrol_t, out_DECOD_EVENT_ACK [port] ->read(), 0); 305 306 SC_START(1); 307 308 in_NB_INST_DECOD_ALL [context]->write(0); 309 in_NB_INST_COMMIT_ALL [context]->write(0); 310 in_NB_INST_COMMIT_MEM [context]->write(0); 311 312 LABEL("msync (send decod)"); 313 SC_START(0); 314 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 315 TEST(Tcontrol_t, out_DECOD_EVENT_ACK [port] ->read(), 1); 316 317 SC_START(1); 318 319 in_DECOD_EVENT_VAL [port]->write(0); 320 in_NB_INST_COMMIT_ALL [context]->write(1); 296 321 297 322 LABEL("msync (wait end)"); … … 300 325 SC_START(3); 301 326 302 in_NB_INST_DECOD_ALL [context]->write(0); 303 in_NB_INST_COMMIT_ALL [context]->write(1); 304 in_NB_INST_COMMIT_MEM [context]->write(0); 305 306 SC_START(1); 307 308 LABEL("msync (send decod)"); 309 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 310 311 SC_START(3); 312 313 in_NB_INST_DECOD_ALL [context]->write(1); 314 SC_START(1); 315 316 LABEL("msync (wait end)"); 317 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0); 318 in_NB_INST_DECOD_ALL [context]->write(0); 319 in_NB_INST_COMMIT_MEM [context]->write(1); 320 321 SC_START(3); 322 323 in_NB_INST_COMMIT_MEM [context]->write(0); 327 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0); 328 in_NB_INST_COMMIT_ALL [context]->write(0); 329 324 330 SC_START(1); 325 331 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 326 332 } 327 333 328 if ( 1)334 if (test2) 329 335 { 330 336 SC_START(3); 331 337 332 338 LABEL("psync (begin)"); 333 in_NB_INST_DECOD_ALL [context]->write(1);334 in_NB_INST_COMMIT_ALL [context]->write(1);335 in_NB_INST_COMMIT_MEM [context]->write(1);336 337 uint32_t port = rand()%_param->_nb_decod_unit;338 339 in_DECOD_EVENT_CONTEXT_ID [port]->write(context);340 in_DECOD_EVENT_IS_DELAY_SLOT [port]->write(0);341 in_DECOD_EVENT_ADDRESS [port]->write(0x200);342 in_DECOD_EVENT_ADDRESS_EPCR [port]->write(0xdeadbebe);343 if (_param->_have_port_depth)344 in_DECOD_EVENT_DEPTH [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));345 in_DECOD_EVENT_TYPE [port]->write(EVENT_TYPE_PSYNC);346 347 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);348 349 do350 {351 in_DECOD_EVENT_VAL [port]->write(rand()%percent_transaction_decod_event);352 353 SC_START(1);354 }355 while (not ( in_DECOD_EVENT_VAL [port]->read() and356 out_DECOD_EVENT_ACK [port]->read()));357 in_DECOD_EVENT_VAL [port]->write(0);358 359 LABEL("psync (wait end)");360 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0);361 362 SC_START(3);363 364 in_NB_INST_DECOD_ALL [context]->write(0);365 in_NB_INST_COMMIT_ALL [context]->write(0);366 in_NB_INST_COMMIT_MEM [context]->write(0);367 368 SC_START(1);369 370 bool find = false;371 do372 {373 in_EVENT_ACK [context]->write(rand()%percent_transaction_event);374 375 SC_START(0);376 377 if (out_EVENT_VAL [context]->read() and in_EVENT_ACK [context]->read())378 {379 TEST(Taddress_t,out_EVENT_ADDRESS [context]->read(),0x201);380 TEST(Taddress_t,out_EVENT_ADDRESS_NEXT [context]->read(),0xdeadbebe);381 TEST(Tcontrol_t,out_EVENT_ADDRESS_NEXT_VAL [context]->read(),0);382 TEST(Tcontrol_t,out_EVENT_IS_DS_TAKE [context]->read(),0);383 384 find = true;385 }386 387 SC_START(1);388 }389 while (not find);390 391 in_EVENT_ACK [context]->write(0);392 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);393 }394 395 if (1)396 {397 SC_START(3);398 399 LABEL("csync (begin)");400 339 in_NB_INST_DECOD_ALL [context]->write(1); 401 340 in_NB_INST_COMMIT_ALL [context]->write(1); … … 410 349 if (_param->_have_port_depth) 411 350 in_DECOD_EVENT_DEPTH [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context])); 412 in_DECOD_EVENT_TYPE [port]->write(EVENT_TYPE_CSYNC); 413 414 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 415 416 do 417 { 418 in_DECOD_EVENT_VAL [port]->write(rand()%percent_transaction_decod_event); 419 420 SC_START(1); 421 } 422 while (not ( in_DECOD_EVENT_VAL [port]->read() and 423 out_DECOD_EVENT_ACK [port]->read())); 424 in_DECOD_EVENT_VAL [port]->write(0); 425 426 LABEL("csync (wait end)"); 427 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0); 428 429 SC_START(3); 430 351 in_DECOD_EVENT_TYPE [port]->write(EVENT_TYPE_PSYNC); 352 353 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 354 355 in_DECOD_EVENT_VAL [port]->write(1); 356 357 SC_START(0); 358 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 359 TEST(Tcontrol_t, out_DECOD_EVENT_ACK [port] ->read(), 0); 360 361 SC_START(1); 362 431 363 in_NB_INST_DECOD_ALL [context]->write(0); 432 364 in_NB_INST_COMMIT_ALL [context]->write(0); 433 365 in_NB_INST_COMMIT_MEM [context]->write(0); 434 366 367 LABEL("psync (send decod)"); 368 SC_START(0); 369 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 370 TEST(Tcontrol_t, out_DECOD_EVENT_ACK [port] ->read(), 1); 371 372 SC_START(1); 373 374 in_DECOD_EVENT_VAL [port]->write(0); 375 in_NB_INST_COMMIT_ALL [context]->write(1); 376 377 LABEL("psync (wait end)"); 378 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0); 379 380 SC_START(3); 381 382 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0); 383 in_NB_INST_COMMIT_ALL [context]->write(0); 384 435 385 SC_START(1); 436 386 … … 448 398 TEST(Tcontrol_t,out_EVENT_ADDRESS_NEXT_VAL [context]->read(),0); 449 399 TEST(Tcontrol_t,out_EVENT_IS_DS_TAKE [context]->read(),0); 450 451 find = true; 452 } 453 454 SC_START(1); 455 } 456 while (not find); 400 401 find = true; 402 } 403 404 SC_START(1); 405 } 406 while (not find); 407 457 408 in_EVENT_ACK [context]->write(0); 409 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 458 410 } 459 411 460 if ( 1)412 if (test3) 461 413 { 462 414 SC_START(3); 463 415 464 LABEL(" spr(begin)");416 LABEL("csync (begin)"); 465 417 in_NB_INST_DECOD_ALL [context]->write(1); 466 418 in_NB_INST_COMMIT_ALL [context]->write(1); … … 471 423 in_DECOD_EVENT_CONTEXT_ID [port]->write(context); 472 424 in_DECOD_EVENT_IS_DELAY_SLOT [port]->write(0); 473 in_DECOD_EVENT_ADDRESS [port]->write(0x100); 474 in_DECOD_EVENT_ADDRESS_EPCR [port]->write(0xdeadbeef); 425 in_DECOD_EVENT_ADDRESS [port]->write(0x300); 426 in_DECOD_EVENT_ADDRESS_EPCR [port]->write(0xdead0300); 427 if (_param->_have_port_depth) 428 in_DECOD_EVENT_DEPTH [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context])); 429 in_DECOD_EVENT_TYPE [port]->write(EVENT_TYPE_CSYNC); 430 431 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 432 433 in_DECOD_EVENT_VAL [port]->write(1); 434 435 SC_START(0); 436 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 437 TEST(Tcontrol_t, out_DECOD_EVENT_ACK [port] ->read(), 0); 438 439 SC_START(1); 440 441 in_NB_INST_DECOD_ALL [context]->write(0); 442 in_NB_INST_COMMIT_ALL [context]->write(0); 443 in_NB_INST_COMMIT_MEM [context]->write(0); 444 445 LABEL("csync (send decod)"); 446 SC_START(0); 447 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 448 TEST(Tcontrol_t, out_DECOD_EVENT_ACK [port] ->read(), 1); 449 450 SC_START(1); 451 452 in_DECOD_EVENT_VAL [port]->write(0); 453 in_NB_INST_COMMIT_ALL [context]->write(1); 454 455 LABEL("csync (wait end)"); 456 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0); 457 458 SC_START(3); 459 460 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0); 461 in_NB_INST_COMMIT_ALL [context]->write(0); 462 463 SC_START(1); 464 465 bool find = false; 466 do 467 { 468 in_EVENT_ACK [context]->write(rand()%percent_transaction_event); 469 470 SC_START(0); 471 472 if (out_EVENT_VAL [context]->read() and in_EVENT_ACK [context]->read()) 473 { 474 TEST(Taddress_t,out_EVENT_ADDRESS [context]->read(),0x301); 475 TEST(Taddress_t,out_EVENT_ADDRESS_NEXT [context]->read(),0xdead0300); 476 TEST(Tcontrol_t,out_EVENT_ADDRESS_NEXT_VAL [context]->read(),0); 477 TEST(Tcontrol_t,out_EVENT_IS_DS_TAKE [context]->read(),0); 478 479 find = true; 480 } 481 482 SC_START(1); 483 } 484 while (not find); 485 486 in_EVENT_ACK [context]->write(0); 487 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 488 489 } 490 491 if (test4) 492 { 493 SC_START(3); 494 495 LABEL("spr_access (begin)"); 496 in_NB_INST_DECOD_ALL [context]->write(1); 497 in_NB_INST_COMMIT_ALL [context]->write(1); 498 in_NB_INST_COMMIT_MEM [context]->write(1); 499 500 uint32_t port = rand()%_param->_nb_decod_unit; 501 502 in_DECOD_EVENT_CONTEXT_ID [port]->write(context); 503 in_DECOD_EVENT_IS_DELAY_SLOT [port]->write(0); 504 in_DECOD_EVENT_ADDRESS [port]->write(0x400); 505 in_DECOD_EVENT_ADDRESS_EPCR [port]->write(0xdead0400); 475 506 if (_param->_have_port_depth) 476 507 in_DECOD_EVENT_DEPTH [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context])); … … 479 510 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 480 511 481 do 482 { 483 in_DECOD_EVENT_VAL [port]->write(rand()%percent_transaction_decod_event); 484 485 SC_START(1); 486 } 487 while (not ( in_DECOD_EVENT_VAL [port]->read() and 488 out_DECOD_EVENT_ACK [port]->read())); 489 in_DECOD_EVENT_VAL [port]->write(0); 490 491 LABEL("spr (wait end)"); 492 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0); 493 494 SC_START(3); 495 512 in_DECOD_EVENT_VAL [port]->write(1); 513 514 SC_START(0); 515 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 516 TEST(Tcontrol_t, out_DECOD_EVENT_ACK [port] ->read(), 0); 517 518 SC_START(1); 519 496 520 in_NB_INST_DECOD_ALL [context]->write(0); 497 521 in_NB_INST_COMMIT_ALL [context]->write(0); 498 522 in_NB_INST_COMMIT_MEM [context]->write(0); 499 500 SC_START(1);501 502 LABEL("spr (send decod)");503 TEST(Tcontrol_t, out_ CONTEXT_DECOD_ENABLE[context]->read(), 1);504 505 SC_START( 3);506 507 in_NB_INST_DECOD_ALL [context]->write(1);508 SC_START(1);509 510 LABEL("spr (wait end)");511 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0); 512 in_NB_INST_DECOD_ALL [context]->write(0);513 in_NB_INST_COMMIT_ALL [context]->write(1);514 515 SC_START(3);516 517 in_NB_INST_COMMIT_ALL [context]->write(0); 523 524 LABEL("spr_access (send decod)"); 525 SC_START(0); 526 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 527 TEST(Tcontrol_t, out_DECOD_EVENT_ACK [port] ->read(), 1); 528 529 SC_START(1); 530 531 in_DECOD_EVENT_VAL [port]->write(0); 532 in_NB_INST_COMMIT_ALL [context]->write(1); 533 534 LABEL("spr_access (wait end)"); 535 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0); 536 537 SC_START(3); 538 539 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0); 540 in_NB_INST_COMMIT_ALL [context]->write(0); 541 518 542 SC_START(1); 519 543 TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1); 520 544 } 521 545 522 if ( 1)546 if (test5) 523 547 { 524 548 SC_START(3); … … 610 634 } 611 635 612 if ( 1)636 if (test6) 613 637 { 614 638 SC_START(3); … … 697 721 } 698 722 699 if ( 1)723 if (test7) 700 724 { 701 725 SC_START(3); … … 791 815 } 792 816 793 if ( 1)817 if (test8) 794 818 { 795 819 SC_START(3); … … 885 909 } 886 910 887 if ( 1)911 if (test9) 888 912 { 889 913 SC_START(3); … … 979 1003 } 980 1004 981 if ( 1)1005 if (test10) 982 1006 { 983 1007 SC_START(3); … … 1073 1097 } 1074 1098 1075 if ( 1)1099 if (test11) 1076 1100 { 1077 1101 SC_START(3); … … 1167 1191 } 1168 1192 1169 if ( 1)1193 if (test12) 1170 1194 { 1171 1195 SC_START(3); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Context_State.h
r98 r101 197 197 public : void transition (void); 198 198 public : void genMoore (void); 199 public : void genMealy_decod_event (void); 199 200 #endif 200 201 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Types.h
r83 r101 29 29 CONTEXT_STATE_KO_EXCEP_ADDR , // update address manager 30 30 CONTEXT_STATE_KO_EXCEP_SPR , // update spr (epc, esr, sr[DSX]) 31 CONTEXT_STATE_KO_MISS , // wait end of event (miss (branch, load))32 31 CONTEXT_STATE_KO_MISS_ADDR , // update address manager 33 CONTEXT_STATE_KO_MSYNC , // wait completion of all memory operation 34 CONTEXT_STATE_KO_MSYNC_ISSUE , // issue msync operation 32 CONTEXT_STATE_KO_MISS_WAITEND , // wait end of event (miss (branch, load)) 33 // CONTEXT_STATE_KO_MSYNC , // wait completion of all memory operation 34 // CONTEXT_STATE_KO_MSYNC_ISSUE , // issue msync operation 35 35 CONTEXT_STATE_KO_MSYNC_EXEC , // wait completion of msync operation 36 36 // CONTEXT_STATE_KO_PSYNC , // wait completion of all operation and after flush pipeline 37 37 CONTEXT_STATE_KO_PSYNC_FLUSH , // wait completion of all 38 38 CONTEXT_STATE_KO_PSYNC_ADDR , // wait completion of all 39 39 // CONTEXT_STATE_KO_CSYNC , // wait completion of all operation and after flush pipeline and flush ALL units (MMU, cache ...) 40 40 CONTEXT_STATE_KO_CSYNC_FLUSH , 41 41 CONTEXT_STATE_KO_CSYNC_ADDR , 42 43 42 // CONTEXT_STATE_KO_SPR , // wait completion of all operation 43 // CONTEXT_STATE_KO_SPR_ISSUE , // issue spr's access 44 44 CONTEXT_STATE_KO_SPR_EXEC // wait completion of all operation (spr access) 45 45 } context_state_t; … … 60 60 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP_ADDR : return "context_state_ko_excep_addr" ; break; 61 61 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP_SPR : return "context_state_ko_excep_spr" ; break; 62 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS : return "context_state_ko_miss" ; break;63 62 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_ADDR : return "context_state_ko_miss_addr" ; break; 64 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC : return "context_state_ko_msync" ; break; 65 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC_ISSUE : return "context_state_ko_msync_issue" ; break; 63 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_WAITEND : return "context_state_ko_miss_waitend"; break; 64 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC : return "context_state_ko_msync" ; break; 65 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC_ISSUE : return "context_state_ko_msync_issue" ; break; 66 66 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC_EXEC : return "context_state_ko_msync_exec" ; break; 67 67 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC : return "context_state_ko_psync" ; break; 68 68 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC_FLUSH : return "context_state_ko_psync_flush" ; break; 69 69 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC_ADDR : return "context_state_ko_psync_addr" ; break; 70 70 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC : return "context_state_ko_csync" ; break; 71 71 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC_FLUSH : return "context_state_ko_csync_flush" ; break; 72 72 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC_ADDR : return "context_state_ko_csync_addr" ; break; 73 74 73 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR : return "context_state_ko_spr" ; break; 74 // case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR_ISSUE : return "context_state_ko_spr_issue" ; break; 75 75 case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR_EXEC : return "context_state_ko_spr_exec" ; break; 76 76 default : return "" ; break; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State.cpp
r88 r101 82 82 } 83 83 84 for (uint32_t i=0; i<_param->_nb_decod_unit; i++)85 {86 internal_DECOD_EVENT_ACK [i] = 1;87 PORT_WRITE(out_DECOD_EVENT_ACK [i], internal_DECOD_EVENT_ACK [i]);88 }84 // for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 85 // { 86 // internal_DECOD_EVENT_ACK [i] = 1; 87 // PORT_WRITE(out_DECOD_EVENT_ACK [i], internal_DECOD_EVENT_ACK [i]); 88 // } 89 89 90 90 internal_COMMIT_EVENT_ACK = 1; … … 112 112 dont_initialize (); 113 113 sensitive << (*(in_CLOCK)).neg(); // use internal register 114 115 # ifdef SYSTEMCASS_SPECIFIC 116 // List dependency information 117 # endif 118 119 log_printf(INFO,Context_State,FUNCTION,_("Method - genMealy_decod_event")); 120 121 SC_METHOD (genMealy_decod_event); 122 dont_initialize (); 123 sensitive << (*(in_CLOCK)).neg(); // use internal register 124 for (uint32_t i=0; i<_param->_nb_decod_unit; ++i) 125 { 126 sensitive << (*(in_DECOD_EVENT_VAL [i])) // not necessary 127 << (*(in_DECOD_EVENT_TYPE [i])); 128 if (_param->_have_port_context_id) 129 sensitive << (*(in_DECOD_EVENT_CONTEXT_ID [i])); 130 } 131 for (uint32_t i=0; i<_param->_nb_context; ++i) 132 { 133 sensitive << (*(in_NB_INST_DECOD_ALL [i])) 134 << (*(in_NB_INST_COMMIT_ALL [i])) 135 << (*(in_NB_INST_COMMIT_MEM [i])); 136 } 114 137 115 138 # ifdef SYSTEMCASS_SPECIFIC -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMoore.cpp
r97 r101 105 105 context_state_t state = reg_STATE [i]; 106 106 107 PORT_WRITE(out_CONTEXT_DECOD_ENABLE [i], ((state==CONTEXT_STATE_OK ) or 108 (state==CONTEXT_STATE_KO_MSYNC_ISSUE) or 109 (state==CONTEXT_STATE_KO_SPR_ISSUE ))); 107 // PORT_WRITE(out_CONTEXT_DECOD_ENABLE [i], ((state==CONTEXT_STATE_OK ) or 108 // (state==CONTEXT_STATE_KO_MSYNC_ISSUE) or 109 // (state==CONTEXT_STATE_KO_SPR_ISSUE ))); 110 PORT_WRITE(out_CONTEXT_DECOD_ENABLE [i], (state==CONTEXT_STATE_OK)); 110 111 } 111 112 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp
r98 r101 35 35 { 36 36 // ------------------------------------------------------------------- 37 // -----[ next state ]------------------------------------------------ 38 // ------------------------------------------------------------------- 39 for (uint32_t i=0; i<_param->_nb_context; i++) 40 { 41 // uint32_t x = _param->_link_context_to_decod_unit [i]; 42 43 Tcounter_t inst_all = PORT_READ(in_NB_INST_COMMIT_ALL[i]) + PORT_READ(in_NB_INST_DECOD_ALL [i]); 44 // Tcounter_t inst_mem = PORT_READ(in_NB_INST_COMMIT_MEM[i]) + PORT_READ(in_NB_INST_DECOD_ALL [i]); 45 46 context_state_t state = reg_STATE [i]; 47 48 switch (state) 49 { 50 case CONTEXT_STATE_OK : 51 { 52 // nothing, wait an event 53 break; 54 } 55 case CONTEXT_STATE_KO_EXCEP : 56 { 57 // Wait end of all instruction 58 if (inst_all == 0) 59 state = CONTEXT_STATE_KO_EXCEP_ADDR; 60 break; 61 } 62 case CONTEXT_STATE_KO_EXCEP_ADDR : 63 { 64 // nothing, wait the update of internal register (pc) 65 break; 66 } 67 case CONTEXT_STATE_KO_MISS_WAITEND : 68 { 69 // Wait end of all instruction 70 if (inst_all == 0) 71 72 // state = CONTEXT_STATE_OK; // @@@ TODO : make MISS fast (miss decod) 73 state = CONTEXT_STATE_KO_MISS_ADDR; 74 break; 75 } 76 case CONTEXT_STATE_KO_EXCEP_SPR : 77 { 78 // nothing, wait the update of internal register (epcr, eear, sr, esr) 79 break; 80 } 81 case CONTEXT_STATE_KO_MISS_ADDR : 82 { 83 // nothing, wait the update of internal register (pc) 84 break; 85 } 86 // case CONTEXT_STATE_KO_PSYNC : 87 // { 88 // // Wait end of all instruction 89 // if (inst_all == 0) 90 // state = CONTEXT_STATE_KO_PSYNC_FLUSH; 91 // break; 92 // } 93 case CONTEXT_STATE_KO_PSYNC_FLUSH : 94 { 95 // nothing, wait end of flush (ifetch) 96 if (inst_all == 0) 97 // state = CONTEXT_STATE_KO_PSYNC_ADDR; 98 state = CONTEXT_STATE_OK; 99 100 break; 101 } 102 case CONTEXT_STATE_KO_PSYNC_ADDR : 103 { 104 // nothing, wait the pc write 105 break; 106 } 107 // case CONTEXT_STATE_KO_CSYNC : 108 // { 109 // // Wait end of all instruction 110 // if (inst_all == 0) 111 // state = CONTEXT_STATE_KO_CSYNC_FLUSH; 112 // break; 113 // } 114 case CONTEXT_STATE_KO_CSYNC_FLUSH : 115 { 116 // nothing, wait end of flush (all internal structure) 117 if (inst_all == 0) 118 state = CONTEXT_STATE_KO_CSYNC_ADDR; 119 break; 120 } 121 case CONTEXT_STATE_KO_CSYNC_ADDR : 122 { 123 // nothing, wait the pc write 124 break; 125 } 126 // case CONTEXT_STATE_KO_MSYNC : 127 // { 128 // // Wait end of memory instruction 129 // if (inst_mem == 0) 130 // state = CONTEXT_STATE_KO_MSYNC_ISSUE; 131 // break; 132 // } 133 // case CONTEXT_STATE_KO_MSYNC_ISSUE : 134 // { 135 // // Wait the msync issue 136 // if (inst_mem != 0) 137 // state = CONTEXT_STATE_KO_MSYNC_EXEC; 138 // break; 139 // } 140 case CONTEXT_STATE_KO_MSYNC_EXEC : 141 { 142 // Wait the end of msync 143 if (inst_all == 0) 144 state = CONTEXT_STATE_OK; 145 break; 146 } 147 // case CONTEXT_STATE_KO_SPR : 148 // { 149 // // Wait end of all instruction 150 // if (inst_all == 0) 151 // state = CONTEXT_STATE_KO_SPR_ISSUE; 152 // break; 153 // } 154 // case CONTEXT_STATE_KO_SPR_ISSUE : 155 // { 156 // // Wait the spr_access issue 157 // if (inst_all != 0) 158 // state = CONTEXT_STATE_KO_SPR_EXEC; 159 // break; 160 // } 161 case CONTEXT_STATE_KO_SPR_EXEC : 162 { 163 // Wait the spr_access execution 164 if (inst_all == 0) 165 state = CONTEXT_STATE_OK; 166 break; 167 } 168 169 default : 170 { 171 throw ERRORMORPHEO(FUNCTION,toString(_("Context[%d], Unknow state : %s.\n"),i,toString(state).c_str())); 172 } 173 } 174 reg_STATE [i] = state; 175 } 176 177 // ------------------------------------------------------------------- 37 178 // -----[ BRANCH_EVENT ]---------------------------------------------- 38 179 // ------------------------------------------------------------------- … … 57 198 58 199 // priority : miss > excep > spr/sync 59 uint8_t priority0 = ( state == CONTEXT_STATE_KO_MISS)?2:((state == EVENT_TYPE_EXCEPTION)?1:0);200 uint8_t priority0 = ((state == CONTEXT_STATE_KO_MISS_ADDR) or (state == CONTEXT_STATE_KO_MISS_WAITEND))?2:((state == EVENT_TYPE_EXCEPTION)?1:0); 60 201 uint8_t priority1 = 2; // miss 61 202 … … 71 212 { 72 213 Tcontrol_t dest_val = PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST_VAL[i]); 73 reg_STATE [i] = CONTEXT_STATE_KO_MISS; 214 // reg_STATE [i] = CONTEXT_STATE_KO_MISS_ADDR; 215 reg_STATE [i] = CONTEXT_STATE_KO_MISS_WAITEND; //@@@ TODO : make MISS fast (miss decod) 74 216 reg_EVENT_ADDRESS [i] = PORT_READ(in_BRANCH_EVENT_ADDRESS_SRC [i])+1; // address delay slot 75 217 reg_EVENT_ADDRESS_EPCR [i] = PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST [i]); // address_next … … 107 249 108 250 // miss > excep > spr/sync 109 uint8_t priority0 = ( state == CONTEXT_STATE_KO_MISS)?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);251 uint8_t priority0 = ((state == CONTEXT_STATE_KO_MISS_ADDR) or (state == CONTEXT_STATE_KO_MISS_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0); 110 252 uint8_t priority1 = (state == EVENT_TYPE_EXCEPTION)?1:0; 111 253 … … 120 262 if (is_valid) 121 263 { 264 log_printf(TRACE,Context_State,FUNCTION," * is_valid"); 265 122 266 // decod : 123 267 // type : csync, psync, msync, spr_access (l.mac, l.maci, l.macrc, l.msb, l.mfspr, l.mtspr), exception (l.sys) … … 130 274 case EVENT_TYPE_EXCEPTION : 131 275 { 276 log_printf(TRACE,Context_State,FUNCTION," * EVENT_TYPE_EXCEPTION"); 277 132 278 state_next = CONTEXT_STATE_KO_EXCEP; 133 279 … … 136 282 case EVENT_TYPE_SPR_ACCESS : 137 283 { 138 state_next = CONTEXT_STATE_KO_SPR ; 284 log_printf(TRACE,Context_State,FUNCTION," * EVENT_TYPE_SPR_ACCESS"); 285 286 // state_next = CONTEXT_STATE_KO_SPR ; 287 state_next = CONTEXT_STATE_KO_SPR_EXEC; 139 288 address++; // take next address 140 if (is_delay_slot)141 throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n");289 // if (is_delay_slot) 290 // throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n"); 142 291 break; 143 292 } 144 293 case EVENT_TYPE_MSYNC : 145 294 { 146 state_next = CONTEXT_STATE_KO_MSYNC; 295 log_printf(TRACE,Context_State,FUNCTION," * EVENT_TYPE_MSYNC"); 296 297 // state_next = CONTEXT_STATE_KO_MSYNC; 298 state_next = CONTEXT_STATE_KO_MSYNC_EXEC; 147 299 address++; // take next address 148 if (is_delay_slot)149 throw ERRORMORPHEO(FUNCTION,"SPR accessin delay slot, not supported.\n");300 // if (is_delay_slot) 301 // throw ERRORMORPHEO(FUNCTION,"MSYNC in delay slot, not supported.\n"); 150 302 break; 151 303 } 152 304 case EVENT_TYPE_PSYNC : 153 305 { 154 state_next = CONTEXT_STATE_KO_PSYNC; 306 log_printf(TRACE,Context_State,FUNCTION," * EVENT_TYPE_PSYNC"); 307 308 // state_next = CONTEXT_STATE_KO_PSYNC; 309 state_next = CONTEXT_STATE_KO_PSYNC_FLUSH; 155 310 address++; // take next address 156 311 if (is_delay_slot) 157 throw ERRORMORPHEO(FUNCTION," SPR accessin delay slot, not supported.\n");312 throw ERRORMORPHEO(FUNCTION,"PSYNC in delay slot, not supported.\n"); 158 313 break; 159 314 } 160 315 case EVENT_TYPE_CSYNC : 161 316 { 162 state_next = CONTEXT_STATE_KO_CSYNC; 317 log_printf(TRACE,Context_State,FUNCTION," * EVENT_TYPE_CSYNC"); 318 319 // state_next = CONTEXT_STATE_KO_CSYNC; 320 state_next = CONTEXT_STATE_KO_CSYNC_FLUSH; 163 321 address++; // take next address 164 322 if (is_delay_slot) 165 throw ERRORMORPHEO(FUNCTION," SPR accessin delay slot, not supported.\n");323 throw ERRORMORPHEO(FUNCTION,"CSYNC in delay slot, not supported.\n"); 166 324 break; 167 325 } … … 210 368 211 369 // miss > excep > spr/sync 212 uint8_t priority0 = ( state == CONTEXT_STATE_KO_MISS)?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);370 uint8_t priority0 = ((state == CONTEXT_STATE_KO_MISS_ADDR) or (state == CONTEXT_STATE_KO_MISS_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0); 213 371 uint8_t priority1 = 1; // exception 214 372 … … 277 435 278 436 // // miss > excep > spr/sync 279 // uint8_t priority0 = ( state == CONTEXT_STATE_KO_MISS)?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);437 // uint8_t priority0 = ((state == CONTEXT_STATE_KO_MISS_ADDR) or (state == CONTEXT_STATE_KO_MISS_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0); 280 438 // uint8_t priority1 = 2; // miss 281 439 … … 323 481 } 324 482 case CONTEXT_STATE_KO_MISS_ADDR : 483 // { 484 // reg_STATE [i] = CONTEXT_STATE_KO_MISS_WAITEND; //@@@ TODO : make MISS fast (miss decod) 485 // break; 486 // } 325 487 case CONTEXT_STATE_KO_PSYNC_ADDR : 326 488 case CONTEXT_STATE_KO_CSYNC_ADDR : … … 357 519 reg_STATE [i] = CONTEXT_STATE_OK; 358 520 } 359 360 // -------------------------------------------------------------------361 // -----[ next state ]------------------------------------------------362 // -------------------------------------------------------------------363 for (uint32_t i=0; i<_param->_nb_context; i++)364 {365 // uint32_t x = _param->_link_context_to_decod_unit [i];366 367 Tcounter_t inst_all = PORT_READ(in_NB_INST_COMMIT_ALL[i]) + PORT_READ(in_NB_INST_DECOD_ALL [i]);368 Tcounter_t inst_mem = PORT_READ(in_NB_INST_COMMIT_MEM[i]) + PORT_READ(in_NB_INST_DECOD_ALL [i]);369 370 context_state_t state = reg_STATE [i];371 372 switch (state)373 {374 case CONTEXT_STATE_OK :375 {376 // nothing, wait an event377 break;378 }379 case CONTEXT_STATE_KO_EXCEP :380 {381 // Wait end of all instruction382 if (inst_all == 0)383 state = CONTEXT_STATE_KO_EXCEP_ADDR;384 break;385 }386 case CONTEXT_STATE_KO_MISS :387 {388 // Wait end of all instruction389 if (inst_all == 0)390 state = CONTEXT_STATE_KO_MISS_ADDR;391 break;392 }393 case CONTEXT_STATE_KO_EXCEP_ADDR :394 {395 // nothing, wait the update of internal register (pc)396 break;397 }398 case CONTEXT_STATE_KO_EXCEP_SPR :399 {400 // nothing, wait the update of internal register (epcr, eear, sr, esr)401 break;402 }403 case CONTEXT_STATE_KO_MISS_ADDR :404 {405 // nothing, wait the update of internal register (pc)406 break;407 }408 case CONTEXT_STATE_KO_PSYNC :409 {410 // Wait end of all instruction411 if (inst_all == 0)412 // state = CONTEXT_STATE_KO_PSYNC_FLUSH;413 state = CONTEXT_STATE_KO_PSYNC_ADDR ;414 break;415 }416 // case CONTEXT_STATE_KO_PSYNC_FLUSH :417 // {418 // // nothing, wait end of flush (ifetch)419 // break;420 // }421 case CONTEXT_STATE_KO_PSYNC_ADDR :422 {423 // nothing, wait the pc write424 break;425 }426 case CONTEXT_STATE_KO_CSYNC :427 {428 // Wait end of all instruction429 if (inst_all == 0)430 state = CONTEXT_STATE_KO_CSYNC_ADDR ;431 // state = CONTEXT_STATE_KO_CSYNC_FLUSH;432 break;433 }434 // case CONTEXT_STATE_KO_CSYNC_FLUSH :435 // {436 // // nothing, wait end of flush (all internal structure)437 // break;438 // }439 case CONTEXT_STATE_KO_CSYNC_ADDR :440 {441 // nothing, wait the pc write442 break;443 }444 case CONTEXT_STATE_KO_MSYNC :445 {446 // Wait end of memory instruction447 if (inst_mem == 0)448 state = CONTEXT_STATE_KO_MSYNC_ISSUE;449 break;450 }451 case CONTEXT_STATE_KO_MSYNC_ISSUE :452 {453 // Wait the msync issue454 if (inst_mem != 0)455 state = CONTEXT_STATE_KO_MSYNC_EXEC;456 break;457 }458 case CONTEXT_STATE_KO_MSYNC_EXEC :459 {460 // Wait the end of msync461 if (inst_mem == 0)462 state = CONTEXT_STATE_OK;463 break;464 }465 case CONTEXT_STATE_KO_SPR :466 {467 // Wait end of all instruction468 if (inst_all == 0)469 state = CONTEXT_STATE_KO_SPR_ISSUE;470 break;471 }472 case CONTEXT_STATE_KO_SPR_ISSUE :473 {474 // Wait the spr_access issue475 if (inst_all != 0)476 state = CONTEXT_STATE_KO_SPR_EXEC;477 break;478 }479 case CONTEXT_STATE_KO_SPR_EXEC :480 {481 // Wait the spr_access execution482 if (inst_all == 0)483 state = CONTEXT_STATE_OK;484 break;485 }486 487 default :488 {489 throw ERRORMORPHEO(FUNCTION,toString(_("Context[%d], Unknow state : %s.\n"),i,toString(state).c_str()));490 }491 }492 reg_STATE [i] = state;493 }494 521 495 522 for (uint32_t i=0; i<_param->_nb_context; ++i) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/src/Instruction.cpp
r100 r101 29 29 void instruction_decod (decod_instruction_t * inst, decod_param_t * param) 30 30 { 31 log_printf(TRACE,Decod,"instruction_decod"," * instruction : decod"); 32 31 33 // instruction_decod_type_0 (inst,param); 32 34 33 35 uint32_t opcod = range<uint32_t>(inst->_instruction,31,26); 36 37 log_printf(TRACE,Decod,"instruction_decod"," * opcod : %d (0x%x)",opcod,opcod); 38 34 39 (* param->_function_decod[ 0][opcod]) (inst,param); 35 40 } … … 43 48 void instruction_decod_type_1 (decod_instruction_t * inst, decod_param_t * param) 44 49 { 50 log_printf(TRACE,Decod,"instruction_decod_type_1"," * instruction : decod type_1"); 51 45 52 uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 0); 53 54 log_printf(TRACE,Decod,"instruction_decod"," * opcod : %d (0x%x)",opcod,opcod); 55 46 56 (* param->_function_decod[ 1][opcod]) (inst,param); 47 57 } … … 49 59 void instruction_decod_type_2 (decod_instruction_t * inst, decod_param_t * param) 50 60 { 61 log_printf(TRACE,Decod,"instruction_decod_type_2"," * instruction : decod type_2"); 62 51 63 uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 0); 64 65 log_printf(TRACE,Decod,"instruction_decod"," * opcod : %d (0x%x)",opcod,opcod); 66 52 67 (* param->_function_decod[ 2][opcod]) (inst,param); 53 68 } … … 55 70 void instruction_decod_type_3 (decod_instruction_t * inst, decod_param_t * param) 56 71 { 72 log_printf(TRACE,Decod,"instruction_decod_type_3"," * instruction : decod type_3"); 73 57 74 uint32_t opcod = ((range<uint32_t>(inst->_instruction, 9, 8)<<4) | 58 75 (range<uint32_t>(inst->_instruction, 3, 0))); 76 77 log_printf(TRACE,Decod,"instruction_decod"," * opcod : %d (0x%x)",opcod,opcod); 78 59 79 (* param->_function_decod[ 3][opcod]) (inst,param); 60 80 } … … 62 82 void instruction_decod_type_4 (decod_instruction_t * inst, decod_param_t * param) 63 83 { 84 log_printf(TRACE,Decod,"instruction_decod_type_4"," * instruction : decod type_4"); 85 64 86 uint32_t opcod = range<uint32_t>(inst->_instruction,25,21); 87 88 log_printf(TRACE,Decod,"instruction_decod"," * opcod : %d (0x%x)",opcod,opcod); 89 65 90 (* param->_function_decod[ 4][opcod]) (inst,param); 66 91 } … … 68 93 void instruction_decod_type_5 (decod_instruction_t * inst, decod_param_t * param) 69 94 { 95 log_printf(TRACE,Decod,"instruction_decod_type_5"," * instruction : decod type_5"); 96 70 97 uint32_t opcod = range<uint32_t>(inst->_instruction,25,21); 98 99 log_printf(TRACE,Decod,"instruction_decod"," * opcod : %d (0x%x)",opcod,opcod); 100 71 101 (* param->_function_decod[ 5][opcod]) (inst,param); 72 102 } … … 74 104 void instruction_decod_type_6 (decod_instruction_t * inst, decod_param_t * param) 75 105 { 106 log_printf(TRACE,Decod,"instruction_decod_type_6"," * instruction : decod type_6"); 107 76 108 uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 6); 109 110 log_printf(TRACE,Decod,"instruction_decod"," * opcod : %d (0x%x)",opcod,opcod); 111 77 112 (* param->_function_decod[ 6][opcod]) (inst,param); 78 113 } … … 80 115 void instruction_decod_type_7 (decod_instruction_t * inst, decod_param_t * param) 81 116 { 117 log_printf(TRACE,Decod,"instruction_decod_type_7"," * instruction : decod type_7"); 118 82 119 uint32_t opcod = range<uint32_t>(inst->_instruction, 3, 0); 120 121 log_printf(TRACE,Decod,"instruction_decod"," * opcod : %d (0x%x)",opcod,opcod); 122 83 123 (* param->_function_decod[ 7][opcod]) (inst,param); 84 124 } … … 86 126 void instruction_decod_type_8 (decod_instruction_t * inst, decod_param_t * param) 87 127 { 128 log_printf(TRACE,Decod,"instruction_decod_type_8"," * instruction : decod type_8"); 129 88 130 uint32_t opcod = range<uint32_t>(inst->_instruction,16,16); 131 132 log_printf(TRACE,Decod,"instruction_decod"," * opcod : %d (0x%x)",opcod,opcod); 133 89 134 (* param->_function_decod[ 8][opcod]) (inst,param); 90 135 } … … 92 137 void instruction_decod_type_9 (decod_instruction_t * inst, decod_param_t * param) 93 138 { 139 log_printf(TRACE,Decod,"instruction_decod_type_9"," * instruction : decod type_9"); 140 94 141 uint32_t opcod = range<uint32_t>(inst->_instruction,25,23); 142 143 log_printf(TRACE,Decod,"instruction_decod"," * opcod : %d (0x%x)",opcod,opcod); 144 95 145 (* param->_function_decod[ 9][opcod]) (inst,param); 96 146 } … … 98 148 void instruction_decod_type_10 (decod_instruction_t * inst, decod_param_t * param) 99 149 { 150 log_printf(TRACE,Decod,"instruction_decod_type_10"," * instruction : decod type_10"); 151 100 152 uint32_t opcod = range<uint32_t>(inst->_instruction,25,24); 153 154 log_printf(TRACE,Decod,"instruction_decod"," * opcod : %d (0x%x)",opcod,opcod); 155 101 156 (* param->_function_decod[10][opcod]) (inst,param); 102 157 } … … 104 159 void instruction_decod_type_11 (decod_instruction_t * inst, decod_param_t * param) 105 160 { 161 log_printf(TRACE,Decod,"instruction_decod_type_11"," * instruction : decod type_11"); 162 106 163 uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 6); 164 165 log_printf(TRACE,Decod,"instruction_decod"," * opcod : %d (0x%x)",opcod,opcod); 166 107 167 (* param->_function_decod[11][opcod]) (inst,param); 108 168 } … … 110 170 void instruction_decod_type_12 (decod_instruction_t * inst, decod_param_t * param) 111 171 { 172 log_printf(TRACE,Decod,"instruction_decod_type_12"," * instruction : decod type_12"); 173 112 174 uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 6); 175 176 log_printf(TRACE,Decod,"instruction_decod"," * opcod : %d (0x%x)",opcod,opcod); 177 113 178 (* param->_function_decod[12][opcod]) (inst,param); 114 179 } … … 116 181 void instruction_decod_type_13 (decod_instruction_t * inst, decod_param_t * param) 117 182 { 183 log_printf(TRACE,Decod,"instruction_decod_type_13"," * instruction : decod type_13"); 184 118 185 uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 6); 186 187 log_printf(TRACE,Decod,"instruction_decod"," * opcod : %d (0x%x)",opcod,opcod); 188 119 189 (* param->_function_decod[13][opcod]) (inst,param); 120 190 } … … 122 192 void instruction_illegal (decod_instruction_t * inst, decod_param_t * param) 123 193 { 124 log_printf(TRACE,Decod,"instruction_illegal","instruction_illegal"); 194 log_printf(TRACE,Decod,"instruction_illegal"," * instruction : illegal"); 195 196 msgWarning(_("Instruction \"%.8x\" at address \"%.8x\" is illegal.\n"),inst->_instruction,inst->_address); 125 197 126 198 inst->_exception_use = EXCEPTION_USE_ILLEGAL_INSTRUCTION; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/include/Decod_request.h
r95 r101 156 156 0xe1e4f801,x,y,z, 157 157 BRANCH_STATE_NONE,0,BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK,0,0x0, 158 0,TYPE_ALU,OPERATION_ALU_L_ADD ,false,158 0,TYPE_ALU,OPERATION_ALU_L_ADDC,false, 159 159 0,0x00000000,1, 4,1,31,1,SPR_LOGIC_SR_CY_OV,1,15,1,SPR_LOGIC_SR_CY_OV, 160 160 EXCEPTION_USE_RANGE,EVENT_TYPE_NONE)); … … 192 192 0xa0ecffff,x,y,z, 193 193 BRANCH_STATE_NONE,0,BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK,0, 0x0, 194 0,TYPE_ALU,OPERATION_ALU_L_ADD ,false,194 0,TYPE_ALU,OPERATION_ALU_L_ADDC,false, 195 195 1,0xffffffff,1,12,0, 0,1,SPR_LOGIC_SR_CY_OV,1,7 ,1,SPR_LOGIC_SR_CY_OV, 196 196 EXCEPTION_USE_RANGE,EVENT_TYPE_NONE)); … … 201 201 0xa1110000,x,y,z, 202 202 BRANCH_STATE_NONE,0,BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK,0, 0x0, 203 0,TYPE_ALU,OPERATION_ALU_L_ADD ,false,203 0,TYPE_ALU,OPERATION_ALU_L_ADDC,false, 204 204 1,0x00000000,1,17,0, 0,1,SPR_LOGIC_SR_CY_OV,1,8 ,1,SPR_LOGIC_SR_CY_OV, 205 205 EXCEPTION_USE_RANGE,EVENT_TYPE_NONE)); … … 210 210 0xa2a707bd,x,y,z, 211 211 BRANCH_STATE_NONE,0,BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK,0, 0x0, 212 0,TYPE_ALU,OPERATION_ALU_L_ADD ,false,212 0,TYPE_ALU,OPERATION_ALU_L_ADDC,false, 213 213 1,0x000007bd,1, 7,0, 0,1,SPR_LOGIC_SR_CY_OV,1,21,1,SPR_LOGIC_SR_CY_OV, 214 214 EXCEPTION_USE_RANGE,EVENT_TYPE_NONE)); … … 358 358 0x23000000,x,y,z, 359 359 BRANCH_STATE_NONE,0,BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK,0, 0x0, 360 0,TYPE_ SPECIAL,OPERATION_SPECIAL_L_CSYNC,false,360 0,TYPE_MEMORY,OPERATION_MEMORY_SYNCHRONIZATION,false, 361 361 0,0 ,0,0 ,0,0 ,0,0 ,0,0 ,0,0 , 362 362 EXCEPTION_USE_NONE,EVENT_TYPE_CSYNC)); … … 498 498 BRANCH_STATE_NONE,0,BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK,1, z, // branch_address_dest can be determined if BRANCH_STATE != NONE (also : previous prediction) 499 499 0,TYPE_BRANCH,OPERATION_BRANCH_L_JALR,false, 500 0,0,0,0 ,1,20,0,0,1,9 ,0,0,500 1,z+1,0,0 ,1,20,0,0,1,9 ,0,0, 501 501 EXCEPTION_USE_NONE,EVENT_TYPE_NONE)); 502 502 SEQ; … … 605 605 0x22000000,x,y,z, 606 606 0,0,0,0,0,0, 607 TYPE_ SPECIAL,OPERATION_SPECIAL_L_MSYNC,false,607 TYPE_MEMORY,OPERATION_MEMORY_SYNCHRONIZATION,false, 608 608 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 609 609 EXCEPTION_USE_NONE,EVENT_TYPE_MSYNC)); … … 713 713 0x22800000,x,y,z, 714 714 0,0,0,0,0,0, 715 TYPE_ SPECIAL,OPERATION_SPECIAL_L_PSYNC,false,715 TYPE_MEMORY,OPERATION_MEMORY_SYNCHRONIZATION,false, 716 716 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 717 717 EXCEPTION_USE_NONE,EVENT_TYPE_PSYNC)); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/test.cpp
r88 r101 99 99 // ALLOC1_SC_SIGNAL( in_PREDICT_CAN_CONTINUE ," in_PREDICT_CAN_CONTINUE ",Tcontrol_t ,_param->_nb_inst_decod); 100 100 ALLOC1_SC_SIGNAL( in_CONTEXT_DECOD_ENABLE ," in_CONTEXT_DECOD_ENABLE ",Tcontrol_t ,_param->_nb_context); 101 ALLOC1_SC_SIGNAL( in_CONTEXT_DEPTH_VAL ," in_CONTEXT_DEPTH_VAL ",Tcontrol_t ,_param->_nb_context); 101 102 ALLOC1_SC_SIGNAL( in_CONTEXT_DEPTH ," in_CONTEXT_DEPTH ",Tdepth_t ,_param->_nb_context); 102 103 ALLOC_SC_SIGNAL (out_CONTEXT_EVENT_VAL ,"out_CONTEXT_EVENT_VAL ",Tcontrol_t ); … … 178 179 // INSTANCE1_SC_SIGNAL(_Decod, in_PREDICT_CAN_CONTINUE ,_param->_nb_inst_decod); 179 180 INSTANCE1_SC_SIGNAL(_Decod, in_CONTEXT_DECOD_ENABLE ,_param->_nb_context); 181 INSTANCE1_SC_SIGNAL(_Decod, in_CONTEXT_DEPTH_VAL ,_param->_nb_context); 180 182 for (uint32_t i=0; i<_param->_nb_context; i++) 181 183 if (_param->_have_port_depth) … … 221 223 222 224 LABEL("Loop of Test"); 225 226 for (uint32_t i=0; i<_param->_nb_context; i++) 227 in_CONTEXT_DEPTH_VAL [i]->write(1); 223 228 224 229 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) … … 475 480 476 481 delete [] in_CONTEXT_DECOD_ENABLE ; 482 delete [] in_CONTEXT_DEPTH_VAL ; 477 483 delete [] in_CONTEXT_DEPTH ; 478 484 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Decod.h
r88 r101 120 120 // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 121 121 public : SC_IN (Tcontrol_t ) ** in_CONTEXT_DECOD_ENABLE ;//[nb_context] 122 public : SC_IN (Tcontrol_t ) ** in_CONTEXT_DEPTH_VAL ;//[nb_context] 122 123 public : SC_IN (Tdepth_t ) ** in_CONTEXT_DEPTH ;//[nb_context] 123 124 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod.cpp
r88 r101 103 103 if (_param->_have_port_depth) 104 104 sensitive << (*(in_IFETCH_BRANCH_UPDATE_PREDICTION_ID [i])); 105 sensitive << (*(in_CONTEXT_DEPTH_VAL [i])); 105 106 if (_param->_have_port_depth) 106 107 sensitive << (*(in_CONTEXT_DEPTH [i])); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_allocation.cpp
r95 r101 23 23 void Decod::allocation ( 24 24 #ifdef STATISTICS 25 25 morpheo::behavioural::Parameters_Statistics * param_statistics 26 26 #else 27 27 void 28 28 #endif 29 29 ) 30 30 { 31 31 log_printf(FUNC,Decod,FUNCTION,"Begin"); … … 34 34 35 35 Entity * entity = _component->set_entity (_name 36 36 ,"Decod" 37 37 #ifdef POSITION 38 38 ,COMBINATORY 39 39 #endif 40 40 ); 41 41 42 42 _interfaces = entity->set_interfaces(); … … 46 46 Interface * interface = _interfaces->set_interface("" 47 47 #ifdef POSITION 48 49 50 48 ,IN 49 ,SOUTH, 50 "Generalist interface" 51 51 #endif 52 52 ); 53 53 54 54 in_CLOCK = interface->set_signal_clk ("clock" ,1, CLOCK_VHDL_YES); … … 77 77 } 78 78 79 // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 79 // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 80 80 { 81 81 ALLOC1_INTERFACE("decod", OUT, EAST, "Instructiont decoded", _param->_nb_inst_decod); … … 129 129 130 130 ALLOC1_SIGNAL_IN (in_CONTEXT_DECOD_ENABLE,"decod_enable",Tcontrol_t,1); 131 ALLOC1_SIGNAL_IN (in_CONTEXT_DEPTH_VAL ,"depth_val" ,Tcontrol_t,1); 131 132 ALLOC1_SIGNAL_IN (in_CONTEXT_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth); 132 133 } 133 134 134 // ~~~~~[ Interface : "context_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 135 // ~~~~~[ Interface : "context_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 135 136 { 136 137 ALLOC_INTERFACE("context_event", OUT, NORTH, "context's evenement"); … … 164 165 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 165 166 _priority = new generic::priority::Priority (_name+"_priority" , 166 167 168 169 170 167 _param->_priority , 168 _param->_load_balancing, 169 _param->_nb_context , 170 _param->_nb_inst_fetch , 171 _param->_nb_context_select); 171 172 172 173 const uint32_t nb_opcod_type = 14; 173 174 const uint32_t tab_opcod_type [] = {MAX_OPCOD_0, 174 175 176 177 178 179 180 181 182 183 184 185 186 175 MAX_OPCOD_1 , 176 MAX_OPCOD_2 , 177 MAX_OPCOD_3 , 178 MAX_OPCOD_4 , 179 MAX_OPCOD_5 , 180 MAX_OPCOD_6 , 181 MAX_OPCOD_7 , 182 MAX_OPCOD_8 , 183 MAX_OPCOD_9 , 184 MAX_OPCOD_10, 185 MAX_OPCOD_11, 186 MAX_OPCOD_12, 187 MAX_OPCOD_13}; 187 188 188 189 _function_decod = new function_decod_t *** [_param->_nb_context]; … … 190 191 for (uint32_t i=0; i<_param->_nb_context; i++) 191 192 { 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 _function_decod[i][0][OPCOD_2 ] = &(instruction_decod_type_2 ); // Instruction ORVDX64208 _function_decod[i][0][OPCOD_3 ] = &(instruction_decod_type_3 ); // Instructions Register-Register209 210 211 212 _function_decod[i][0][OPCOD_7 ] = &(instruction_decod_type_7 ); // Instructions multiply with HI-LO213 _function_decod[i][0][OPCOD_8 ] = &(instruction_decod_type_8 ); // Instructions acces at HI-LO214 _function_decod[i][0][OPCOD_9 ] = &(instruction_decod_type_9 ); // Instructions special215 _function_decod[i][0][OPCOD_10] = &(instruction_decod_type_10); // Instructions no operation216 217 _function_decod[i][3][OPCOD_12] = &(instruction_decod_type_12); // Instructions extend218 _function_decod[i][3][OPCOD_13] = &(instruction_decod_type_13); // Instructions extend (64b)219 220 if (_param->_instruction_implemeted[i][INSTRUCTION_L_ADD ]) _function_decod[i][ 3][OPCOD_L_ADD ] = &(instruction_l_add);221 if (_param->_instruction_implemeted[i][INSTRUCTION_L_ADDC ]) _function_decod[i][ 3][OPCOD_L_ADDC ] = &(instruction_l_addc);222 if (_param->_instruction_implemeted[i][INSTRUCTION_L_ADDI ]) _function_decod[i][ 0][OPCOD_L_ADDI ] = &(instruction_l_addi);223 if (_param->_instruction_implemeted[i][INSTRUCTION_L_ADDIC ]) _function_decod[i][ 0][OPCOD_L_ADDIC ] = &(instruction_l_addic);224 if (_param->_instruction_implemeted[i][INSTRUCTION_L_AND ]) _function_decod[i][ 3][OPCOD_L_AND ] = &(instruction_l_and);225 if (_param->_instruction_implemeted[i][INSTRUCTION_L_ANDI ]) _function_decod[i][ 0][OPCOD_L_ANDI ] = &(instruction_l_andi);226 if (_param->_instruction_implemeted[i][INSTRUCTION_L_BF ]) _function_decod[i][ 0][OPCOD_L_BF ] = &(instruction_l_bf);227 if (_param->_instruction_implemeted[i][INSTRUCTION_L_BNF ]) _function_decod[i][ 0][OPCOD_L_BNF ] = &(instruction_l_bnf);228 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CMOV ]) _function_decod[i][ 3][OPCOD_L_CMOV ] = &(instruction_l_cmov);229 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CSYNC ]) _function_decod[i][ 9][OPCOD_L_CSYNC ] = &(instruction_l_csync);230 if (_param->_instruction_implemeted[i][INSTRUCTION_L_DIV ]) _function_decod[i][ 3][OPCOD_L_DIV ] = &(instruction_l_div);231 if (_param->_instruction_implemeted[i][INSTRUCTION_L_DIVU ]) _function_decod[i][ 3][OPCOD_L_DIVU ] = &(instruction_l_divu);232 if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTBS ]) _function_decod[i][12][OPCOD_L_EXTBS ] = &(instruction_l_extbs);233 if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTBZ ]) _function_decod[i][12][OPCOD_L_EXTBZ ] = &(instruction_l_extbz);234 if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTHS ]) _function_decod[i][12][OPCOD_L_EXTHS ] = &(instruction_l_exths);235 if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTHZ ]) _function_decod[i][12][OPCOD_L_EXTHZ ] = &(instruction_l_exthz);236 if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTWS ]) _function_decod[i][13][OPCOD_L_EXTWS ] = &(instruction_l_extws);237 if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTWZ ]) _function_decod[i][13][OPCOD_L_EXTWZ ] = &(instruction_l_extwz);238 if (_param->_instruction_implemeted[i][INSTRUCTION_L_FF1 ]) _function_decod[i][ 3][OPCOD_L_FF1 ] = &(instruction_l_ff1);239 if (_param->_instruction_implemeted[i][INSTRUCTION_L_FL1 ]) _function_decod[i][ 3][OPCOD_L_FL1 ] = &(instruction_l_fl1);240 if (_param->_instruction_implemeted[i][INSTRUCTION_L_J ]) _function_decod[i][ 0][OPCOD_L_J ] = &(instruction_l_j);241 if (_param->_instruction_implemeted[i][INSTRUCTION_L_JAL ]) _function_decod[i][ 0][OPCOD_L_JAL ] = &(instruction_l_jal);242 if (_param->_instruction_implemeted[i][INSTRUCTION_L_JALR ]) _function_decod[i][ 0][OPCOD_L_JALR ] = &(instruction_l_jalr);243 if (_param->_instruction_implemeted[i][INSTRUCTION_L_JR ]) _function_decod[i][ 0][OPCOD_L_JR ] = &(instruction_l_jr);244 if (_param->_instruction_implemeted[i][INSTRUCTION_L_LBS ]) _function_decod[i][ 0][OPCOD_L_LBS ] = &(instruction_l_lbs);245 if (_param->_instruction_implemeted[i][INSTRUCTION_L_LBZ ]) _function_decod[i][ 0][OPCOD_L_LBZ ] = &(instruction_l_lbz);246 if (_param->_instruction_implemeted[i][INSTRUCTION_L_LD ]) _function_decod[i][ 0][OPCOD_L_LD ] = &(instruction_l_ld);247 if (_param->_instruction_implemeted[i][INSTRUCTION_L_LHS ]) _function_decod[i][ 0][OPCOD_L_LHS ] = &(instruction_l_lhs);248 if (_param->_instruction_implemeted[i][INSTRUCTION_L_LHZ ]) _function_decod[i][ 0][OPCOD_L_LHZ ] = &(instruction_l_lhz);249 if (_param->_instruction_implemeted[i][INSTRUCTION_L_LWS ]) _function_decod[i][ 0][OPCOD_L_LWS ] = &(instruction_l_lws);250 if (_param->_instruction_implemeted[i][INSTRUCTION_L_LWZ ]) _function_decod[i][ 0][OPCOD_L_LWZ ] = &(instruction_l_lwz);251 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MAC ]) _function_decod[i][ 7][OPCOD_L_MAC ] = &(instruction_l_mac);252 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MACI ]) _function_decod[i][ 0][OPCOD_L_MACI ] = &(instruction_l_maci);253 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MACRC ]) _function_decod[i][ 8][OPCOD_L_MACRC ] = &(instruction_l_macrc);254 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MFSPR ]) _function_decod[i][ 0][OPCOD_L_MFSPR ] = &(instruction_l_mfspr);255 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MOVHI ]) _function_decod[i][ 8][OPCOD_L_MOVHI ] = &(instruction_l_movhi);256 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MSB ]) _function_decod[i][ 7][OPCOD_L_MSB ] = &(instruction_l_msb);257 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MSYNC ]) _function_decod[i][ 9][OPCOD_L_MSYNC ] = &(instruction_l_msync);258 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MTSPR ]) _function_decod[i][ 0][OPCOD_L_MTSPR ] = &(instruction_l_mtspr);259 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MUL ]) _function_decod[i][ 3][OPCOD_L_MUL ] = &(instruction_l_mul);260 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MULI ]) _function_decod[i][ 0][OPCOD_L_MULI ] = &(instruction_l_muli);261 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MULU ]) _function_decod[i][ 3][OPCOD_L_MULU ] = &(instruction_l_mulu);262 if (_param->_instruction_implemeted[i][INSTRUCTION_L_NOP ]) _function_decod[i][10][OPCOD_L_NOP ] = &(instruction_l_nop);263 if (_param->_instruction_implemeted[i][INSTRUCTION_L_OR ]) _function_decod[i][ 3][OPCOD_L_OR ] = &(instruction_l_or);264 if (_param->_instruction_implemeted[i][INSTRUCTION_L_ORI ]) _function_decod[i][ 0][OPCOD_L_ORI ] = &(instruction_l_ori);265 if (_param->_instruction_implemeted[i][INSTRUCTION_L_PSYNC ]) _function_decod[i][ 9][OPCOD_L_PSYNC ] = &(instruction_l_psync);266 if (_param->_instruction_implemeted[i][INSTRUCTION_L_RFE ]) _function_decod[i][ 0][OPCOD_L_RFE ] = &(instruction_l_rfe);267 if (_param->_instruction_implemeted[i][INSTRUCTION_L_ROR ]) _function_decod[i][11][OPCOD_L_ROR ] = &(instruction_l_ror);268 if (_param->_instruction_implemeted[i][INSTRUCTION_L_RORI ]) _function_decod[i][ 6][OPCOD_L_RORI ] = &(instruction_l_rori);269 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SB ]) _function_decod[i][ 0][OPCOD_L_SB ] = &(instruction_l_sb);270 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SD ]) _function_decod[i][ 0][OPCOD_L_SD ] = &(instruction_l_sd);271 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFEQ ]) _function_decod[i][ 4][OPCOD_L_SFEQ ] = &(instruction_l_sfeq);272 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFEQI ]) _function_decod[i][ 5][OPCOD_L_SFEQI ] = &(instruction_l_sfeqi);273 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGES ]) _function_decod[i][ 4][OPCOD_L_SFGES ] = &(instruction_l_sfges);274 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGESI ]) _function_decod[i][ 5][OPCOD_L_SFGESI ] = &(instruction_l_sfgesi);275 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGEU ]) _function_decod[i][ 4][OPCOD_L_SFGEU ] = &(instruction_l_sfgeu);276 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGEUI ]) _function_decod[i][ 5][OPCOD_L_SFGEUI ] = &(instruction_l_sfgeui);277 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGTS ]) _function_decod[i][ 4][OPCOD_L_SFGTS ] = &(instruction_l_sfgts);278 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGTSI ]) _function_decod[i][ 5][OPCOD_L_SFGTSI ] = &(instruction_l_sfgtsi);279 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGTU ]) _function_decod[i][ 4][OPCOD_L_SFGTU ] = &(instruction_l_sfgtu);280 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGTUI ]) _function_decod[i][ 5][OPCOD_L_SFGTUI ] = &(instruction_l_sfgtui);281 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLES ]) _function_decod[i][ 4][OPCOD_L_SFLES ] = &(instruction_l_sfles);282 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLESI ]) _function_decod[i][ 5][OPCOD_L_SFLESI ] = &(instruction_l_sflesi);283 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLEU ]) _function_decod[i][ 4][OPCOD_L_SFLEU ] = &(instruction_l_sfleu);284 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLEUI ]) _function_decod[i][ 5][OPCOD_L_SFLEUI ] = &(instruction_l_sfleui);285 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLTS ]) _function_decod[i][ 4][OPCOD_L_SFLTS ] = &(instruction_l_sflts);286 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLTSI ]) _function_decod[i][ 5][OPCOD_L_SFLTSI ] = &(instruction_l_sfltsi);287 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLTU ]) _function_decod[i][ 4][OPCOD_L_SFLTU ] = &(instruction_l_sfltu);288 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLTUI ]) _function_decod[i][ 5][OPCOD_L_SFLTUI ] = &(instruction_l_sfltui);289 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFNE ]) _function_decod[i][ 4][OPCOD_L_SFNE ] = &(instruction_l_sfne);290 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFNEI ]) _function_decod[i][ 5][OPCOD_L_SFNEI ] = &(instruction_l_sfnei);291 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SH ]) _function_decod[i][ 0][OPCOD_L_SH ] = &(instruction_l_sh);292 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SLL ]) _function_decod[i][11][OPCOD_L_SLL ] = &(instruction_l_sll);293 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SLLI ]) _function_decod[i][ 6][OPCOD_L_SLLI ] = &(instruction_l_slli);294 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SRA ]) _function_decod[i][11][OPCOD_L_SRA ] = &(instruction_l_sra);295 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SRAI ]) _function_decod[i][ 6][OPCOD_L_SRAI ] = &(instruction_l_srai);296 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SRL ]) _function_decod[i][11][OPCOD_L_SRL ] = &(instruction_l_srl);297 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SRLI ]) _function_decod[i][ 6][OPCOD_L_SRLI ] = &(instruction_l_srli);298 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SUB ]) _function_decod[i][ 3][OPCOD_L_SUB ] = &(instruction_l_sub);299 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SW ]) _function_decod[i][ 0][OPCOD_L_SW ] = &(instruction_l_sw);300 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SYS ]) _function_decod[i][ 9][OPCOD_L_SYS ] = &(instruction_l_sys);301 if (_param->_instruction_implemeted[i][INSTRUCTION_L_TRAP ]) _function_decod[i][ 9][OPCOD_L_TRAP ] = &(instruction_l_trap);302 if (_param->_instruction_implemeted[i][INSTRUCTION_L_XOR ]) _function_decod[i][ 3][OPCOD_L_XOR ] = &(instruction_l_xor);303 if (_param->_instruction_implemeted[i][INSTRUCTION_L_XORI ]) _function_decod[i][ 0][OPCOD_L_XORI ] = &(instruction_l_xori);304 // 305 // 306 // 307 // 308 // 309 // 310 // 311 // 312 // 313 // 314 // 315 // 316 // 317 // 318 // 319 // 320 // 321 // 322 // 323 // 324 // 325 // 326 // 327 // 328 // 329 // 330 // 331 // 332 // 333 // 334 // 335 // 336 // 337 // 338 // 339 // 340 // 341 // 342 // 343 // 344 // 345 // 346 // 347 // 348 // 349 // 350 // 351 // 352 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_AND ]) _function_decod[i][ 2][OPCOD_LV_AND ] = &(instruction_lv_and);353 // 354 // 355 // 356 // 357 // 358 // 359 // 360 // 361 // 362 // 363 // 364 // 365 // 366 // 367 // 368 // 369 // 370 // 371 // 372 // 373 // 374 // 375 // 376 // 377 // 378 // 379 // 380 // 381 // 382 // 383 // 384 // 385 // 386 // 387 // 388 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_NAND ]) _function_decod[i][ 2][OPCOD_LV_NAND ] = &(instruction_lv_nand);389 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_NOR ]) _function_decod[i][ 2][OPCOD_LV_NOR ] = &(instruction_lv_nor);390 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_OR ]) _function_decod[i][ 2][OPCOD_LV_OR ] = &(instruction_lv_or);391 // 392 // 393 // 394 // 395 // 396 // 397 // 398 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_RL_B ]) _function_decod[i][ 2][OPCOD_LV_RL_B ] = &(instruction_lv_rl_b);399 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_RL_H ]) _function_decod[i][ 2][OPCOD_LV_RL_H ] = &(instruction_lv_rl_h);400 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SLL ]) _function_decod[i][ 2][OPCOD_LV_SLL ] = &(instruction_lv_sll);401 // 402 // 403 // 404 // 405 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SRL ]) _function_decod[i][ 2][OPCOD_LV_SRL ] = &(instruction_lv_srl);406 // 407 // 408 // 409 // 410 // 411 // 412 // 413 // 414 // 415 // 416 // 417 // 418 // 419 420 421 422 423 424 425 426 427 428 429 // 430 // 431 // 432 // 433 // 434 // 435 436 437 438 439 440 441 442 443 444 // 445 // 446 // 447 // 448 // 449 // 193 _function_decod [i] = new function_decod_t ** [nb_opcod_type]; 194 _function_custom [i] = new function_decod_t ** [nb_opcod_type]; 195 for (uint32_t j=0; j<nb_opcod_type; j++) 196 { 197 _function_decod [i][j] = new function_decod_t * [tab_opcod_type[j]]; 198 _function_custom [i][j] = new function_decod_t * [tab_opcod_type[j]]; 199 for (uint32_t k=0; k<tab_opcod_type[j]; k++) 200 { 201 _function_decod [i][j][k] = &(instruction_illegal); 202 _function_custom [i][j][k] = &(instruction_illegal); 203 } 204 } 205 206 // Create indirection 207 _function_decod[i][0][OPCOD_1 ] = &(instruction_decod_type_1 ); // Instruction ORFPX32/64 208 _function_decod[i][0][OPCOD_2 ] = &(instruction_decod_type_2 ); // Instruction ORVDX64 209 _function_decod[i][0][OPCOD_3 ] = &(instruction_decod_type_3 ); // Instructions Register-Register 210 _function_decod[i][0][OPCOD_4 ] = &(instruction_decod_type_4 ); // Instructions "set flag" with register 211 _function_decod[i][0][OPCOD_5 ] = &(instruction_decod_type_5 ); // Instructions "set flag" with immediat 212 _function_decod[i][0][OPCOD_6 ] = &(instruction_decod_type_6 ); // Instruction Shift/Rotate with immediat 213 _function_decod[i][0][OPCOD_7 ] = &(instruction_decod_type_7 ); // Instructions multiply with HI-LO 214 _function_decod[i][0][OPCOD_8 ] = &(instruction_decod_type_8 ); // Instructions acces at HI-LO 215 _function_decod[i][0][OPCOD_9 ] = &(instruction_decod_type_9 ); // Instructions special 216 _function_decod[i][0][OPCOD_10] = &(instruction_decod_type_10); // Instructions no operation 217 _function_decod[i][3][OPCOD_11] = &(instruction_decod_type_11); // Instruction Shift/Rotate with register 218 _function_decod[i][3][OPCOD_12] = &(instruction_decod_type_12); // Instructions extend 219 _function_decod[i][3][OPCOD_13] = &(instruction_decod_type_13); // Instructions extend (64b) 220 221 if (_param->_instruction_implemeted[i][INSTRUCTION_L_ADD ]) _function_decod[i][ 3][OPCOD_L_ADD ] = &(instruction_l_add ); 222 if (_param->_instruction_implemeted[i][INSTRUCTION_L_ADDC ]) _function_decod[i][ 3][OPCOD_L_ADDC ] = &(instruction_l_addc ); 223 if (_param->_instruction_implemeted[i][INSTRUCTION_L_ADDI ]) _function_decod[i][ 0][OPCOD_L_ADDI ] = &(instruction_l_addi ); 224 if (_param->_instruction_implemeted[i][INSTRUCTION_L_ADDIC ]) _function_decod[i][ 0][OPCOD_L_ADDIC ] = &(instruction_l_addic ); 225 if (_param->_instruction_implemeted[i][INSTRUCTION_L_AND ]) _function_decod[i][ 3][OPCOD_L_AND ] = &(instruction_l_and ); 226 if (_param->_instruction_implemeted[i][INSTRUCTION_L_ANDI ]) _function_decod[i][ 0][OPCOD_L_ANDI ] = &(instruction_l_andi ); 227 if (_param->_instruction_implemeted[i][INSTRUCTION_L_BF ]) _function_decod[i][ 0][OPCOD_L_BF ] = &(instruction_l_bf ); 228 if (_param->_instruction_implemeted[i][INSTRUCTION_L_BNF ]) _function_decod[i][ 0][OPCOD_L_BNF ] = &(instruction_l_bnf ); 229 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CMOV ]) _function_decod[i][ 3][OPCOD_L_CMOV ] = &(instruction_l_cmov ); 230 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CSYNC ]) _function_decod[i][ 9][OPCOD_L_CSYNC ] = &(instruction_l_csync ); 231 if (_param->_instruction_implemeted[i][INSTRUCTION_L_DIV ]) _function_decod[i][ 3][OPCOD_L_DIV ] = &(instruction_l_div ); 232 if (_param->_instruction_implemeted[i][INSTRUCTION_L_DIVU ]) _function_decod[i][ 3][OPCOD_L_DIVU ] = &(instruction_l_divu ); 233 if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTBS ]) _function_decod[i][12][OPCOD_L_EXTBS ] = &(instruction_l_extbs ); 234 if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTBZ ]) _function_decod[i][12][OPCOD_L_EXTBZ ] = &(instruction_l_extbz ); 235 if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTHS ]) _function_decod[i][12][OPCOD_L_EXTHS ] = &(instruction_l_exths ); 236 if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTHZ ]) _function_decod[i][12][OPCOD_L_EXTHZ ] = &(instruction_l_exthz ); 237 if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTWS ]) _function_decod[i][13][OPCOD_L_EXTWS ] = &(instruction_l_extws ); 238 if (_param->_instruction_implemeted[i][INSTRUCTION_L_EXTWZ ]) _function_decod[i][13][OPCOD_L_EXTWZ ] = &(instruction_l_extwz ); 239 if (_param->_instruction_implemeted[i][INSTRUCTION_L_FF1 ]) _function_decod[i][ 3][OPCOD_L_FF1 ] = &(instruction_l_ff1 ); 240 if (_param->_instruction_implemeted[i][INSTRUCTION_L_FL1 ]) _function_decod[i][ 3][OPCOD_L_FL1 ] = &(instruction_l_fl1 ); 241 if (_param->_instruction_implemeted[i][INSTRUCTION_L_J ]) _function_decod[i][ 0][OPCOD_L_J ] = &(instruction_l_j ); 242 if (_param->_instruction_implemeted[i][INSTRUCTION_L_JAL ]) _function_decod[i][ 0][OPCOD_L_JAL ] = &(instruction_l_jal ); 243 if (_param->_instruction_implemeted[i][INSTRUCTION_L_JALR ]) _function_decod[i][ 0][OPCOD_L_JALR ] = &(instruction_l_jalr ); 244 if (_param->_instruction_implemeted[i][INSTRUCTION_L_JR ]) _function_decod[i][ 0][OPCOD_L_JR ] = &(instruction_l_jr ); 245 if (_param->_instruction_implemeted[i][INSTRUCTION_L_LBS ]) _function_decod[i][ 0][OPCOD_L_LBS ] = &(instruction_l_lbs ); 246 if (_param->_instruction_implemeted[i][INSTRUCTION_L_LBZ ]) _function_decod[i][ 0][OPCOD_L_LBZ ] = &(instruction_l_lbz ); 247 if (_param->_instruction_implemeted[i][INSTRUCTION_L_LD ]) _function_decod[i][ 0][OPCOD_L_LD ] = &(instruction_l_ld ); 248 if (_param->_instruction_implemeted[i][INSTRUCTION_L_LHS ]) _function_decod[i][ 0][OPCOD_L_LHS ] = &(instruction_l_lhs ); 249 if (_param->_instruction_implemeted[i][INSTRUCTION_L_LHZ ]) _function_decod[i][ 0][OPCOD_L_LHZ ] = &(instruction_l_lhz ); 250 if (_param->_instruction_implemeted[i][INSTRUCTION_L_LWS ]) _function_decod[i][ 0][OPCOD_L_LWS ] = &(instruction_l_lws ); 251 if (_param->_instruction_implemeted[i][INSTRUCTION_L_LWZ ]) _function_decod[i][ 0][OPCOD_L_LWZ ] = &(instruction_l_lwz ); 252 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MAC ]) _function_decod[i][ 7][OPCOD_L_MAC ] = &(instruction_l_mac ); 253 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MACI ]) _function_decod[i][ 0][OPCOD_L_MACI ] = &(instruction_l_maci ); 254 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MACRC ]) _function_decod[i][ 8][OPCOD_L_MACRC ] = &(instruction_l_macrc ); 255 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MFSPR ]) _function_decod[i][ 0][OPCOD_L_MFSPR ] = &(instruction_l_mfspr ); 256 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MOVHI ]) _function_decod[i][ 8][OPCOD_L_MOVHI ] = &(instruction_l_movhi ); 257 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MSB ]) _function_decod[i][ 7][OPCOD_L_MSB ] = &(instruction_l_msb ); 258 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MSYNC ]) _function_decod[i][ 9][OPCOD_L_MSYNC ] = &(instruction_l_msync ); 259 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MTSPR ]) _function_decod[i][ 0][OPCOD_L_MTSPR ] = &(instruction_l_mtspr ); 260 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MUL ]) _function_decod[i][ 3][OPCOD_L_MUL ] = &(instruction_l_mul ); 261 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MULI ]) _function_decod[i][ 0][OPCOD_L_MULI ] = &(instruction_l_muli ); 262 if (_param->_instruction_implemeted[i][INSTRUCTION_L_MULU ]) _function_decod[i][ 3][OPCOD_L_MULU ] = &(instruction_l_mulu ); 263 if (_param->_instruction_implemeted[i][INSTRUCTION_L_NOP ]) _function_decod[i][10][OPCOD_L_NOP ] = &(instruction_l_nop ); 264 if (_param->_instruction_implemeted[i][INSTRUCTION_L_OR ]) _function_decod[i][ 3][OPCOD_L_OR ] = &(instruction_l_or ); 265 if (_param->_instruction_implemeted[i][INSTRUCTION_L_ORI ]) _function_decod[i][ 0][OPCOD_L_ORI ] = &(instruction_l_ori ); 266 if (_param->_instruction_implemeted[i][INSTRUCTION_L_PSYNC ]) _function_decod[i][ 9][OPCOD_L_PSYNC ] = &(instruction_l_psync ); 267 if (_param->_instruction_implemeted[i][INSTRUCTION_L_RFE ]) _function_decod[i][ 0][OPCOD_L_RFE ] = &(instruction_l_rfe ); 268 if (_param->_instruction_implemeted[i][INSTRUCTION_L_ROR ]) _function_decod[i][11][OPCOD_L_ROR ] = &(instruction_l_ror ); 269 if (_param->_instruction_implemeted[i][INSTRUCTION_L_RORI ]) _function_decod[i][ 6][OPCOD_L_RORI ] = &(instruction_l_rori ); 270 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SB ]) _function_decod[i][ 0][OPCOD_L_SB ] = &(instruction_l_sb ); 271 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SD ]) _function_decod[i][ 0][OPCOD_L_SD ] = &(instruction_l_sd ); 272 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFEQ ]) _function_decod[i][ 4][OPCOD_L_SFEQ ] = &(instruction_l_sfeq ); 273 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFEQI ]) _function_decod[i][ 5][OPCOD_L_SFEQI ] = &(instruction_l_sfeqi ); 274 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGES ]) _function_decod[i][ 4][OPCOD_L_SFGES ] = &(instruction_l_sfges ); 275 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGESI ]) _function_decod[i][ 5][OPCOD_L_SFGESI ] = &(instruction_l_sfgesi ); 276 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGEU ]) _function_decod[i][ 4][OPCOD_L_SFGEU ] = &(instruction_l_sfgeu ); 277 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGEUI ]) _function_decod[i][ 5][OPCOD_L_SFGEUI ] = &(instruction_l_sfgeui ); 278 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGTS ]) _function_decod[i][ 4][OPCOD_L_SFGTS ] = &(instruction_l_sfgts ); 279 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGTSI ]) _function_decod[i][ 5][OPCOD_L_SFGTSI ] = &(instruction_l_sfgtsi ); 280 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGTU ]) _function_decod[i][ 4][OPCOD_L_SFGTU ] = &(instruction_l_sfgtu ); 281 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFGTUI ]) _function_decod[i][ 5][OPCOD_L_SFGTUI ] = &(instruction_l_sfgtui ); 282 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLES ]) _function_decod[i][ 4][OPCOD_L_SFLES ] = &(instruction_l_sfles ); 283 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLESI ]) _function_decod[i][ 5][OPCOD_L_SFLESI ] = &(instruction_l_sflesi ); 284 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLEU ]) _function_decod[i][ 4][OPCOD_L_SFLEU ] = &(instruction_l_sfleu ); 285 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLEUI ]) _function_decod[i][ 5][OPCOD_L_SFLEUI ] = &(instruction_l_sfleui ); 286 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLTS ]) _function_decod[i][ 4][OPCOD_L_SFLTS ] = &(instruction_l_sflts ); 287 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLTSI ]) _function_decod[i][ 5][OPCOD_L_SFLTSI ] = &(instruction_l_sfltsi ); 288 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLTU ]) _function_decod[i][ 4][OPCOD_L_SFLTU ] = &(instruction_l_sfltu ); 289 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFLTUI ]) _function_decod[i][ 5][OPCOD_L_SFLTUI ] = &(instruction_l_sfltui ); 290 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFNE ]) _function_decod[i][ 4][OPCOD_L_SFNE ] = &(instruction_l_sfne ); 291 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SFNEI ]) _function_decod[i][ 5][OPCOD_L_SFNEI ] = &(instruction_l_sfnei ); 292 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SH ]) _function_decod[i][ 0][OPCOD_L_SH ] = &(instruction_l_sh ); 293 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SLL ]) _function_decod[i][11][OPCOD_L_SLL ] = &(instruction_l_sll ); 294 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SLLI ]) _function_decod[i][ 6][OPCOD_L_SLLI ] = &(instruction_l_slli ); 295 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SRA ]) _function_decod[i][11][OPCOD_L_SRA ] = &(instruction_l_sra ); 296 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SRAI ]) _function_decod[i][ 6][OPCOD_L_SRAI ] = &(instruction_l_srai ); 297 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SRL ]) _function_decod[i][11][OPCOD_L_SRL ] = &(instruction_l_srl ); 298 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SRLI ]) _function_decod[i][ 6][OPCOD_L_SRLI ] = &(instruction_l_srli ); 299 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SUB ]) _function_decod[i][ 3][OPCOD_L_SUB ] = &(instruction_l_sub ); 300 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SW ]) _function_decod[i][ 0][OPCOD_L_SW ] = &(instruction_l_sw ); 301 if (_param->_instruction_implemeted[i][INSTRUCTION_L_SYS ]) _function_decod[i][ 9][OPCOD_L_SYS ] = &(instruction_l_sys ); 302 if (_param->_instruction_implemeted[i][INSTRUCTION_L_TRAP ]) _function_decod[i][ 9][OPCOD_L_TRAP ] = &(instruction_l_trap ); 303 if (_param->_instruction_implemeted[i][INSTRUCTION_L_XOR ]) _function_decod[i][ 3][OPCOD_L_XOR ] = &(instruction_l_xor ); 304 if (_param->_instruction_implemeted[i][INSTRUCTION_L_XORI ]) _function_decod[i][ 0][OPCOD_L_XORI ] = &(instruction_l_xori ); 305 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_ADD_D ]) _function_decod[i][ 1][OPCOD_LF_ADD_D ] = &(instruction_lf_add_d ); 306 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_ADD_S ]) _function_decod[i][ 1][OPCOD_LF_ADD_S ] = &(instruction_lf_add_s ); 307 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_DIV_D ]) _function_decod[i][ 1][OPCOD_LF_DIV_D ] = &(instruction_lf_div_d ); 308 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_DIV_S ]) _function_decod[i][ 1][OPCOD_LF_DIV_S ] = &(instruction_lf_div_s ); 309 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_FTOI_D ]) _function_decod[i][ 1][OPCOD_LF_FTOI_D ] = &(instruction_lf_ftoi_d ); 310 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_FTOI_S ]) _function_decod[i][ 1][OPCOD_LF_FTOI_S ] = &(instruction_lf_ftoi_s ); 311 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_ITOF_D ]) _function_decod[i][ 1][OPCOD_LF_ITOF_D ] = &(instruction_lf_itof_d ); 312 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_ITOF_S ]) _function_decod[i][ 1][OPCOD_LF_ITOF_S ] = &(instruction_lf_itof_s ); 313 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_MADD_D ]) _function_decod[i][ 1][OPCOD_LF_MADD_D ] = &(instruction_lf_madd_d ); 314 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_MADD_S ]) _function_decod[i][ 1][OPCOD_LF_MADD_S ] = &(instruction_lf_madd_s ); 315 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_MUL_D ]) _function_decod[i][ 1][OPCOD_LF_MUL_D ] = &(instruction_lf_mul_d ); 316 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_MUL_S ]) _function_decod[i][ 1][OPCOD_LF_MUL_S ] = &(instruction_lf_mul_s ); 317 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_REM_D ]) _function_decod[i][ 1][OPCOD_LF_REM_D ] = &(instruction_lf_rem_d ); 318 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_REM_S ]) _function_decod[i][ 1][OPCOD_LF_REM_S ] = &(instruction_lf_rem_s ); 319 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFEQ_D ]) _function_decod[i][ 1][OPCOD_LF_SFEQ_D ] = &(instruction_lf_sfeq_d ); 320 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFEQ_S ]) _function_decod[i][ 1][OPCOD_LF_SFEQ_S ] = &(instruction_lf_sfeq_s ); 321 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFGE_D ]) _function_decod[i][ 1][OPCOD_LF_SFGE_D ] = &(instruction_lf_sfge_d ); 322 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFGE_S ]) _function_decod[i][ 1][OPCOD_LF_SFGE_S ] = &(instruction_lf_sfge_s ); 323 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFGT_D ]) _function_decod[i][ 1][OPCOD_LF_SFGT_D ] = &(instruction_lf_sfgt_d ); 324 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFGT_S ]) _function_decod[i][ 1][OPCOD_LF_SFGT_S ] = &(instruction_lf_sfgt_s ); 325 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFLE_D ]) _function_decod[i][ 1][OPCOD_LF_SFLE_D ] = &(instruction_lf_sfle_d ); 326 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFLE_S ]) _function_decod[i][ 1][OPCOD_LF_SFLE_S ] = &(instruction_lf_sfle_s ); 327 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFLT_D ]) _function_decod[i][ 1][OPCOD_LF_SFLT_D ] = &(instruction_lf_sflt_d ); 328 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFLT_S ]) _function_decod[i][ 1][OPCOD_LF_SFLT_S ] = &(instruction_lf_sflt_s ); 329 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFNE_D ]) _function_decod[i][ 1][OPCOD_LF_SFNE_D ] = &(instruction_lf_sfne_d ); 330 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SFNE_S ]) _function_decod[i][ 1][OPCOD_LF_SFNE_S ] = &(instruction_lf_sfne_s ); 331 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SUB_D ]) _function_decod[i][ 1][OPCOD_LF_SUB_D ] = &(instruction_lf_sub_d ); 332 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_SUB_S ]) _function_decod[i][ 1][OPCOD_LF_SUB_S ] = &(instruction_lf_sub_s ); 333 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADD_B ]) _function_decod[i][ 2][OPCOD_LV_ADD_B ] = &(instruction_lv_add_b ); 334 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADD_H ]) _function_decod[i][ 2][OPCOD_LV_ADD_H ] = &(instruction_lv_add_h ); 335 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDS_B ]) _function_decod[i][ 2][OPCOD_LV_ADDS_B ] = &(instruction_lv_adds_b ); 336 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDS_H ]) _function_decod[i][ 2][OPCOD_LV_ADDS_H ] = &(instruction_lv_adds_h ); 337 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDU_B ]) _function_decod[i][ 2][OPCOD_LV_ADDU_B ] = &(instruction_lv_addu_b ); 338 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDU_H ]) _function_decod[i][ 2][OPCOD_LV_ADDU_H ] = &(instruction_lv_addu_h ); 339 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDUS_B ]) _function_decod[i][ 2][OPCOD_LV_ADDUS_B ] = &(instruction_lv_addus_b ); 340 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ADDUS_H ]) _function_decod[i][ 2][OPCOD_LV_ADDUS_H ] = &(instruction_lv_addus_h ); 341 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_EQ_B]) _function_decod[i][ 2][OPCOD_LV_ALL_EQ_B] = &(instruction_lv_all_eq_b ); 342 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_EQ_H]) _function_decod[i][ 2][OPCOD_LV_ALL_EQ_H] = &(instruction_lv_all_eq_h ); 343 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_GE_B]) _function_decod[i][ 2][OPCOD_LV_ALL_GE_B] = &(instruction_lv_all_ge_b ); 344 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_GE_H]) _function_decod[i][ 2][OPCOD_LV_ALL_GE_H] = &(instruction_lv_all_ge_h ); 345 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_GT_B]) _function_decod[i][ 2][OPCOD_LV_ALL_GT_B] = &(instruction_lv_all_gt_b ); 346 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_GT_H]) _function_decod[i][ 2][OPCOD_LV_ALL_GT_H] = &(instruction_lv_all_gt_h ); 347 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_LE_B]) _function_decod[i][ 2][OPCOD_LV_ALL_LE_B] = &(instruction_lv_all_le_b ); 348 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_LE_H]) _function_decod[i][ 2][OPCOD_LV_ALL_LE_H] = &(instruction_lv_all_le_h ); 349 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_LT_B]) _function_decod[i][ 2][OPCOD_LV_ALL_LT_B] = &(instruction_lv_all_lt_b ); 350 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_LT_H]) _function_decod[i][ 2][OPCOD_LV_ALL_LT_H] = &(instruction_lv_all_lt_h ); 351 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_NE_B]) _function_decod[i][ 2][OPCOD_LV_ALL_NE_B] = &(instruction_lv_all_ne_b ); 352 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ALL_NE_H]) _function_decod[i][ 2][OPCOD_LV_ALL_NE_H] = &(instruction_lv_all_ne_h ); 353 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_AND ]) _function_decod[i][ 2][OPCOD_LV_AND ] = &(instruction_lv_and ); 354 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_EQ_B]) _function_decod[i][ 2][OPCOD_LV_ANY_EQ_B] = &(instruction_lv_any_eq_b ); 355 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_EQ_H]) _function_decod[i][ 2][OPCOD_LV_ANY_EQ_H] = &(instruction_lv_any_eq_h ); 356 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_GE_B]) _function_decod[i][ 2][OPCOD_LV_ANY_GE_B] = &(instruction_lv_any_ge_b ); 357 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_GE_H]) _function_decod[i][ 2][OPCOD_LV_ANY_GE_H] = &(instruction_lv_any_ge_h ); 358 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_GT_B]) _function_decod[i][ 2][OPCOD_LV_ANY_GT_B] = &(instruction_lv_any_gt_b ); 359 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_GT_H]) _function_decod[i][ 2][OPCOD_LV_ANY_GT_H] = &(instruction_lv_any_gt_h ); 360 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_LE_B]) _function_decod[i][ 2][OPCOD_LV_ANY_LE_B] = &(instruction_lv_any_le_b ); 361 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_LE_H]) _function_decod[i][ 2][OPCOD_LV_ANY_LE_H] = &(instruction_lv_any_le_h ); 362 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_LT_B]) _function_decod[i][ 2][OPCOD_LV_ANY_LT_B] = &(instruction_lv_any_lt_b ); 363 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_LT_H]) _function_decod[i][ 2][OPCOD_LV_ANY_LT_H] = &(instruction_lv_any_lt_h ); 364 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_NE_B]) _function_decod[i][ 2][OPCOD_LV_ANY_NE_B] = &(instruction_lv_any_ne_b ); 365 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_ANY_NE_H]) _function_decod[i][ 2][OPCOD_LV_ANY_NE_H] = &(instruction_lv_any_ne_h ); 366 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_AVG_B ]) _function_decod[i][ 2][OPCOD_LV_AVG_B ] = &(instruction_lv_avg_b ); 367 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_AVG_H ]) _function_decod[i][ 2][OPCOD_LV_AVG_H ] = &(instruction_lv_avg_h ); 368 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_EQ_B]) _function_decod[i][ 2][OPCOD_LV_CMP_EQ_B] = &(instruction_lv_cmp_eq_b ); 369 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_EQ_H]) _function_decod[i][ 2][OPCOD_LV_CMP_EQ_H] = &(instruction_lv_cmp_eq_h ); 370 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_GE_B]) _function_decod[i][ 2][OPCOD_LV_CMP_GE_B] = &(instruction_lv_cmp_ge_b ); 371 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_GE_H]) _function_decod[i][ 2][OPCOD_LV_CMP_GE_H] = &(instruction_lv_cmp_ge_h ); 372 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_GT_B]) _function_decod[i][ 2][OPCOD_LV_CMP_GT_B] = &(instruction_lv_cmp_gt_b ); 373 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_GT_H]) _function_decod[i][ 2][OPCOD_LV_CMP_GT_H] = &(instruction_lv_cmp_gt_h ); 374 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_LE_B]) _function_decod[i][ 2][OPCOD_LV_CMP_LE_B] = &(instruction_lv_cmp_le_b ); 375 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_LE_H]) _function_decod[i][ 2][OPCOD_LV_CMP_LE_H] = &(instruction_lv_cmp_le_h ); 376 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_LT_B]) _function_decod[i][ 2][OPCOD_LV_CMP_LT_B] = &(instruction_lv_cmp_lt_b ); 377 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_LT_H]) _function_decod[i][ 2][OPCOD_LV_CMP_LT_H] = &(instruction_lv_cmp_lt_h ); 378 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_NE_B]) _function_decod[i][ 2][OPCOD_LV_CMP_NE_B] = &(instruction_lv_cmp_ne_b ); 379 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CMP_NE_H]) _function_decod[i][ 2][OPCOD_LV_CMP_NE_H] = &(instruction_lv_cmp_ne_h ); 380 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MADDS_H ]) _function_decod[i][ 2][OPCOD_LV_MADDS_H ] = &(instruction_lv_madds_h ); 381 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MAX_B ]) _function_decod[i][ 2][OPCOD_LV_MAX_B ] = &(instruction_lv_max_b ); 382 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MAX_H ]) _function_decod[i][ 2][OPCOD_LV_MAX_H ] = &(instruction_lv_max_h ); 383 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MERGE_B ]) _function_decod[i][ 2][OPCOD_LV_MERGE_B ] = &(instruction_lv_merge_b ); 384 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MERGE_H ]) _function_decod[i][ 2][OPCOD_LV_MERGE_H ] = &(instruction_lv_merge_h ); 385 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MIN_B ]) _function_decod[i][ 2][OPCOD_LV_MIN_B ] = &(instruction_lv_min_b ); 386 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MIN_H ]) _function_decod[i][ 2][OPCOD_LV_MIN_H ] = &(instruction_lv_min_h ); 387 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MSUBS_H ]) _function_decod[i][ 2][OPCOD_LV_MSUBS_H ] = &(instruction_lv_msubs_h ); 388 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_MULS_H ]) _function_decod[i][ 2][OPCOD_LV_MULS_H ] = &(instruction_lv_muls_h ); 389 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_NAND ]) _function_decod[i][ 2][OPCOD_LV_NAND ] = &(instruction_lv_nand ); 390 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_NOR ]) _function_decod[i][ 2][OPCOD_LV_NOR ] = &(instruction_lv_nor ); 391 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_OR ]) _function_decod[i][ 2][OPCOD_LV_OR ] = &(instruction_lv_or ); 392 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACK_B ]) _function_decod[i][ 2][OPCOD_LV_PACK_B ] = &(instruction_lv_pack_b ); 393 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACK_H ]) _function_decod[i][ 2][OPCOD_LV_PACK_H ] = &(instruction_lv_pack_h ); 394 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACKS_B ]) _function_decod[i][ 2][OPCOD_LV_PACKS_B ] = &(instruction_lv_packs_b ); 395 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACKS_H ]) _function_decod[i][ 2][OPCOD_LV_PACKS_H ] = &(instruction_lv_packs_h ); 396 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACKUS_B]) _function_decod[i][ 2][OPCOD_LV_PACKUS_B] = &(instruction_lv_packus_b ); 397 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PACKUS_H]) _function_decod[i][ 2][OPCOD_LV_PACKUS_H] = &(instruction_lv_packus_h ); 398 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_PERM_N ]) _function_decod[i][ 2][OPCOD_LV_PERM_N ] = &(instruction_lv_perm_n ); 399 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_RL_B ]) _function_decod[i][ 2][OPCOD_LV_RL_B ] = &(instruction_lv_rl_b ); 400 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_RL_H ]) _function_decod[i][ 2][OPCOD_LV_RL_H ] = &(instruction_lv_rl_h ); 401 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SLL ]) _function_decod[i][ 2][OPCOD_LV_SLL ] = &(instruction_lv_sll ); 402 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SLL_B ]) _function_decod[i][ 2][OPCOD_LV_SLL_B ] = &(instruction_lv_sll_b ); 403 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SLL_H ]) _function_decod[i][ 2][OPCOD_LV_SLL_H ] = &(instruction_lv_sll_h ); 404 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SRA_B ]) _function_decod[i][ 2][OPCOD_LV_SRA_B ] = &(instruction_lv_sra_b ); 405 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SRA_H ]) _function_decod[i][ 2][OPCOD_LV_SRA_H ] = &(instruction_lv_sra_h ); 406 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SRL ]) _function_decod[i][ 2][OPCOD_LV_SRL ] = &(instruction_lv_srl ); 407 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SRL_B ]) _function_decod[i][ 2][OPCOD_LV_SRL_B ] = &(instruction_lv_srl_b ); 408 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SRL_H ]) _function_decod[i][ 2][OPCOD_LV_SRL_H ] = &(instruction_lv_srl_h ); 409 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUB_B ]) _function_decod[i][ 2][OPCOD_LV_SUB_B ] = &(instruction_lv_sub_b ); 410 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUB_H ]) _function_decod[i][ 2][OPCOD_LV_SUB_H ] = &(instruction_lv_sub_h ); 411 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBS_B ]) _function_decod[i][ 2][OPCOD_LV_SUBS_B ] = &(instruction_lv_subs_b ); 412 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBS_H ]) _function_decod[i][ 2][OPCOD_LV_SUBS_H ] = &(instruction_lv_subs_h ); 413 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBU_B ]) _function_decod[i][ 2][OPCOD_LV_SUBU_B ] = &(instruction_lv_subu_b ); 414 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBU_H ]) _function_decod[i][ 2][OPCOD_LV_SUBU_H ] = &(instruction_lv_subu_h ); 415 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBUS_B ]) _function_decod[i][ 2][OPCOD_LV_SUBUS_B ] = &(instruction_lv_subus_b ); 416 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_SUBUS_H ]) _function_decod[i][ 2][OPCOD_LV_SUBUS_H ] = &(instruction_lv_subus_h ); 417 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_UNPACK_B]) _function_decod[i][ 2][OPCOD_LV_UNPACK_B] = &(instruction_lv_unpack_b ); 418 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_UNPACK_H]) _function_decod[i][ 2][OPCOD_LV_UNPACK_H] = &(instruction_lv_unpack_h ); 419 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_XOR ]) _function_decod[i][ 2][OPCOD_LV_XOR ] = &(instruction_lv_xor ); 420 421 // Custom Instruction 422 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST1 ]) _function_decod [i][ 0][OPCOD_L_CUST1 ] = &(instruction_l_custom ); 423 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST2 ]) _function_decod [i][ 0][OPCOD_L_CUST2 ] = &(instruction_l_custom ); 424 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST3 ]) _function_decod [i][ 0][OPCOD_L_CUST3 ] = &(instruction_l_custom ); 425 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST4 ]) _function_decod [i][ 0][OPCOD_L_CUST4 ] = &(instruction_l_custom ); 426 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST5 ]) _function_decod [i][ 0][OPCOD_L_CUST5 ] = &(instruction_l_custom ); 427 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST6 ]) _function_decod [i][ 0][OPCOD_L_CUST6 ] = &(instruction_l_custom ); 428 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST7 ]) _function_decod [i][ 0][OPCOD_L_CUST7 ] = &(instruction_l_custom ); 429 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST8 ]) _function_decod [i][ 0][OPCOD_L_CUST8 ] = &(instruction_l_custom ); 430 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_CUST1_D ]) _function_decod [i][ 1][OPCOD_LF_CUST1_D ] = &(instruction_lf_custom); 431 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_CUST1_S ]) _function_decod [i][ 1][OPCOD_LF_CUST1_S ] = &(instruction_lf_custom); 432 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST1 ]) _function_decod [i][ 2][OPCOD_LV_CUST1 ] = &(instruction_lv_custom); 433 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST2 ]) _function_decod [i][ 2][OPCOD_LV_CUST2 ] = &(instruction_lv_custom); 434 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST3 ]) _function_decod [i][ 2][OPCOD_LV_CUST3 ] = &(instruction_lv_custom); 435 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST4 ]) _function_decod [i][ 2][OPCOD_LV_CUST4 ] = &(instruction_lv_custom); 436 437 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST1 ]) _function_custom[i][ 0][OPCOD_L_CUST1 ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_1 ); 438 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST2 ]) _function_custom[i][ 0][OPCOD_L_CUST2 ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_2 ); 439 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST3 ]) _function_custom[i][ 0][OPCOD_L_CUST3 ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_3 ); 440 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST4 ]) _function_custom[i][ 0][OPCOD_L_CUST4 ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_4 ); 441 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST5 ]) _function_custom[i][ 0][OPCOD_L_CUST5 ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_5 ); 442 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST6 ]) _function_custom[i][ 0][OPCOD_L_CUST6 ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_6 ); 443 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST7 ]) _function_custom[i][ 0][OPCOD_L_CUST7 ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_7 ); 444 if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST8 ]) _function_custom[i][ 0][OPCOD_L_CUST8 ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_8 ); 445 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_CUST1_D ]) _function_custom[i][ 1][OPCOD_LF_CUST1_D ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LF_1_D); 446 // if (_param->_instruction_implemeted[i][INSTRUCTION_LF_CUST1_S ]) _function_custom[i][ 1][OPCOD_LF_CUST1_S ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LF_1_S); 447 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST1 ]) _function_custom[i][ 2][OPCOD_LV_CUST1 ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LV_1 ); 448 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST2 ]) _function_custom[i][ 2][OPCOD_LV_CUST2 ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LV_2 ); 449 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST3 ]) _function_custom[i][ 2][OPCOD_LV_CUST3 ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LV_3 ); 450 // if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST4 ]) _function_custom[i][ 2][OPCOD_LV_CUST4 ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LV_4 ); 450 451 } 451 452 … … 455 456 for (uint32_t i=0; i<_param->_nb_context; i++) 456 457 _decod_param [i] = new decod_param_t (_param->_size_general_data, 457 458 458 _function_decod [i], 459 _function_custom[i]); 459 460 460 461 #ifdef POSITION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_deallocation.cpp
r88 r101 79 79 80 80 DELETE1_SIGNAL(in_CONTEXT_DECOD_ENABLE, _param->_nb_context,1); 81 DELETE1_SIGNAL(in_CONTEXT_DEPTH_VAL , _param->_nb_context,1); 81 82 DELETE1_SIGNAL(in_CONTEXT_DEPTH , _param->_nb_context,_param->_size_depth); 82 83 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp
r88 r101 77 77 { 78 78 log_printf(TRACE,Decod,FUNCTION," * IFETCH [%d][%d]",x,y); 79 log_printf(TRACE,Decod,FUNCTION," * decod_ack [%d] : %d",i,PORT_READ(in_DECOD_ACK [i])); 79 80 80 81 can_continue [x] = can_continue_next [x]; … … 145 146 PORT_WRITE(out_DECOD_READ_RC [i], _decod_instruction->_read_rc ); 146 147 PORT_WRITE(out_DECOD_NUM_REG_RC [i], _decod_instruction->_num_reg_rc ); 147 PORT_WRITE(out_DECOD_WRITE_RD [i], _decod_instruction->_write_rd);148 PORT_WRITE(out_DECOD_WRITE_RD [i],(_decod_instruction->_num_reg_rd!=0)?_decod_instruction->_write_rd:0); 148 149 PORT_WRITE(out_DECOD_NUM_REG_RD [i], _decod_instruction->_num_reg_rd ); 149 150 PORT_WRITE(out_DECOD_WRITE_RE [i], _decod_instruction->_write_re ); … … 152 153 // PORT_WRITE(out_DECOD_EXCEPTION [i], _decod_instruction->_exception ); 153 154 155 // Branch predictor can accept : the depth is valid 156 log_printf(TRACE,Decod,FUNCTION," * context_depth_val : %d",PORT_READ(in_CONTEXT_DEPTH_VAL [x])); 157 decod_val [i] &= PORT_READ(in_CONTEXT_DEPTH_VAL [x]); 158 ifetch_ack [x][y] &= PORT_READ(in_CONTEXT_DEPTH_VAL [x]); 159 154 160 if (type == TYPE_BRANCH) 155 161 { 156 162 log_printf(TRACE,Decod,FUNCTION," * type is branch"); 163 log_printf(TRACE,Decod,FUNCTION," * predict_ack : %d",PORT_READ(in_PREDICT_ACK [i])); 164 157 165 log_printf(TRACE,Decod,FUNCTION," * address src : %.8x (%.8x)",_decod_instruction->_address ,_decod_instruction->_address <<2); 158 166 log_printf(TRACE,Decod,FUNCTION," * address dest : %.8x (%.8x)",_decod_instruction->_address_next,_decod_instruction->_address_next<<2); … … 160 168 predict_val [i] = ifetch_ack [x][y] // and decod_val [i] 161 169 ; 162 163 164 170 decod_val [i] &= PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable 171 ifetch_ack [x][y] &= PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable and decod_ack 172 165 173 if (_param->_have_port_context_id) 166 174 PORT_WRITE(out_PREDICT_CONTEXT_ID [i],x); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/src/test.cpp
r88 r101 102 102 ALLOC1_SC_SIGNAL( in_DEPTH_MIN ," in_DEPTH_MIN ",Tdepth_t ,_param->_nb_context); 103 103 ALLOC1_SC_SIGNAL( in_DEPTH_MAX ," in_DEPTH_MAX ",Tdepth_t ,_param->_nb_context); 104 ALLOC1_SC_SIGNAL( in_DEPTH_FULL ," in_DEPTH_FULL ",Tcontrol_t ,_param->_nb_context); 104 105 105 106 ALLOC1_SC_SIGNAL(out_NB_INST_ALL ,"out_NB_INST_ALL ",Tcounter_t ,_param->_nb_context); … … 166 167 INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_EXCEPTION ,_param->_nb_inst_decod); 167 168 168 for (uint32_t i=0; i<_param->_nb_context; ++i)169 if (_param->_have_port_depth)170 INSTANCE_SC_SIGNAL(_Decod_queue, in_DEPTH_MIN [i]);169 if (_param->_have_port_depth) 170 { 171 INSTANCE1_SC_SIGNAL(_Decod_queue, in_DEPTH_MIN ,_param->_nb_context); 171 172 INSTANCE1_SC_SIGNAL(_Decod_queue, in_DEPTH_MAX ,_param->_nb_context); 172 173 } 174 INSTANCE1_SC_SIGNAL(_Decod_queue, in_DEPTH_FULL ,_param->_nb_context); 173 175 INSTANCE1_SC_SIGNAL(_Decod_queue,out_NB_INST_ALL ,_param->_nb_context); 174 176 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); … … 344 346 DELETE1_SC_SIGNAL( in_DEPTH_MIN ,_param->_nb_context); 345 347 DELETE1_SC_SIGNAL( in_DEPTH_MAX ,_param->_nb_context); 348 DELETE1_SC_SIGNAL( in_DEPTH_FULL ,_param->_nb_context); 346 349 347 350 DELETE1_SC_SIGNAL(out_NB_INST_ALL ,_param->_nb_context); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Decod_queue.h
r88 r101 119 119 public : SC_IN (Tdepth_t ) ** in_DEPTH_MIN ;//[nb_context] 120 120 public : SC_IN (Tdepth_t ) ** in_DEPTH_MAX ;//[nb_context] 121 public : SC_IN (Tcontrol_t ) ** in_DEPTH_FULL ;//[nb_context] 121 122 122 123 // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue.cpp
r88 r101 107 107 { 108 108 if (_param->_have_port_depth) 109 { 109 110 sensitive << (*(in_DEPTH_MIN [i])); 110 111 sensitive << (*(in_DEPTH_MAX [i])); 112 } 113 sensitive << (*(in_DEPTH_FULL[i])); 111 114 } 112 115 … … 119 122 { 120 123 if (_param->_have_port_depth) 124 { 121 125 (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MIN [j])); 122 126 (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MAX [j])); 127 } 123 128 } 124 129 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_allocation.cpp
r95 r101 117 117 ALLOC1_INTERFACE("depth",IN ,NORTH,"Depth", _param->_nb_context); 118 118 119 ALLOC1_SIGNAL_IN ( in_DEPTH_MIN ,"min" ,Tdepth_t ,_param->_size_depth ); 120 ALLOC1_SIGNAL_IN ( in_DEPTH_MAX ,"max" ,Tdepth_t ,_param->_size_depth+1); 119 ALLOC1_SIGNAL_IN ( in_DEPTH_MIN ,"min" ,Tdepth_t ,_param->_size_depth); 120 ALLOC1_SIGNAL_IN ( in_DEPTH_MAX ,"max" ,Tdepth_t ,_param->_size_depth); 121 ALLOC1_SIGNAL_IN ( in_DEPTH_FULL ,"full" ,Tcontrol_t ,1); 121 122 } 122 123 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_deallocation.cpp
r88 r101 77 77 DELETE1_SIGNAL(out_DECOD_OUT_EXCEPTION ,_param->_nb_inst_decod,_param->_size_exception ); 78 78 79 DELETE1_SIGNAL( in_DEPTH_MIN ,_param->_nb_context,_param->_size_depth ); 80 DELETE1_SIGNAL( in_DEPTH_MAX ,_param->_nb_context,_param->_size_depth+1); 79 DELETE1_SIGNAL( in_DEPTH_MIN ,_param->_nb_context,_param->_size_depth); 80 DELETE1_SIGNAL( in_DEPTH_MAX ,_param->_nb_context,_param->_size_depth); 81 DELETE1_SIGNAL( in_DEPTH_FULL ,_param->_nb_context,1); 81 82 82 83 DELETE1_SIGNAL(out_NB_INST_ALL ,_param->_nb_context,_param->_size_nb_inst_decod); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMealy_decod_out.cpp
r88 r101 42 42 Tdepth_t depth = reg_QUEUE->front()->_depth [i]; 43 43 Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0; 44 Tdepth_t depth_max = PORT_READ(in_DEPTH_MAX[context]); 44 Tdepth_t depth_max = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX [context]):0; 45 Tcontrol_t depth_full = PORT_READ(in_DEPTH_FULL[context]); 45 46 46 47 // is a valid instruction ? 47 48 // If DEPTH_CURRENT : 48 49 // equal at DEPTH_MIN -> not speculative 49 // not include ]DEPTH_MIN:DEPTH_MAX [-> previous branch miss50 // include ]DEPTH_MIN:DEPTH_MAX [-> speculative50 // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss 51 // include ]DEPTH_MIN:DEPTH_MAX] -> speculative 51 52 52 53 // All case … … 58 59 // ....... max ...X... min ....... KO 59 60 60 Tcontrol_t is_valid = ((depth == depth_min) or 61 ((depth_min < depth_max)? 62 (depth<depth_max): 63 ((depth > depth_min) or (depth < depth_max)))); 61 Tcontrol_t is_valid = ((depth == depth_min) or 62 depth_full or 63 ((depth_min <= depth_max)? 64 ((depth >= depth_min) and (depth <=depth_max)): 65 ((depth >= depth_min) or (depth <=depth_max)))); 66 // Tcontrol_t is_valid = ((depth == depth_min) or 67 // ((depth_min < depth_max)? 68 // (depth<=depth_max): 69 // ((depth > depth_min) or (depth <= depth_max)))); 64 70 // Tcontrol_t is_valid = depth <= depth_max; 65 71 66 log_printf(TRACE,Decod_queue,FUNCTION,_(" * is_valid : %d"),is_valid); 67 72 log_printf(TRACE,Decod_queue,FUNCTION," * is_valid : %d",is_valid); 73 log_printf(TRACE,Decod_queue,FUNCTION," * context : %d",context); 74 log_printf(TRACE,Decod_queue,FUNCTION," * depth : %d",depth); 75 log_printf(TRACE,Decod_queue,FUNCTION," * depth_min : %d",depth_min); 76 log_printf(TRACE,Decod_queue,FUNCTION," * depth_max : %d",depth_max); 77 log_printf(TRACE,Decod_queue,FUNCTION," * depth_full: %d",depth_full); 78 log_printf(TRACE,Decod_queue,FUNCTION," * address : 0x%x (0x%x)",reg_QUEUE->front()->_address[i],reg_QUEUE->front()->_address[i]<<2); 68 79 internal_DECOD_OUT_VAL [i] = 1; // in all case, val is set (entry is not empty, and instruction is valid) 69 80 if (is_valid) … … 81 92 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 82 93 { 83 log_printf(TRACE,Decod_queue,FUNCTION, _(" * DECOD_OUT_VAL : %d"),val [i]);94 log_printf(TRACE,Decod_queue,FUNCTION," * DECOD_OUT_VAL : %d",val [i]); 84 95 85 96 PORT_WRITE(out_DECOD_OUT_VAL [i],val [i]); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_transition.cpp
r88 r101 135 135 { 136 136 if ((*it)->_val [i]) 137 log_printf(TRACE,Decod_queue,FUNCTION," * [% d] %d, %d %d, %d %d %d %d, 0x%x, %d 0x%x, %d %d, %d %d, %d %d, %d %d, %d %d, %d %d"137 log_printf(TRACE,Decod_queue,FUNCTION," * [%.4d] %.1d, %.3d %.2d, %.2d %.3d %.1d %.1d, 0x%.8x (0x%.8x), %.1d 0x%.8x, %.1d %.2d, %.1d %.2d, %.1d %.2d, %.1d %.2d, %.1d %.2d, %.1d %.2d" 138 138 ,i 139 139 ,(*it)->_val [i] … … 145 145 ,(*it)->_is_delay_slot [i] 146 146 ,(*it)->_address [i] 147 ,(*it)->_address [i]<<2 147 148 ,(*it)->_has_immediat [i] 148 149 ,(*it)->_immediat [i] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/src/test.cpp
r88 r101 104 104 ALLOC1_SC_SIGNAL( in_DEPTH_MIN ," in_DEPTH_MIN ",Tdepth_t ,_param->_nb_context); 105 105 ALLOC1_SC_SIGNAL( in_DEPTH_MAX ," in_DEPTH_MAX ",Tdepth_t ,_param->_nb_context); 106 ALLOC1_SC_SIGNAL( in_DEPTH_FULL ," in_DEPTH_FULL ",Tcontrol_t ,_param->_nb_context); 106 107 107 108 ALLOC1_SC_SIGNAL(out_NB_INST_DECOD_ALL ,"out_NB_INST_DECOD_ALL ",Tcounter_t ,_param->_nb_context); 108 109 109 110 ALLOC1_SC_SIGNAL( in_CONTEXT_DECOD_ENABLE ," in_CONTEXT_DECOD_ENABLE ",Tcontrol_t ,_param->_nb_context); 111 ALLOC1_SC_SIGNAL( in_CONTEXT_DEPTH_VAL ," in_CONTEXT_DEPTH_VAL ",Tcontrol_t ,_param->_nb_context); 110 112 ALLOC1_SC_SIGNAL( in_CONTEXT_DEPTH ," in_CONTEXT_DEPTH ",Tdepth_t ,_param->_nb_context); 111 113 … … 188 190 //INSTANCE1_SC_SIGNAL(_Decod_unit, in_PREDICT_CAN_CONTINUE ,_param->_nb_inst_decod); 189 191 192 if (_param->_have_port_depth) 193 { 194 INSTANCE1_SC_SIGNAL(_Decod_unit, in_DEPTH_MIN ,_param->_nb_context); 190 195 INSTANCE1_SC_SIGNAL(_Decod_unit, in_DEPTH_MAX ,_param->_nb_context); 191 196 } 197 INSTANCE1_SC_SIGNAL(_Decod_unit, in_DEPTH_FULL ,_param->_nb_context); 192 198 INSTANCE1_SC_SIGNAL(_Decod_unit,out_NB_INST_DECOD_ALL ,_param->_nb_context); 193 199 194 200 INSTANCE1_SC_SIGNAL(_Decod_unit, in_CONTEXT_DECOD_ENABLE ,_param->_nb_context); 195 201 196 for (uint32_t i=0; i<_param->_nb_context; ++i) 197 if (_param->_have_port_depth) 198 { 199 INSTANCE_SC_SIGNAL(_Decod_unit, in_DEPTH_MIN [i]); 200 INSTANCE_SC_SIGNAL(_Decod_unit, in_CONTEXT_DEPTH [i]); 201 } 202 INSTANCE1_SC_SIGNAL(_Decod_unit, in_CONTEXT_DEPTH_VAL ,_param->_nb_context); 203 if (_param->_have_port_depth) 204 INSTANCE1_SC_SIGNAL(_Decod_unit, in_CONTEXT_DEPTH ,_param->_nb_context); 202 205 203 206 INSTANCE_SC_SIGNAL( _Decod_unit,out_CONTEXT_EVENT_VAL ); … … 239 242 SC_START(5); 240 243 in_NRESET->write(1); 244 245 for (uint32_t i=0; i<_param->_nb_context; i++) 246 in_CONTEXT_DEPTH_VAL [i]->write(1); 241 247 242 248 LABEL("Loop of Test"); … … 515 521 DELETE1_SC_SIGNAL( in_DEPTH_MIN ,_param->_nb_context); 516 522 DELETE1_SC_SIGNAL( in_DEPTH_MAX ,_param->_nb_context); 523 DELETE1_SC_SIGNAL( in_DEPTH_FULL ,_param->_nb_context); 517 524 518 525 DELETE1_SC_SIGNAL(out_NB_INST_DECOD_ALL ,_param->_nb_context); 519 526 520 527 DELETE1_SC_SIGNAL( in_CONTEXT_DECOD_ENABLE ,_param->_nb_context); 528 DELETE1_SC_SIGNAL( in_CONTEXT_DEPTH_VAL ,_param->_nb_context); 521 529 DELETE1_SC_SIGNAL( in_CONTEXT_DEPTH ,_param->_nb_context); 522 530 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/include/Decod_unit.h
r88 r101 120 120 public : SC_IN (Tdepth_t ) ** in_DEPTH_MIN ;//[nb_context] 121 121 public : SC_IN (Tdepth_t ) ** in_DEPTH_MAX ;//[nb_context] 122 public : SC_IN (Tcontrol_t ) ** in_DEPTH_FULL ;//[nb_context] 122 123 123 124 // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 126 127 // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 127 128 public : SC_IN (Tcontrol_t ) ** in_CONTEXT_DECOD_ENABLE ;//[nb_context] 129 public : SC_IN (Tcontrol_t ) ** in_CONTEXT_DEPTH_VAL ;//[nb_context] 128 130 public : SC_IN (Tdepth_t ) ** in_CONTEXT_DEPTH ;//[nb_context] 129 131 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_allocation.cpp
r88 r101 128 128 ALLOC1_INTERFACE("depth",IN ,NORTH,"Depth", _param->_nb_context); 129 129 130 ALLOC1_SIGNAL_IN ( in_DEPTH_MIN ,"min" ,Tdepth_t ,_param->_size_depth ); 131 ALLOC1_SIGNAL_IN ( in_DEPTH_MAX ,"max" ,Tdepth_t ,_param->_size_depth+1); 130 ALLOC1_SIGNAL_IN ( in_DEPTH_MIN ,"min" ,Tdepth_t ,_param->_size_depth); 131 ALLOC1_SIGNAL_IN ( in_DEPTH_MAX ,"max" ,Tdepth_t ,_param->_size_depth); 132 ALLOC1_SIGNAL_IN ( in_DEPTH_FULL ,"full" ,Tcontrol_t ,1); 132 133 } 133 134 … … 144 145 145 146 ALLOC1_SIGNAL_IN (in_CONTEXT_DECOD_ENABLE,"decod_enable",Tcontrol_t,1); 147 ALLOC1_SIGNAL_IN (in_CONTEXT_DEPTH_VAL ,"depth_val" ,Tcontrol_t,1); 146 148 ALLOC1_SIGNAL_IN (in_CONTEXT_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth); 147 149 } … … 365 367 366 368 #ifdef POSITION 367 _component->interface_map (src ,"context "+toString(i),368 dest,"context "+toString(i));369 _component->interface_map (src ,"context_"+toString(i), 370 dest,"context_"+toString(i)); 369 371 #endif 370 372 371 373 PORT_MAP(_component,src , "in_CONTEXT_"+toString(i)+"_DECOD_ENABLE", 372 374 dest, "in_CONTEXT_"+toString(i)+"_DECOD_ENABLE"); 375 PORT_MAP(_component,src , "in_CONTEXT_"+toString(i)+"_DEPTH_VAL" , 376 dest, "in_CONTEXT_"+toString(i)+"_DEPTH_VAL" ); 373 377 if (_param->_have_port_depth) 374 378 PORT_MAP(_component,src , "in_CONTEXT_"+toString(i)+"_DEPTH" , … … 516 520 517 521 if (_param->_have_port_depth) 522 { 518 523 PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_MIN", 519 524 dest, "in_DEPTH_"+toString(i)+"_MIN"); 520 525 PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_MAX", 521 526 dest, "in_DEPTH_"+toString(i)+"_MAX"); 527 } 528 PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_FULL", 529 dest, "in_DEPTH_"+toString(i)+"_FULL"); 522 530 } 523 531 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_deallocation.cpp
r88 r101 77 77 // DELETE1_SIGNAL( in_PREDICT_CAN_CONTINUE ,_param->_nb_inst_decod,1 ); 78 78 79 DELETE1_SIGNAL( in_DEPTH_MIN ,_param->_nb_context,_param->_size_depth ); 80 DELETE1_SIGNAL( in_DEPTH_MAX ,_param->_nb_context,_param->_size_depth+1); 79 DELETE1_SIGNAL( in_DEPTH_MIN ,_param->_nb_context,_param->_size_depth); 80 DELETE1_SIGNAL( in_DEPTH_MAX ,_param->_nb_context,_param->_size_depth); 81 DELETE1_SIGNAL( in_DEPTH_FULL ,_param->_nb_context,1); 81 82 82 83 DELETE1_SIGNAL(out_NB_INST_DECOD_ALL ,_param->_nb_context,_param->_size_nb_inst_decod); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/SelfTest/src/test.cpp
r97 r101 91 91 ALLOC1_SC_SIGNAL(out_DEPTH_MIN ,"out_DEPTH_MIN ",Tdepth_t ,_param->_nb_context); 92 92 ALLOC1_SC_SIGNAL(out_DEPTH_MAX ,"out_DEPTH_MAX ",Tdepth_t ,_param->_nb_context); 93 ALLOC1_SC_SIGNAL(out_DEPTH_FULL ,"out_DEPTH_FULL ",Tcontrol_t,_param->_nb_context); 94 ALLOC1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_VAL ," in_DEPTH_PREDICTION_UNIT_VAL ",Tcontrol_t,_param->_nb_context); 93 95 ALLOC1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_CURRENT ," in_DEPTH_PREDICTION_UNIT_CURRENT ",Tdepth_t ,_param->_nb_context); 94 96 ALLOC1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_MIN ," in_DEPTH_PREDICTION_UNIT_MIN ",Tdepth_t ,_param->_nb_context); 95 97 ALLOC1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_MAX ," in_DEPTH_PREDICTION_UNIT_MAX ",Tdepth_t ,_param->_nb_context); 98 ALLOC1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_FULL ," in_DEPTH_PREDICTION_UNIT_FULL ",Tcontrol_t,_param->_nb_context); 96 99 ALLOC1_SC_SIGNAL(out_DEPTH_CONTEXT_STATE_MIN ,"out_DEPTH_CONTEXT_STATE_MIN ",Tdepth_t ,_param->_nb_context); 97 100 ALLOC2_SC_SIGNAL(out_DEPTH_DECOD_UNIT_MIN ,"out_DEPTH_DECOD_UNIT_MIN ",Tdepth_t ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 98 101 ALLOC2_SC_SIGNAL(out_DEPTH_DECOD_UNIT_MAX ,"out_DEPTH_DECOD_UNIT_MAX ",Tdepth_t ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 99 102 ALLOC2_SC_SIGNAL(out_DEPTH_DECOD_UNIT_FULL ,"out_DEPTH_DECOD_UNIT_FULL ",Tcontrol_t,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 103 104 ALLOC2_SC_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH_VAL ,"out_CONTEXT_DECOD_UNIT_DEPTH_VAL ",Tcontrol_t,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 100 105 ALLOC2_SC_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH ,"out_CONTEXT_DECOD_UNIT_DEPTH ",Tdepth_t ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 101 106 … … 153 158 INSTANCE1_SC_SIGNAL(_Front_end_Glue, in_EVENT_CONTEXT_STATE_DEPTH ,_param->_nb_context); 154 159 155 for (uint32_t i=0; i<_param->_nb_context; ++i) 156 if (_param->_have_port_depth) 157 { 158 INSTANCE_SC_SIGNAL(_Front_end_Glue,out_DEPTH_MIN [i]); 159 INSTANCE_SC_SIGNAL(_Front_end_Glue, in_DEPTH_PREDICTION_UNIT_CURRENT [i]); 160 INSTANCE_SC_SIGNAL(_Front_end_Glue, in_DEPTH_PREDICTION_UNIT_MIN [i]); 161 INSTANCE_SC_SIGNAL(_Front_end_Glue,out_DEPTH_CONTEXT_STATE_MIN [i]); 162 } 160 INSTANCE1_SC_SIGNAL(_Front_end_Glue, in_DEPTH_PREDICTION_UNIT_VAL ,_param->_nb_context); 161 if (_param->_have_port_depth) 162 { 163 INSTANCE1_SC_SIGNAL(_Front_end_Glue,out_DEPTH_MIN ,_param->_nb_context); 164 INSTANCE1_SC_SIGNAL(_Front_end_Glue, in_DEPTH_PREDICTION_UNIT_CURRENT ,_param->_nb_context); 165 INSTANCE1_SC_SIGNAL(_Front_end_Glue, in_DEPTH_PREDICTION_UNIT_MIN ,_param->_nb_context); 166 INSTANCE1_SC_SIGNAL(_Front_end_Glue,out_DEPTH_CONTEXT_STATE_MIN ,_param->_nb_context); 163 167 INSTANCE1_SC_SIGNAL(_Front_end_Glue,out_DEPTH_MAX ,_param->_nb_context); 164 168 INSTANCE1_SC_SIGNAL(_Front_end_Glue, in_DEPTH_PREDICTION_UNIT_MAX ,_param->_nb_context); 165 169 INSTANCE2_SC_SIGNAL(_Front_end_Glue,out_DEPTH_DECOD_UNIT_MAX ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 166 170 } 171 INSTANCE1_SC_SIGNAL(_Front_end_Glue,out_DEPTH_FULL ,_param->_nb_context); 172 INSTANCE1_SC_SIGNAL(_Front_end_Glue, in_DEPTH_PREDICTION_UNIT_FULL ,_param->_nb_context); 173 INSTANCE2_SC_SIGNAL(_Front_end_Glue,out_DEPTH_DECOD_UNIT_FULL ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 174 175 INSTANCE2_SC_SIGNAL(_Front_end_Glue,out_CONTEXT_DECOD_UNIT_DEPTH_VAL ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 167 176 for (uint32_t i=0; i<_param->_nb_decod_unit; ++i) 168 177 for (uint32_t j=0; j<_param->_decod_unit_nb_context [i]; ++j) … … 259 268 DELETE1_SC_SIGNAL(out_DEPTH_MIN ,_param->_nb_context); 260 269 DELETE1_SC_SIGNAL(out_DEPTH_MAX ,_param->_nb_context); 270 DELETE1_SC_SIGNAL(out_DEPTH_FULL ,_param->_nb_context); 271 DELETE1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_VAL ,_param->_nb_context); 261 272 DELETE1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_CURRENT ,_param->_nb_context); 262 273 DELETE1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_MIN ,_param->_nb_context); 263 274 DELETE1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_MAX ,_param->_nb_context); 275 DELETE1_SC_SIGNAL( in_DEPTH_PREDICTION_UNIT_FULL ,_param->_nb_context); 264 276 DELETE1_SC_SIGNAL(out_DEPTH_CONTEXT_STATE_MIN ,_param->_nb_context); 265 277 278 DELETE2_SC_SIGNAL(out_DEPTH_DECOD_UNIT_MIN ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 266 279 DELETE2_SC_SIGNAL(out_DEPTH_DECOD_UNIT_MAX ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 267 DELETE2_SC_SIGNAL(out_DEPTH_DECOD_UNIT_MIN ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 268 280 DELETE2_SC_SIGNAL(out_DEPTH_DECOD_UNIT_FULL ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 281 282 DELETE2_SC_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH_VAL ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 269 283 DELETE2_SC_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 270 284 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/include/Front_end_Glue.h
r97 r101 115 115 public : SC_OUT(Tdepth_t ) ** out_DEPTH_MIN ;//[nb_context] 116 116 public : SC_OUT(Tdepth_t ) ** out_DEPTH_MAX ;//[nb_context] 117 117 public : SC_OUT(Tcontrol_t ) ** out_DEPTH_FULL ;//[nb_context] 118 119 public : SC_IN (Tcontrol_t ) ** in_DEPTH_PREDICTION_UNIT_VAL ;//[nb_context] 118 120 public : SC_IN (Tdepth_t ) ** in_DEPTH_PREDICTION_UNIT_CURRENT ;//[nb_context] 119 121 public : SC_IN (Tdepth_t ) ** in_DEPTH_PREDICTION_UNIT_MIN ;//[nb_context] 120 122 public : SC_IN (Tdepth_t ) ** in_DEPTH_PREDICTION_UNIT_MAX ;//[nb_context] 123 public : SC_IN (Tcontrol_t ) ** in_DEPTH_PREDICTION_UNIT_FULL ;//[nb_context] 121 124 122 125 //public : SC_OUT(Tdepth_t ) *** out_DEPTH_DECOD_UNIT_CURRENT ;//[nb_decod_unit][nb_decod_unit_context] 123 126 public : SC_OUT(Tdepth_t ) *** out_DEPTH_DECOD_UNIT_MIN ;//[nb_decod_unit][nb_decod_unit_context] 124 127 public : SC_OUT(Tdepth_t ) *** out_DEPTH_DECOD_UNIT_MAX ;//[nb_decod_unit][nb_decod_unit_context] 128 public : SC_OUT(Tcontrol_t ) *** out_DEPTH_DECOD_UNIT_FULL ;//[nb_decod_unit][nb_decod_unit_context] 125 129 126 130 public : SC_OUT(Tdepth_t ) ** out_DEPTH_CONTEXT_STATE_MIN ;//[nb_context] 127 131 128 132 // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 133 public : SC_OUT(Tcontrol_t ) *** out_CONTEXT_DECOD_UNIT_DEPTH_VAL ;//[nb_decod_unit][nb_decod_unit_context] 129 134 public : SC_OUT(Tdepth_t ) *** out_CONTEXT_DECOD_UNIT_DEPTH ;//[nb_decod_unit][nb_decod_unit_context] 130 135 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue.cpp
r97 r101 165 165 if (_param->_have_port_depth) 166 166 sensitive << (*( in_DEPTH_PREDICTION_UNIT_CURRENT [i])) 167 << (*( in_DEPTH_PREDICTION_UNIT_MIN [i])); 168 169 sensitive << (*( in_DEPTH_PREDICTION_UNIT_MAX [i])); 167 << (*( in_DEPTH_PREDICTION_UNIT_MIN [i])) 168 << (*( in_DEPTH_PREDICTION_UNIT_MAX [i])); 169 170 sensitive << (*( in_DEPTH_PREDICTION_UNIT_VAL [i])) 171 << (*( in_DEPTH_PREDICTION_UNIT_FULL [i])); 170 172 } 171 173 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_allocation.cpp
r97 r101 128 128 // ALLOC1_SIGNAL_OUT (out_DEPTH_CURRENT ,"CURRENT" ,Tdepth_t ,_param->_size_depth ); 129 129 ALLOC1_SIGNAL_OUT (out_DEPTH_MIN ,"MIN" ,Tdepth_t ,_param->_size_depth ); 130 ALLOC1_SIGNAL_OUT (out_DEPTH_MAX ,"MAX" ,Tdepth_t ,_param->_size_depth+1); 130 ALLOC1_SIGNAL_OUT (out_DEPTH_MAX ,"MAX" ,Tdepth_t ,_param->_size_depth ); 131 ALLOC1_SIGNAL_OUT (out_DEPTH_FULL ,"FULL" ,Tcontrol_t ,1); 131 132 133 ALLOC1_SIGNAL_IN ( in_DEPTH_PREDICTION_UNIT_VAL ,"PREDICTION_UNIT_VAL" ,Tcontrol_t ,1); 132 134 ALLOC1_SIGNAL_IN ( in_DEPTH_PREDICTION_UNIT_CURRENT ,"PREDICTION_UNIT_CURRENT" ,Tdepth_t ,_param->_size_depth ); 133 135 ALLOC1_SIGNAL_IN ( in_DEPTH_PREDICTION_UNIT_MIN ,"PREDICTION_UNIT_MIN" ,Tdepth_t ,_param->_size_depth ); 134 ALLOC1_SIGNAL_IN ( in_DEPTH_PREDICTION_UNIT_MAX ,"PREDICTION_UNIT_MAX" ,Tdepth_t ,_param->_size_depth+1); 136 ALLOC1_SIGNAL_IN ( in_DEPTH_PREDICTION_UNIT_MAX ,"PREDICTION_UNIT_MAX" ,Tdepth_t ,_param->_size_depth ); 137 ALLOC1_SIGNAL_IN ( in_DEPTH_PREDICTION_UNIT_FULL ,"PREDICTION_UNIT_FULL" ,Tcontrol_t ,1); 135 138 136 139 ALLOC1_SIGNAL_OUT (out_DEPTH_CONTEXT_STATE_MIN ,"CONTEXT_STATE_MIN" ,Tdepth_t ,_param->_size_depth ); … … 141 144 // _ALLOC2_SIGNAL_OUT(out_DEPTH_DECOD_UNIT_CURRENT ,"DECOD_UNIT_CURRENT" ,Tdepth_t ,_param->_size_depth ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 142 145 _ALLOC2_SIGNAL_OUT(out_DEPTH_DECOD_UNIT_MIN ,"DECOD_UNIT_MIN" ,Tdepth_t ,_param->_size_depth ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 143 _ALLOC2_SIGNAL_OUT(out_DEPTH_DECOD_UNIT_MAX ,"DECOD_UNIT_MAX" ,Tdepth_t ,_param->_size_depth+1,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 146 _ALLOC2_SIGNAL_OUT(out_DEPTH_DECOD_UNIT_MAX ,"DECOD_UNIT_MAX" ,Tdepth_t ,_param->_size_depth ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 147 _ALLOC2_SIGNAL_OUT(out_DEPTH_DECOD_UNIT_FULL ,"DECOD_UNIT_FULL" ,Tcontrol_t ,1 ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 144 148 } 145 149 … … 148 152 ALLOC2_INTERFACE("context",OUT,EAST,_("context"),_param->_nb_decod_unit,_param->_translate_context_id_from_decod_unit[it1].size()); 149 153 154 _ALLOC2_SIGNAL_OUT(out_CONTEXT_DECOD_UNIT_DEPTH_VAL ,"DECOD_UNIT_DEPTH_VAL" ,Tcontrol_t ,1 ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 150 155 _ALLOC2_SIGNAL_OUT(out_CONTEXT_DECOD_UNIT_DEPTH ,"DECOD_UNIT_DEPTH" ,Tdepth_t ,_param->_size_depth ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1]); 151 156 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_deallocation.cpp
r97 r101 70 70 DELETE1_SIGNAL( in_EVENT_CONTEXT_STATE_DEPTH ,_param->_nb_context,_param->_size_depth); 71 71 72 DELETE1_SIGNAL(out_DEPTH_MIN ,_param->_nb_context,_param->_size_depth ); 73 DELETE1_SIGNAL(out_DEPTH_MAX ,_param->_nb_context,_param->_size_depth+1); 74 DELETE1_SIGNAL( in_DEPTH_PREDICTION_UNIT_CURRENT ,_param->_nb_context,_param->_size_depth ); 75 DELETE1_SIGNAL( in_DEPTH_PREDICTION_UNIT_MIN ,_param->_nb_context,_param->_size_depth ); 76 DELETE1_SIGNAL( in_DEPTH_PREDICTION_UNIT_MAX ,_param->_nb_context,_param->_size_depth+1); 77 DELETE1_SIGNAL(out_DEPTH_CONTEXT_STATE_MIN ,_param->_nb_context,_param->_size_depth ); 72 DELETE1_SIGNAL(out_DEPTH_MIN ,_param->_nb_context,_param->_size_depth); 73 DELETE1_SIGNAL(out_DEPTH_MAX ,_param->_nb_context,_param->_size_depth); 74 DELETE1_SIGNAL(out_DEPTH_FULL ,_param->_nb_context,1); 75 DELETE1_SIGNAL( in_DEPTH_PREDICTION_UNIT_VAL ,_param->_nb_context,1); 76 DELETE1_SIGNAL( in_DEPTH_PREDICTION_UNIT_CURRENT ,_param->_nb_context,_param->_size_depth); 77 DELETE1_SIGNAL( in_DEPTH_PREDICTION_UNIT_MIN ,_param->_nb_context,_param->_size_depth); 78 DELETE1_SIGNAL( in_DEPTH_PREDICTION_UNIT_MAX ,_param->_nb_context,_param->_size_depth); 79 DELETE1_SIGNAL( in_DEPTH_PREDICTION_UNIT_FULL ,_param->_nb_context,1); 80 DELETE1_SIGNAL(out_DEPTH_CONTEXT_STATE_MIN ,_param->_nb_context,_param->_size_depth); 78 81 79 // DELETE2_SIGNAL(out_DEPTH_DECOD_UNIT_CURRENT ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],_param->_size_depth ); 80 DELETE2_SIGNAL(out_DEPTH_DECOD_UNIT_MIN ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],_param->_size_depth ); 81 DELETE2_SIGNAL(out_DEPTH_DECOD_UNIT_MAX ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],_param->_size_depth+1); 82 // DELETE2_SIGNAL(out_DEPTH_DECOD_UNIT_CURRENT ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],_param->_size_depth); 83 DELETE2_SIGNAL(out_DEPTH_DECOD_UNIT_MIN ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],_param->_size_depth); 84 DELETE2_SIGNAL(out_DEPTH_DECOD_UNIT_MAX ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],_param->_size_depth); 85 DELETE2_SIGNAL(out_DEPTH_DECOD_UNIT_FULL ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],1); 82 86 87 DELETE2_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH_VAL ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],1); 83 88 DELETE2_SIGNAL(out_CONTEXT_DECOD_UNIT_DEPTH ,_param->_nb_decod_unit,_param->_decod_unit_nb_context [it1],_param->_size_depth); 84 89 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_depth.cpp
r88 r101 26 26 if (_param->_have_port_depth) 27 27 { 28 Tdepth_t min = PORT_READ(in_DEPTH_PREDICTION_UNIT_MIN [i]); 29 PORT_WRITE(out_DEPTH_CONTEXT_STATE_MIN [i],min); 30 PORT_WRITE(out_DEPTH_MIN [i],min); 28 Tdepth_t min = PORT_READ(in_DEPTH_PREDICTION_UNIT_MIN [i]); 29 PORT_WRITE(out_DEPTH_CONTEXT_STATE_MIN [i],min); 30 PORT_WRITE(out_DEPTH_MIN [i],min); 31 PORT_WRITE(out_DEPTH_MAX [i], PORT_READ(in_DEPTH_PREDICTION_UNIT_MAX [i])); 31 32 } 32 33 PORT_WRITE(out_DEPTH_MAX [i], PORT_READ(in_DEPTH_PREDICTION_UNIT_MAX [i])); 33 PORT_WRITE(out_DEPTH_FULL [i], PORT_READ(in_DEPTH_PREDICTION_UNIT_FULL [i])); 34 34 } 35 35 … … 39 39 uint32_t num_context = _param->_translate_context_id_from_decod_unit[i][j]; 40 40 41 PORT_WRITE(out_CONTEXT_DECOD_UNIT_DEPTH_VAL [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_VAL [num_context])); 41 42 if (_param->_have_port_depth) 42 43 { 43 PORT_WRITE(out_CONTEXT_DECOD_UNIT_DEPTH [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_CURRENT [num_context])); 44 PORT_WRITE(out_DEPTH_DECOD_UNIT_MIN [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_MIN [num_context])); 44 PORT_WRITE(out_CONTEXT_DECOD_UNIT_DEPTH [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_CURRENT [num_context])); 45 PORT_WRITE(out_DEPTH_DECOD_UNIT_MIN [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_MIN [num_context])); 46 PORT_WRITE(out_DEPTH_DECOD_UNIT_MAX [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_MAX [num_context])); 45 47 } 46 PORT_WRITE(out_DEPTH_DECOD_UNIT_ MAX [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_MAX[num_context]));48 PORT_WRITE(out_DEPTH_DECOD_UNIT_FULL [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_FULL [num_context])); 47 49 } 48 50 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/src/test.cpp
r88 r101 67 67 ALLOC1_SC_SIGNAL( in_PREDICT_INSTRUCTION_ENABLE ," in_PREDICT_INSTRUCTION_ENABLE ",Tcontrol_t ,_param->_nb_instruction); 68 68 ALLOC_SC_SIGNAL ( in_PREDICT_INST_IFETCH_PTR ," in_PREDICT_INST_IFETCH_PTR ",Tinst_ifetch_ptr_t); 69 //ALLOC_SC_SIGNAL ( in_PREDICT_BRANCH_IS_CURRENT ," in_PREDICT_BRANCH_IS_CURRENT ",Tcontrol_t ); 69 70 ALLOC_SC_SIGNAL ( in_PREDICT_BRANCH_STATE ," in_PREDICT_BRANCH_STATE ",Tbranch_state_t ); 70 71 ALLOC_SC_SIGNAL ( in_PREDICT_BRANCH_UPDATE_PREDICTION_ID," in_PREDICT_BRANCH_UPDATE_PREDICTION_ID",Tprediction_ptr_t ); … … 104 105 if (_param->_have_port_inst_ifetch_ptr) 105 106 INSTANCE_SC_SIGNAL (_Address_management, in_PREDICT_INST_IFETCH_PTR ); 107 //INSTANCE_SC_SIGNAL (_Address_management, in_PREDICT_BRANCH_IS_CURRENT ); 106 108 INSTANCE_SC_SIGNAL (_Address_management, in_PREDICT_BRANCH_STATE ); 107 109 if (_param->_have_port_depth) … … 129 131 srand(seed); 130 132 131 const int32_t percent_transaction_address = 75;132 const int32_t percent_transaction_predict = 75;133 const int32_t percent_transaction_event = 5;133 const int32_t percent_transaction_address = 100; 134 const int32_t percent_transaction_predict = 100; 135 const int32_t percent_transaction_event = 0; 134 136 135 137 SC_START(0); … … 155 157 uint32_t nb_packet = 1; 156 158 159 Tcontrol_t a_val = false; 157 160 Tcontrol_t c_val = false; 158 Tcontrol_t n_val = false;161 Tcontrol_t n_val = true ; 159 162 Tcontrol_t nn_val = false; 160 163 164 Tgeneral_data_t a_addr = 0x100>>2; 161 165 Tgeneral_data_t c_addr = 0x100>>2; 162 166 Tgeneral_data_t n_addr = 0x100>>2; 163 167 Tgeneral_data_t nn_addr = 0x100>>2; 164 168 169 Tcontrol_t a_enable [_param->_nb_instruction]; 165 170 Tcontrol_t c_enable [_param->_nb_instruction]; 166 171 Tcontrol_t n_enable [_param->_nb_instruction]; 167 172 173 Tcontrol_t a_is_ds_take = 0; 168 174 Tcontrol_t c_is_ds_take = 0; 169 175 Tcontrol_t n_is_ds_take = 0; 170 176 Tcontrol_t nn_is_ds_take = 0; 171 177 172 c_enable [0] = 1;178 n_enable [0] = 1; 173 179 for (uint32_t i=1; i<_param->_nb_instruction; i++) 174 c_enable [i] = 0;180 n_enable [i] = 0; 175 181 176 182 LABEL("Send Reset"); … … 216 222 in_PREDICT_PC_NEXT_IS_DS_TAKE ->write(take); 217 223 in_PREDICT_INST_IFETCH_PTR ->write(0); 224 // in_PREDICT_BRANCH_IS_CURRENT ->write(0); 218 225 in_PREDICT_BRANCH_STATE ->write(0); 219 226 in_PREDICT_BRANCH_UPDATE_PREDICTION_ID->write(0); … … 251 258 for (uint32_t i=0; i<_param->_nb_instruction; i++) 252 259 n_enable [i] = in_PREDICT_INSTRUCTION_ENABLE [i]->read(); 260 261 LABEL(" * nn_addr : %.8x",nn_addr); 253 262 } 254 263 … … 256 265 { 257 266 LABEL("ADDRESS : Transaction accepted"); 258 LABEL(" * address wait : %.8x", c_addr);259 260 TEST(Tgeneral_address_t,out_ADDRESS_INSTRUCTION_ADDRESS ->read(), c_addr);267 LABEL(" * address wait : %.8x",a_addr); 268 269 TEST(Tgeneral_address_t,out_ADDRESS_INSTRUCTION_ADDRESS ->read(),a_addr); 261 270 for (uint32_t i=0; i<_param->_nb_instruction; i++) 262 TEST(Tcontrol_t ,out_ADDRESS_INSTRUCTION_ENABLE [i] ->read(), c_enable[i]);271 TEST(Tcontrol_t ,out_ADDRESS_INSTRUCTION_ENABLE [i] ->read(),a_enable[i]); 263 272 if (_param->_have_port_inst_ifetch_ptr) 264 273 TEST(Tinst_ifetch_ptr_t,out_ADDRESS_INST_IFETCH_PTR ->read(),0); … … 267 276 TEST(Tprediction_ptr_t ,out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID->read(),0); 268 277 269 c_val = 0;278 a_val = 0; 270 279 nb_packet ++; 271 280 } 272 281 282 { 283 string str_a_enable = ""; 284 string str_c_enable = ""; 285 string str_n_enable = ""; 286 287 for (uint32_t i=0; i<_param->_nb_instruction; i++) 288 { 289 str_a_enable += " " + toString(a_enable [i]); 290 str_c_enable += " " + toString(c_enable [i]); 291 str_n_enable += " " + toString(n_enable [i]); 292 } 293 294 LABEL("----[ Before ]---------------------"); 295 LABEL(" * nb_packet : %d",nb_packet); 296 LABEL(" * pc a : %d %d %.8x %s",a_val ,a_is_ds_take ,a_addr ,str_a_enable.c_str()); 297 LABEL(" * pc : %d %d %.8x %s",c_val ,c_is_ds_take ,c_addr ,str_c_enable.c_str()); 298 LABEL(" * pc+4 : %d %d %.8x %s",n_val ,n_is_ds_take ,n_addr ,str_n_enable.c_str()); 299 LABEL(" * pc+8 : %d %d %.8x" ,nn_val,nn_is_ds_take,nn_addr); 300 LABEL("-----------------------------------"); 301 } 302 303 if (not a_val) 304 { 305 if (c_val and n_val and nn_val) 306 { 307 a_val = 1; 308 c_val = 0; 309 a_addr = c_addr; 310 a_is_ds_take = c_is_ds_take; 311 312 for (uint32_t i=0; i<_param->_nb_instruction; i++) 313 a_enable [i] = c_enable [i]; 314 } 315 } 273 316 274 317 if (not c_val) 275 { 276 if (n_val and nn_val) 277 { 278 c_val = 1; 279 c_addr = n_addr; 280 c_is_ds_take = n_is_ds_take; 281 282 for (uint32_t i=0; i<_param->_nb_instruction; i++) 283 c_enable [i] = n_enable [i]; 284 285 n_val = 1; 286 n_addr = nn_addr; 287 n_is_ds_take = nn_is_ds_take; 288 289 nn_val = 0; 290 } 291 } 318 { 319 c_val = n_val; 320 if (n_val) 321 { 322 c_addr = n_addr; 323 c_is_ds_take = n_is_ds_take; 324 325 for (uint32_t i=0; i<_param->_nb_instruction; i++) 326 c_enable [i] = n_enable [i]; 327 } 328 n_val = 0; 329 } 330 331 if (not n_val) 332 { 333 n_val = nn_val; 334 if (nn_val) 335 { 336 n_addr = nn_addr; 337 n_is_ds_take = nn_is_ds_take; 338 339 // for (uint32_t i=0; i<_param->_nb_instruction; i++) 340 // n_enable [i] = nn_enable [i]; 341 } 342 nn_val = 0; 343 } 292 344 293 345 if (in_EVENT_VAL->read() and out_EVENT_ACK->read()) … … 295 347 LABEL("EVENT : Transaction accepted"); 296 348 349 a_val = false; 297 350 c_val = false; 298 351 n_val = true; … … 312 365 313 366 { 367 string str_a_enable = ""; 314 368 string str_c_enable = ""; 315 369 string str_n_enable = ""; … … 317 371 for (uint32_t i=0; i<_param->_nb_instruction; i++) 318 372 { 373 str_a_enable += " " + toString(a_enable [i]); 319 374 str_c_enable += " " + toString(c_enable [i]); 320 375 str_n_enable += " " + toString(n_enable [i]); 321 376 } 322 377 323 LABEL("---- -------------------------------");378 LABEL("----[ After ]----------------------"); 324 379 LABEL(" * nb_packet : %d",nb_packet); 325 LABEL(" * pc : %d %d %.8x %s",c_val ,c_is_ds_take , c_addr ,str_c_enable.c_str()); 326 if (nn_val) 327 { 328 LABEL(" * pc+4 : %d %d %.8x %s",n_val ,n_is_ds_take , n_addr ,str_n_enable.c_str()); 329 } 330 else 331 { 332 LABEL(" * pc+4 : %d %d %.8x" ,n_val ,n_is_ds_take , n_addr ); 333 } 334 LABEL(" * pc+8 : %d %d %.8x" ,nn_val ,nn_is_ds_take, nn_addr); 380 LABEL(" * pc a : %d %d %.8x %s",a_val ,a_is_ds_take ,a_addr ,str_a_enable.c_str()); 381 LABEL(" * pc : %d %d %.8x %s",c_val ,c_is_ds_take ,c_addr ,str_c_enable.c_str()); 382 LABEL(" * pc+4 : %d %d %.8x %s",n_val ,n_is_ds_take ,n_addr ,str_n_enable.c_str()); 383 LABEL(" * pc+8 : %d %d %.8x" ,nn_val,nn_is_ds_take,nn_addr); 335 384 LABEL("-----------------------------------"); 336 385 } … … 368 417 delete [] in_PREDICT_INSTRUCTION_ENABLE ; 369 418 delete in_PREDICT_INST_IFETCH_PTR ; 419 //delete in_PREDICT_BRANCH_IS_CURRENT ; 370 420 delete in_PREDICT_BRANCH_STATE ; 371 421 delete in_PREDICT_BRANCH_UPDATE_PREDICTION_ID; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/include/Address_management.h
r88 r101 83 83 public : SC_IN (Tcontrol_t ) * in_PREDICT_PC_NEXT_IS_DS_TAKE ; 84 84 public : SC_IN (Tcontrol_t ) ** in_PREDICT_INSTRUCTION_ENABLE ; //[nb_instruction] 85 public : SC_IN (Tinst_ifetch_ptr_t ) * in_PREDICT_INST_IFETCH_PTR;85 //public : SC_IN (Tcontrol_t ) * in_PREDICT_BRANCH_IS_CURRENT ; 86 86 public : SC_IN (Tbranch_state_t ) * in_PREDICT_BRANCH_STATE ; 87 87 public : SC_IN (Tprediction_ptr_t ) * in_PREDICT_BRANCH_UPDATE_PREDICTION_ID ; 88 public : SC_IN (Tinst_ifetch_ptr_t ) * in_PREDICT_INST_IFETCH_PTR ; 88 89 89 90 // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 98 99 99 100 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 101 private : Tcontrol_t reg_PC_ACCESS_VAL ; 102 private : Tgeneral_address_t reg_PC_ACCESS ; 103 private : Tcontrol_t reg_PC_ACCESS_IS_DS_TAKE ; 104 private : Tcontrol_t * reg_PC_ACCESS_INSTRUCTION_ENABLE ; //[nb_instruction] 105 private : Tinst_ifetch_ptr_t reg_PC_ACCESS_INST_IFETCH_PTR ; 106 private : Tbranch_state_t reg_PC_ACCESS_BRANCH_STATE ; 107 private : Tprediction_ptr_t reg_PC_ACCESS_BRANCH_UPDATE_PREDICTION_ID ; 108 100 109 private : Tcontrol_t reg_PC_CURRENT_VAL ; 101 110 private : Tgeneral_address_t reg_PC_CURRENT ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_allocation.cpp
r88 r101 85 85 ALLOC_SIGNAL_IN ( in_PREDICT_PC_NEXT ,"pc_next" ,Tgeneral_address_t,_param->_size_instruction_address); 86 86 ALLOC_SIGNAL_IN ( in_PREDICT_PC_NEXT_IS_DS_TAKE ,"pc_next_is_ds_take" ,Tcontrol_t ,1); 87 ALLOC_SIGNAL_IN ( in_PREDICT_INST_IFETCH_PTR ,"inst_ifetch_ptr" ,Tinst_ifetch_ptr_t,_param->_size_inst_ifetch_ptr);87 // ALLOC_SIGNAL_IN ( in_PREDICT_BRANCH_IS_CURRENT ,"branch_is_current" ,Tcontrol_t ,1); 88 88 ALLOC_SIGNAL_IN ( in_PREDICT_BRANCH_STATE ,"branch_state" ,Tbranch_state_t ,_param->_size_branch_state); 89 89 ALLOC_SIGNAL_IN ( in_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_depth); 90 ALLOC_SIGNAL_IN ( in_PREDICT_INST_IFETCH_PTR ,"inst_ifetch_ptr" ,Tinst_ifetch_ptr_t,_param->_size_inst_ifetch_ptr); 90 91 } 91 92 { … … 110 111 if (usage_is_set(_usage,USE_SYSTEMC)) 111 112 { 112 reg_PC_CURRENT_INSTRUCTION_ENABLE = new Tcontrol_t [_param->_nb_instruction]; 113 reg_PC_NEXT_INSTRUCTION_ENABLE = new Tcontrol_t [_param->_nb_instruction]; 113 ALLOC1(reg_PC_ACCESS_INSTRUCTION_ENABLE ,Tcontrol_t,_param->_nb_instruction); 114 ALLOC1(reg_PC_CURRENT_INSTRUCTION_ENABLE,Tcontrol_t,_param->_nb_instruction); 115 ALLOC1(reg_PC_NEXT_INSTRUCTION_ENABLE ,Tcontrol_t,_param->_nb_instruction); 114 116 } 115 117 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_deallocation.cpp
r88 r101 47 47 if (_param->_have_port_inst_ifetch_ptr) 48 48 delete in_PREDICT_INST_IFETCH_PTR ; 49 // delete in_PREDICT_BRANCH_IS_CURRENT ; 49 50 delete in_PREDICT_BRANCH_STATE ; 50 51 if (_param->_have_port_depth) … … 60 61 if (usage_is_set(_usage,USE_SYSTEMC)) 61 62 { 63 delete reg_PC_ACCESS_INSTRUCTION_ENABLE ; 62 64 delete reg_PC_CURRENT_INSTRUCTION_ENABLE; 63 65 delete reg_PC_NEXT_INSTRUCTION_ENABLE ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_genMoore.cpp
r88 r101 28 28 // ========================================= 29 29 30 internal_ADDRESS_VAL = reg_PC_ CURRENT_VAL;30 internal_ADDRESS_VAL = reg_PC_ACCESS_VAL; 31 31 32 32 PORT_WRITE(out_ADDRESS_VAL ,internal_ADDRESS_VAL ); 33 PORT_WRITE(out_ADDRESS_INSTRUCTION_ADDRESS ,reg_PC_ CURRENT);33 PORT_WRITE(out_ADDRESS_INSTRUCTION_ADDRESS ,reg_PC_ACCESS ); 34 34 if (_param->_have_port_inst_ifetch_ptr) 35 PORT_WRITE(out_ADDRESS_INST_IFETCH_PTR ,reg_PC_ CURRENT_INST_IFETCH_PTR );36 PORT_WRITE(out_ADDRESS_BRANCH_STATE ,reg_PC_ CURRENT_BRANCH_STATE );35 PORT_WRITE(out_ADDRESS_INST_IFETCH_PTR ,reg_PC_ACCESS_INST_IFETCH_PTR ); 36 PORT_WRITE(out_ADDRESS_BRANCH_STATE ,reg_PC_ACCESS_BRANCH_STATE ); 37 37 if (_param->_have_port_depth) 38 PORT_WRITE(out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID,reg_PC_ CURRENT_BRANCH_UPDATE_PREDICTION_ID);38 PORT_WRITE(out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID,reg_PC_ACCESS_BRANCH_UPDATE_PREDICTION_ID); 39 39 40 40 for (uint32_t i=0; i<_param->_nb_instruction; i++) 41 PORT_WRITE(out_ADDRESS_INSTRUCTION_ENABLE [i], reg_PC_ CURRENT_INSTRUCTION_ENABLE[i]);41 PORT_WRITE(out_ADDRESS_INSTRUCTION_ENABLE [i], reg_PC_ACCESS_INSTRUCTION_ENABLE[i]); 42 42 43 43 // ========================================= -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_transition.cpp
r98 r101 28 28 { 29 29 // nothing is valid 30 reg_PC_ACCESS_VAL = 0; 31 30 32 reg_PC_CURRENT_VAL = 0; 31 33 32 34 reg_PC_NEXT_VAL = 1; 33 35 reg_PC_NEXT = 0x100>>2; 36 reg_PC_NEXT_IS_DS_TAKE = 0; 37 reg_PC_NEXT_INSTRUCTION_ENABLE [0] = 1; 38 for (uint32_t i=1; i<_param->_nb_instruction; i++) 39 reg_PC_NEXT_INSTRUCTION_ENABLE [i] = 0; 40 reg_PC_NEXT_INST_IFETCH_PTR = 0; 41 reg_PC_NEXT_BRANCH_STATE = 0; 42 reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID = 0; 43 34 44 35 45 reg_PC_NEXT_NEXT_VAL = 0; … … 42 52 if (PORT_READ(in_PREDICT_ACK) and internal_PREDICT_VAL) 43 53 { 54 bool branch_is_current = reg_PC_NEXT_IS_DS_TAKE; 55 if (branch_is_current) 56 { 57 if (_param->_have_port_inst_ifetch_ptr) 58 reg_PC_CURRENT_INST_IFETCH_PTR = PORT_READ(in_PREDICT_INST_IFETCH_PTR ); 59 reg_PC_CURRENT_BRANCH_STATE = PORT_READ(in_PREDICT_BRANCH_STATE ); 60 if (_param->_have_port_depth) 61 reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID = PORT_READ(in_PREDICT_BRANCH_UPDATE_PREDICTION_ID); 62 } 63 else 64 { 65 if (_param->_have_port_inst_ifetch_ptr) 66 reg_PC_NEXT_INST_IFETCH_PTR = PORT_READ(in_PREDICT_INST_IFETCH_PTR ); 67 reg_PC_NEXT_BRANCH_STATE = PORT_READ(in_PREDICT_BRANCH_STATE ); 68 if (_param->_have_port_depth) 69 reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID = PORT_READ(in_PREDICT_BRANCH_UPDATE_PREDICTION_ID); 70 } 71 44 72 for (uint32_t i=0; i<_param->_nb_instruction; i++) 45 73 reg_PC_NEXT_INSTRUCTION_ENABLE [i] = PORT_READ(in_PREDICT_INSTRUCTION_ENABLE [i]); 46 if (_param->_have_port_inst_ifetch_ptr)47 reg_PC_NEXT_INST_IFETCH_PTR = PORT_READ(in_PREDICT_INST_IFETCH_PTR );48 reg_PC_NEXT_BRANCH_STATE = PORT_READ(in_PREDICT_BRANCH_STATE );49 if (_param->_have_port_depth)50 reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID = PORT_READ(in_PREDICT_BRANCH_UPDATE_PREDICTION_ID);51 74 52 75 reg_PC_NEXT_NEXT_VAL = 1; // address is valid … … 64 87 // ========================================= 65 88 // transaction with icache 66 if ( (internal_ADDRESS_VAL and PORT_READ(in_ADDRESS_ACK)) or not reg_PC_CURRENT_VAL) 67 { 89 if (internal_ADDRESS_VAL and PORT_READ(in_ADDRESS_ACK)) 90 { 91 reg_PC_ACCESS_VAL = 0; 68 92 #ifdef STATISTICS 69 93 if (usage_is_set(_usage,USE_STATISTICS)) 70 if (reg_PC_CURRENT_VAL) 71 { 94 { 72 95 (*_stat_nb_transaction_address) ++; 73 96 74 97 for (uint32_t i=0; i<_param->_nb_instruction; i++) 75 if (reg_PC_ CURRENT_INSTRUCTION_ENABLE [i] == true)98 if (reg_PC_ACCESS_INSTRUCTION_ENABLE [i] == true) 76 99 (*_stat_sum_packet_size) ++; 77 100 } 78 101 #endif 79 80 81 Tcontrol_t pc_next_val = reg_PC_NEXT_VAL and reg_PC_NEXT_NEXT_VAL; 82 83 // next pc became current pc 84 reg_PC_CURRENT_VAL = pc_next_val; 85 86 // if pc_next is not valid : don't erase PC and PC_IS_DS_TAKE : this register is send a the predict (to compute pc_next) 87 if (pc_next_val) 88 { 89 reg_PC_CURRENT = reg_PC_NEXT ; 90 reg_PC_CURRENT_IS_DS_TAKE = reg_PC_NEXT_IS_DS_TAKE ; 91 reg_PC_CURRENT_INST_IFETCH_PTR = reg_PC_NEXT_INST_IFETCH_PTR ; 92 reg_PC_CURRENT_BRANCH_STATE = reg_PC_NEXT_BRANCH_STATE ; 93 reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID = reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID; 94 95 for (uint32_t i=0; i<_param->_nb_instruction; i++) 96 reg_PC_CURRENT_INSTRUCTION_ENABLE [i] = reg_PC_NEXT_INSTRUCTION_ENABLE [i]; 97 98 reg_PC_NEXT_VAL = reg_PC_NEXT_NEXT_VAL ; 99 // if pc_next_next is not valid : don't erase PC_NEXT and PC_NEXT_IS_DS_TAKE : this register is send a the predict (to compute pc_next) 100 if (reg_PC_NEXT_NEXT_VAL) 101 { 102 reg_PC_NEXT = reg_PC_NEXT_NEXT ; 103 reg_PC_NEXT_IS_DS_TAKE = reg_PC_NEXT_NEXT_IS_DS_TAKE; 104 } 105 106 // invalid next next pc 107 reg_PC_NEXT_NEXT_VAL = 0; 108 } 109 110 } 111 102 } 103 104 // Shift register 105 106 if (not reg_PC_ACCESS_VAL and reg_PC_CURRENT_VAL and reg_PC_NEXT_VAL and reg_PC_NEXT_NEXT_VAL) 107 { 108 reg_PC_ACCESS_VAL = 1; // new request 109 reg_PC_CURRENT_VAL = 0; // invalid current 110 111 reg_PC_ACCESS = reg_PC_CURRENT ; 112 reg_PC_ACCESS_IS_DS_TAKE = reg_PC_CURRENT_IS_DS_TAKE ; 113 reg_PC_ACCESS_INST_IFETCH_PTR = reg_PC_CURRENT_INST_IFETCH_PTR ; 114 reg_PC_ACCESS_BRANCH_STATE = reg_PC_CURRENT_BRANCH_STATE ; 115 reg_PC_ACCESS_BRANCH_UPDATE_PREDICTION_ID = reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID; 116 117 for (uint32_t i=0; i<_param->_nb_instruction; i++) 118 reg_PC_ACCESS_INSTRUCTION_ENABLE [i] = reg_PC_CURRENT_INSTRUCTION_ENABLE [i]; 119 } 120 121 if (not reg_PC_CURRENT_VAL) 122 { 123 bool val = reg_PC_NEXT_VAL; 124 reg_PC_CURRENT_VAL = val; // new PC_CURRENT if PC_NEXT is valid 125 reg_PC_NEXT_VAL = 0; // invalid next 126 127 if (val) 128 { 129 reg_PC_CURRENT = reg_PC_NEXT ; 130 reg_PC_CURRENT_IS_DS_TAKE = reg_PC_NEXT_IS_DS_TAKE ; 131 reg_PC_CURRENT_INST_IFETCH_PTR = reg_PC_NEXT_INST_IFETCH_PTR ; 132 reg_PC_CURRENT_BRANCH_STATE = reg_PC_NEXT_BRANCH_STATE ; 133 reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID = reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID; 134 135 for (uint32_t i=0; i<_param->_nb_instruction; i++) 136 reg_PC_CURRENT_INSTRUCTION_ENABLE [i] = reg_PC_NEXT_INSTRUCTION_ENABLE [i]; 137 } 138 } 139 140 if (not reg_PC_NEXT_VAL) 141 { 142 bool val = reg_PC_NEXT_NEXT_VAL; 143 reg_PC_NEXT_VAL = val; // new PC_NEXT if PC_NEXT_NEXT is valid 144 reg_PC_NEXT_NEXT_VAL = 0; // invalid next_next 145 146 if (val) 147 { 148 reg_PC_NEXT = reg_PC_NEXT_NEXT ; 149 reg_PC_NEXT_IS_DS_TAKE = reg_PC_NEXT_NEXT_IS_DS_TAKE ; 150 // reg_PC_NEXT_INST_IFETCH_PTR = reg_PC_NEXT_NEXT_INST_IFETCH_PTR ; 151 // reg_PC_NEXT_BRANCH_STATE = reg_PC_NEXT_NEXT_BRANCH_STATE ; 152 // reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID = reg_PC_NEXT_NEXT_BRANCH_UPDATE_PREDICTION_ID; 153 154 // for (uint32_t i=0; i<_param->_nb_instruction; i++) 155 // reg_PC_NEXT_INSTRUCTION_ENABLE [i] = reg_PC_NEXT_NEXT_INSTRUCTION_ENABLE [i]; 156 } 157 } 112 158 113 159 // ========================================= … … 121 167 log_printf(TRACE,Address_management,FUNCTION," * ADDRESS_NEXT : %.8x (%.8x)",PORT_READ(in_EVENT_ADDRESS_NEXT ),PORT_READ(in_EVENT_ADDRESS_NEXT )<<2); 122 168 log_printf(TRACE,Address_management,FUNCTION," * ADDRESS_NEXT_VAL : %d" ,PORT_READ(in_EVENT_ADDRESS_NEXT_VAL)); 169 170 reg_PC_ACCESS_VAL = 0; 123 171 reg_PC_CURRENT_VAL = 0; 124 172 reg_PC_NEXT_VAL = 1; … … 157 205 } 158 206 159 #if defined(DEBUG) and (DEBUG >= DEBUG_TRACE)207 #if defined(DEBUG) and DEBUG_Address_management and (DEBUG >= DEBUG_TRACE) 160 208 log_printf(TRACE,Address_management,FUNCTION," * Dump PC"); 161 log_printf(TRACE,Address_management,FUNCTION," * Current : %d %d 0x%.8x (%.8x)",reg_PC_CURRENT_VAL , reg_PC_CURRENT_IS_DS_TAKE , reg_PC_CURRENT , reg_PC_CURRENT <<2); 162 log_printf(TRACE,Address_management,FUNCTION," * Next : %d %d 0x%.8x (%.8x)",reg_PC_NEXT_VAL , reg_PC_NEXT_IS_DS_TAKE , reg_PC_NEXT , reg_PC_NEXT <<2); 163 log_printf(TRACE,Address_management,FUNCTION," * Next_Next : %d %d 0x%.8x (%.8x)",reg_PC_NEXT_NEXT_VAL, reg_PC_NEXT_NEXT_IS_DS_TAKE, reg_PC_NEXT_NEXT, reg_PC_NEXT_NEXT<<2); 209 { 210 std::string instruction_enable; 211 for (uint32_t i=0; i<_param->_nb_instruction; ++i) 212 instruction_enable += toString(reg_PC_ACCESS_INSTRUCTION_ENABLE [i])+ " "; 213 214 log_printf(TRACE,Address_management,FUNCTION," * Access : %d %d 0x%.8x (%.8x) - %.2d %.2d %.2d - %s", 215 reg_PC_ACCESS_VAL, 216 reg_PC_ACCESS_IS_DS_TAKE, 217 reg_PC_ACCESS, 218 reg_PC_ACCESS<<2, 219 reg_PC_ACCESS_BRANCH_STATE, 220 reg_PC_ACCESS_INST_IFETCH_PTR, 221 reg_PC_ACCESS_BRANCH_UPDATE_PREDICTION_ID, 222 instruction_enable.c_str() 223 ); 224 } 225 { 226 std::string instruction_enable; 227 for (uint32_t i=0; i<_param->_nb_instruction; ++i) 228 instruction_enable += toString(reg_PC_CURRENT_INSTRUCTION_ENABLE [i])+ " "; 229 230 log_printf(TRACE,Address_management,FUNCTION," * Current : %d %d 0x%.8x (%.8x) - %.2d %.2d %.2d - %s", 231 reg_PC_CURRENT_VAL, 232 reg_PC_CURRENT_IS_DS_TAKE, 233 reg_PC_CURRENT, 234 reg_PC_CURRENT<<2, 235 reg_PC_CURRENT_BRANCH_STATE, 236 reg_PC_CURRENT_INST_IFETCH_PTR, 237 reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID, 238 instruction_enable.c_str() 239 ); 240 } 241 { 242 std::string instruction_enable; 243 for (uint32_t i=0; i<_param->_nb_instruction; ++i) 244 instruction_enable += toString(reg_PC_NEXT_INSTRUCTION_ENABLE [i])+ " "; 245 246 log_printf(TRACE,Address_management,FUNCTION," * Next : %d %d 0x%.8x (%.8x) - %.2d %.2d %.2d - %s", 247 reg_PC_NEXT_VAL, 248 reg_PC_NEXT_IS_DS_TAKE, 249 reg_PC_NEXT, 250 reg_PC_NEXT<<2, 251 reg_PC_NEXT_BRANCH_STATE, 252 reg_PC_NEXT_INST_IFETCH_PTR, 253 reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID, 254 instruction_enable.c_str()); 255 } 256 log_printf(TRACE,Address_management,FUNCTION," * Next_Next : %d %d 0x%.8x (%.8x)", 257 reg_PC_NEXT_NEXT_VAL, 258 reg_PC_NEXT_NEXT_IS_DS_TAKE, 259 reg_PC_NEXT_NEXT, 260 reg_PC_NEXT_NEXT<<2); 164 261 #endif 165 262 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/include/Types.h
r85 r101 22 22 { 23 23 IFETCH_QUEUE_STATE_EMPTY , // slot is empty 24 //IFETCH_QUEUE_STATE_WAIT_REQ , // slot is allocated - wait request to cache24 // IFETCH_QUEUE_STATE_WAIT_REQ , // slot is allocated - wait request to cache 25 25 IFETCH_QUEUE_STATE_WAIT_RSP , // slot have send a request - wait respons from cache 26 26 IFETCH_QUEUE_STATE_HAVE_RSP , // slot have a bloc of instruction - wait accept by decod -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_transition.cpp
r88 r101 41 41 // New slot in ifetch_queue is allocated 42 42 43 _queue[reg_PTR_WRITE]->_state 43 _queue[reg_PTR_WRITE]->_state = IFETCH_QUEUE_STATE_WAIT_RSP; 44 44 45 45 #ifdef STATISTICS … … 58 58 } 59 59 60 _queue[reg_PTR_WRITE]->_address = PORT_READ(in_ADDRESS_INSTRUCTION_ADDRESS 60 _queue[reg_PTR_WRITE]->_address = PORT_READ(in_ADDRESS_INSTRUCTION_ADDRESS); 61 61 _queue[reg_PTR_WRITE]->_inst_ifetch_ptr = (_param->_have_port_inst_ifetch_ptr)?PORT_READ(in_ADDRESS_INST_IFETCH_PTR ):0; 62 _queue[reg_PTR_WRITE]->_branch_state = PORT_READ(in_ADDRESS_BRANCH_STATE 62 _queue[reg_PTR_WRITE]->_branch_state = PORT_READ(in_ADDRESS_BRANCH_STATE); 63 63 _queue[reg_PTR_WRITE]->_branch_update_prediction_id = (_param->_have_port_depth)?PORT_READ(in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID):0; 64 64 … … 142 142 for (uint32_t i=0; i<_param->_size_queue; i++) 143 143 { 144 log_printf(TRACE,Ifetch_queue,FUNCTION," * [%d] %s %.8x %d - %d %d %d", i, toString(_queue [i]->_state).c_str(), _queue [i]->_address,_queue [i]->_inst_ifetch_ptr,_queue [i]->_branch_state,_queue [i]->_branch_update_prediction_id,_queue [i]->_exception); 144 log_printf(TRACE,Ifetch_queue,FUNCTION," * [%d] 0x%.8x (0x%.8x) %d - %d %d %d - %s", 145 i, 146 _queue [i]->_address, 147 _queue [i]->_address<<2, 148 _queue [i]->_inst_ifetch_ptr, 149 _queue [i]->_branch_state, 150 _queue [i]->_branch_update_prediction_id, 151 _queue [i]->_exception, 152 toString(_queue [i]->_state).c_str() 153 ); 145 154 146 155 for (uint32_t j=0; j<_param->_nb_instruction; j++) 147 log_printf(TRACE,Ifetch_queue,FUNCTION," * %d %.8x", _queue [i]->_instruction_enable[j], _queue [i]->_instruction[j]);156 log_printf(TRACE,Ifetch_queue,FUNCTION," * %d 0x%.8x", _queue [i]->_instruction_enable[j], _queue [i]->_instruction[j]); 148 157 } 149 158 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/SelfTest/src/test.cpp
r88 r101 250 250 LABEL("Iteration %d",iteration); 251 251 252 // PREDICT253 {254 in_PREDICT_ACK ->write((rand()%100)<percent_transaction_predict);252 // // PREDICT 253 // { 254 // in_PREDICT_ACK ->write((rand()%100)<percent_transaction_predict); 255 255 256 SC_START(0);257 258 Taddress_t addr = (out_PREDICT_PC_CURRENT_IS_DS_TAKE->read())?out_PREDICT_PC_PREVIOUS->read():out_PREDICT_PC_CURRENT->read();259 260 uint32_t begin = addr%_param->_nb_instruction;261 uint32_t end = ((begin<<1)>_param->_nb_instruction)?(_param->_nb_instruction-1):(begin<<1);262 Tcontrol_t take = (nb_packet_in%jump)==0;256 // SC_START(0); 257 258 // Taddress_t addr = (out_PREDICT_PC_CURRENT_IS_DS_TAKE->read())?out_PREDICT_PC_PREVIOUS->read():out_PREDICT_PC_CURRENT->read(); 259 260 // uint32_t begin = addr%_param->_nb_instruction; 261 // uint32_t end = ((begin<<1)>_param->_nb_instruction)?(_param->_nb_instruction-1):(begin<<1); 262 // Tcontrol_t take = (nb_packet_in%jump)==0; 263 263 264 if (take)265 addr += 0x100;266 else267 addr += end-begin+1;268 269 for (uint32_t i=0; i<_param->_nb_instruction; i++)270 in_PREDICT_INSTRUCTION_ENABLE [i] ->write((i>=begin) and (i<=end));271 in_PREDICT_PC_NEXT ->write(addr);272 in_PREDICT_PC_NEXT_IS_DS_TAKE ->write(take);273 in_PREDICT_INST_IFETCH_PTR ->write(0);274 in_PREDICT_BRANCH_STATE ->write(0);275 in_PREDICT_BRANCH_UPDATE_PREDICTION_ID->write(0);276 }277 278 // DECOD279 {280 uint32_t nb_decod = (rand()%_param->_nb_instruction);281 282 for (uint32_t i=0; i<_param->_nb_instruction; i++)283 in_DECOD_ACK [i]->write(i<=nb_decod);284 }285 286 // EVENT287 in_EVENT_VAL ->write((rand()%100)<percent_transaction_event );288 in_EVENT_ADDRESS ->write(0x77);289 in_EVENT_ADDRESS_NEXT ->write(0x171);290 Tcontrol_t is_ds_take = rand();291 in_EVENT_ADDRESS_NEXT_VAL->write(is_ds_take);292 in_EVENT_IS_DS_TAKE ->write(is_ds_take);293 294 // ICACHE_REQ295 in_ICACHE_REQ_ACK->write((rand()%100)<percent_transaction_icache_req);296 297 // ICACHE_RSP298 {299 Tcontrol_t val = false;300 if (not cache->empty())301 {302 slot_t<cache_req_t *> cache_rsp = cache->read();303 304 val = (cache_rsp._delay == 0);264 // if (take) 265 // addr += 0x100; 266 // else 267 // addr += end-begin+1; 268 269 // for (uint32_t i=0; i<_param->_nb_instruction; i++) 270 // in_PREDICT_INSTRUCTION_ENABLE [i] ->write((i>=begin) and (i<=end)); 271 // in_PREDICT_PC_NEXT ->write(addr); 272 // in_PREDICT_PC_NEXT_IS_DS_TAKE ->write(take); 273 // in_PREDICT_INST_IFETCH_PTR ->write(0); 274 // in_PREDICT_BRANCH_STATE ->write(0); 275 // in_PREDICT_BRANCH_UPDATE_PREDICTION_ID->write(0); 276 // } 277 278 // // DECOD 279 // { 280 // uint32_t nb_decod = (rand()%_param->_nb_instruction); 281 282 // for (uint32_t i=0; i<_param->_nb_instruction; i++) 283 // in_DECOD_ACK [i]->write(i<=nb_decod); 284 // } 285 286 // // EVENT 287 // in_EVENT_VAL ->write((rand()%100)<percent_transaction_event ); 288 // in_EVENT_ADDRESS ->write(0x77); 289 // in_EVENT_ADDRESS_NEXT ->write(0x171); 290 // Tcontrol_t is_ds_take = rand(); 291 // in_EVENT_ADDRESS_NEXT_VAL->write(is_ds_take); 292 // in_EVENT_IS_DS_TAKE ->write(is_ds_take); 293 294 // // ICACHE_REQ 295 // in_ICACHE_REQ_ACK->write((rand()%100)<percent_transaction_icache_req); 296 297 // // ICACHE_RSP 298 // { 299 // Tcontrol_t val = false; 300 // if (not cache->empty()) 301 // { 302 // slot_t<cache_req_t *> cache_rsp = cache->read(); 303 304 // val = (cache_rsp._delay == 0); 305 305 306 Tpacket_t packet = cache_rsp._data->packet ;307 Taddress_t address = cache_rsp._data->address;306 // Tpacket_t packet = cache_rsp._data->packet ; 307 // Taddress_t address = cache_rsp._data->address; 308 308 309 in_ICACHE_RSP_PACKET_ID ->write(packet);310 for (uint32_t i=0; i<_param->_nb_instruction; i++)311 in_ICACHE_RSP_INSTRUCTION [i]->write(address+i);312 in_ICACHE_RSP_ERROR ->write(0);313 }314 315 in_ICACHE_RSP_VAL->write(val);316 }317 318 //-------------------------------------------------319 SC_START(0);320 //-------------------------------------------------321 322 if (out_ICACHE_REQ_VAL->read() and in_ICACHE_REQ_ACK->read())323 {324 LABEL("ICACHE_REQ : Transaction accepted");325 326 Tpacket_t packet = (_param->_have_port_ifetch_queue_ptr)?out_ICACHE_REQ_PACKET_ID->read():0;327 Taddress_t address = out_ICACHE_REQ_ADDRESS->read();328 329 TEST(bool ,slot_use[packet], false);330 TEST(Taddress_t,address ,c_addr);331 332 slot_use[packet] = true;333 334 uint32_t delay;335 if ((rand()%100)<percent_hit)336 delay = 1;337 else338 delay = delay_miss_min + (rand()%(delay_miss_max-delay_miss_min+1));339 340 cache_req_t * cache_req = new cache_req_t(packet,address);341 cache->push(delay,cache_req);342 343 c_val = 0;344 nb_packet_in ++;345 }346 347 {348 bool find=false;349 350 Taddress_t addr=out_DECOD_ADDRESS->read();351 for (uint32_t i=0; i<_param->_nb_instruction; i++)352 if (out_DECOD_VAL[i]->read() and in_DECOD_ACK [i]->read())353 {354 Tinstruction_t inst = out_DECOD_INSTRUCTION[i]->read();355 LABEL("DECOD [%d] : Transaction accepted",i);356 LABEL(" address : 0x%x",addr);357 LABEL(" instruction : 0x%x",inst);358 359 find = true;360 TEST(Tinstruction_t,inst,addr+i);361 }362 363 if (find)364 {365 if (_param->_have_port_inst_ifetch_ptr)366 TEST(Tinst_ifetch_ptr_t, out_DECOD_INST_IFETCH_PTR ->read(), 0);367 TEST(Tbranch_state_t , out_DECOD_BRANCH_STATE ->read(), 0);368 if (_param->_have_port_depth)369 TEST(Tprediction_ptr_t , out_DECOD_BRANCH_UPDATE_PREDICTION_ID->read(), 0);370 TEST(Texception_t , out_DECOD_EXCEPTION ->read(), 0);371 }372 }309 // in_ICACHE_RSP_PACKET_ID ->write(packet); 310 // for (uint32_t i=0; i<_param->_nb_instruction; i++) 311 // in_ICACHE_RSP_INSTRUCTION [i]->write(address+i); 312 // in_ICACHE_RSP_ERROR ->write(0); 313 // } 314 315 // in_ICACHE_RSP_VAL->write(val); 316 // } 317 318 // //------------------------------------------------- 319 // SC_START(0); 320 // //------------------------------------------------- 321 322 // if (out_ICACHE_REQ_VAL->read() and in_ICACHE_REQ_ACK->read()) 323 // { 324 // LABEL("ICACHE_REQ : Transaction accepted"); 325 326 // Tpacket_t packet = (_param->_have_port_ifetch_queue_ptr)?out_ICACHE_REQ_PACKET_ID->read():0; 327 // Taddress_t address = out_ICACHE_REQ_ADDRESS->read(); 328 329 // TEST(bool ,slot_use[packet], false); 330 // TEST(Taddress_t,address ,c_addr); 331 332 // slot_use[packet] = true; 333 334 // uint32_t delay; 335 // if ((rand()%100)<percent_hit) 336 // delay = 1; 337 // else 338 // delay = delay_miss_min + (rand()%(delay_miss_max-delay_miss_min+1)); 339 340 // cache_req_t * cache_req = new cache_req_t(packet,address); 341 // cache->push(delay,cache_req); 342 343 // c_val = 0; 344 // nb_packet_in ++; 345 // } 346 347 // { 348 // bool find=false; 349 350 // Taddress_t addr=out_DECOD_ADDRESS->read(); 351 // for (uint32_t i=0; i<_param->_nb_instruction; i++) 352 // if (out_DECOD_VAL[i]->read() and in_DECOD_ACK [i]->read()) 353 // { 354 // Tinstruction_t inst = out_DECOD_INSTRUCTION[i]->read(); 355 // LABEL("DECOD [%d] : Transaction accepted",i); 356 // LABEL(" address : 0x%x",addr); 357 // LABEL(" instruction : 0x%x",inst); 358 359 // find = true; 360 // TEST(Tinstruction_t,inst,addr+i); 361 // } 362 363 // if (find) 364 // { 365 // if (_param->_have_port_inst_ifetch_ptr) 366 // TEST(Tinst_ifetch_ptr_t, out_DECOD_INST_IFETCH_PTR ->read(), 0); 367 // TEST(Tbranch_state_t , out_DECOD_BRANCH_STATE ->read(), 0); 368 // if (_param->_have_port_depth) 369 // TEST(Tprediction_ptr_t , out_DECOD_BRANCH_UPDATE_PREDICTION_ID->read(), 0); 370 // TEST(Texception_t , out_DECOD_EXCEPTION ->read(), 0); 371 // } 372 // } 373 373 374 if (in_ICACHE_RSP_VAL->read() and out_ICACHE_RSP_ACK->read())375 {376 LABEL("ICACHE_RSP : Transaction accepted");377 378 slot_use[cache->read()._data->packet] = false;379 380 cache->pop();381 }382 383 if (out_PREDICT_VAL->read() and in_PREDICT_ACK->read())384 {385 LABEL("PREDICT : Transaction accepted");386 387 if (c_val)388 TEST(Tgeneral_address_t,out_PREDICT_PC_PREVIOUS ->read(),c_addr );389 TEST(Tgeneral_address_t,out_PREDICT_PC_CURRENT ->read(),n_addr );390 TEST(Tcontrol_t ,out_PREDICT_PC_CURRENT_IS_DS_TAKE->read(),n_is_ds_take);391 392 nn_val = true;393 nn_addr = in_PREDICT_PC_NEXT ->read();394 nn_is_ds_take = in_PREDICT_PC_NEXT_IS_DS_TAKE->read();374 // if (in_ICACHE_RSP_VAL->read() and out_ICACHE_RSP_ACK->read()) 375 // { 376 // LABEL("ICACHE_RSP : Transaction accepted"); 377 378 // slot_use[cache->read()._data->packet] = false; 379 380 // cache->pop(); 381 // } 382 383 // if (out_PREDICT_VAL->read() and in_PREDICT_ACK->read()) 384 // { 385 // LABEL("PREDICT : Transaction accepted"); 386 387 // if (c_val) 388 // TEST(Tgeneral_address_t,out_PREDICT_PC_PREVIOUS ->read(),c_addr ); 389 // TEST(Tgeneral_address_t,out_PREDICT_PC_CURRENT ->read(),n_addr ); 390 // TEST(Tcontrol_t ,out_PREDICT_PC_CURRENT_IS_DS_TAKE->read(),n_is_ds_take); 391 392 // nn_val = true; 393 // nn_addr = in_PREDICT_PC_NEXT ->read(); 394 // nn_is_ds_take = in_PREDICT_PC_NEXT_IS_DS_TAKE->read(); 395 395 396 for (uint32_t i=0; i<_param->_nb_instruction; i++)397 n_enable [i] = in_PREDICT_INSTRUCTION_ENABLE [i]->read();398 }399 400 if (not c_val)401 {402 if (n_val and nn_val)403 {404 c_val = 1;405 c_addr = n_addr;406 c_is_ds_take = n_is_ds_take;407 408 for (uint32_t i=0; i<_param->_nb_instruction; i++)409 c_enable [i] = n_enable [i];396 // for (uint32_t i=0; i<_param->_nb_instruction; i++) 397 // n_enable [i] = in_PREDICT_INSTRUCTION_ENABLE [i]->read(); 398 // } 399 400 // if (not c_val) 401 // { 402 // if (n_val and nn_val) 403 // { 404 // c_val = 1; 405 // c_addr = n_addr; 406 // c_is_ds_take = n_is_ds_take; 407 408 // for (uint32_t i=0; i<_param->_nb_instruction; i++) 409 // c_enable [i] = n_enable [i]; 410 410 411 n_val = 1;412 n_addr = nn_addr;413 n_is_ds_take = nn_is_ds_take;411 // n_val = 1; 412 // n_addr = nn_addr; 413 // n_is_ds_take = nn_is_ds_take; 414 414 415 nn_val = 0;416 }417 }418 419 if (in_EVENT_VAL->read() and out_EVENT_ACK->read())420 {421 LABEL("EVENT : Transaction accepted");422 423 c_val = false;424 n_val = true;425 426 n_addr = in_EVENT_ADDRESS->read();427 n_is_ds_take = in_EVENT_IS_DS_TAKE->read();428 nn_val = in_EVENT_ADDRESS_NEXT_VAL->read();429 nn_addr = in_EVENT_ADDRESS_NEXT ->read();430 nn_is_ds_take = 0;431 432 n_enable [0] = 1;433 for (uint32_t i=1; i<_param->_nb_instruction; i++)434 n_enable [i] = 0;435 }415 // nn_val = 0; 416 // } 417 // } 418 419 // if (in_EVENT_VAL->read() and out_EVENT_ACK->read()) 420 // { 421 // LABEL("EVENT : Transaction accepted"); 422 423 // c_val = false; 424 // n_val = true; 425 426 // n_addr = in_EVENT_ADDRESS->read(); 427 // n_is_ds_take = in_EVENT_IS_DS_TAKE->read(); 428 // nn_val = in_EVENT_ADDRESS_NEXT_VAL->read(); 429 // nn_addr = in_EVENT_ADDRESS_NEXT ->read(); 430 // nn_is_ds_take = 0; 431 432 // n_enable [0] = 1; 433 // for (uint32_t i=1; i<_param->_nb_instruction; i++) 434 // n_enable [i] = 0; 435 // } 436 436 437 437 438 {439 string str_c_enable = "";440 string str_n_enable = "";441 442 for (uint32_t i=0; i<_param->_nb_instruction; i++)443 {444 str_c_enable += " " + toString(c_enable [i]);445 str_n_enable += " " + toString(n_enable [i]);446 }447 448 LABEL("-----------------------------------");449 LABEL(" * nb_packet_in : %d",nb_packet_in);450 LABEL(" * nb_packet_out : %d",nb_packet_out);451 LABEL(" * pc : %d %d %.8x %s",c_val ,c_is_ds_take , c_addr ,str_c_enable.c_str());452 if (nn_val)453 {454 LABEL(" * pc+4 : %d %d %.8x %s",n_val ,n_is_ds_take , n_addr ,str_n_enable.c_str());455 }456 else457 {458 LABEL(" * pc+4 : %d %d %.8x" ,n_val ,n_is_ds_take , n_addr );459 }460 LABEL(" * pc+8 : %d %d %.8x" ,nn_val ,nn_is_ds_take, nn_addr);461 LABEL("-----------------------------------");462 }463 464 SC_START(1);465 cache->transition();438 // { 439 // string str_c_enable = ""; 440 // string str_n_enable = ""; 441 442 // for (uint32_t i=0; i<_param->_nb_instruction; i++) 443 // { 444 // str_c_enable += " " + toString(c_enable [i]); 445 // str_n_enable += " " + toString(n_enable [i]); 446 // } 447 448 // LABEL("-----------------------------------"); 449 // LABEL(" * nb_packet_in : %d",nb_packet_in); 450 // LABEL(" * nb_packet_out : %d",nb_packet_out); 451 // LABEL(" * pc : %d %d %.8x %s",c_val ,c_is_ds_take , c_addr ,str_c_enable.c_str()); 452 // if (nn_val) 453 // { 454 // LABEL(" * pc+4 : %d %d %.8x %s",n_val ,n_is_ds_take , n_addr ,str_n_enable.c_str()); 455 // } 456 // else 457 // { 458 // LABEL(" * pc+4 : %d %d %.8x" ,n_val ,n_is_ds_take , n_addr ); 459 // } 460 // LABEL(" * pc+8 : %d %d %.8x" ,nn_val ,nn_is_ds_take, nn_addr); 461 // LABEL("-----------------------------------"); 462 // } 463 464 // SC_START(1); 465 // cache->transition(); 466 466 } 467 467 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/include/Ifetch_unit.h
r88 r101 90 90 public : SC_IN (Tcontrol_t ) * in_PREDICT_PC_NEXT_IS_DS_TAKE ; 91 91 public : SC_IN (Tcontrol_t ) ** in_PREDICT_INSTRUCTION_ENABLE ; //[nb_instruction] 92 public : SC_IN (Tinst_ifetch_ptr_t ) * in_PREDICT_INST_IFETCH_PTR ;93 92 public : SC_IN (Tbranch_state_t ) * in_PREDICT_BRANCH_STATE ; 94 93 public : SC_IN (Tprediction_ptr_t ) * in_PREDICT_BRANCH_UPDATE_PREDICTION_ID ; 94 public : SC_IN (Tinst_ifetch_ptr_t ) * in_PREDICT_INST_IFETCH_PTR ; 95 95 96 96 // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_predict.cpp
r100 r101 151 151 152 152 // Branch is the last slot : next paquet is the delay slot 153 pc_next = address_src+1; // sequen cial153 pc_next = address_src+1; // sequential 154 154 pc_next_is_ds_take = 1; 155 155 address_msb = _param->_nb_instruction [context]; // == (address_src_lsb+1) … … 341 341 342 342 // Take the address packet base and add new packet 343 pc_next = pc_current-address_lsb+_param->_nb_instruction [context]; // sequen cial343 pc_next = pc_current-address_lsb+_param->_nb_instruction [context]; // sequential 344 344 pc_next_is_ds_take = 0; // no branch, also no delay slot 345 345 inst_ifetch_ptr = 0; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/test.cpp
r98 r101 99 99 ALLOC1_SC_SIGNAL( in_EVENT_DEPTH ," in_EVENT_DEPTH ",Tdepth_t ,_param->_nb_context); 100 100 101 ALLOC1_SC_SIGNAL(out_DEPTH_VAL ,"out_DEPTH_VAL ",Tcontrol_t ,_param->_nb_context); 101 102 ALLOC1_SC_SIGNAL(out_DEPTH_CURRENT ,"out_DEPTH_CURRENT ",Tdepth_t ,_param->_nb_context); 102 103 ALLOC1_SC_SIGNAL(out_DEPTH_MIN ,"out_DEPTH_MIN ",Tdepth_t ,_param->_nb_context); 103 104 ALLOC1_SC_SIGNAL(out_DEPTH_MAX ,"out_DEPTH_MAX ",Tdepth_t ,_param->_nb_context); 105 ALLOC1_SC_SIGNAL(out_DEPTH_FULL ,"out_DEPTH_FULL ",Tcontrol_t ,_param->_nb_context); 104 106 105 107 /******************************************************** … … 170 172 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_CURRENT ,_param->_nb_context); 171 173 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_MIN ,_param->_nb_context); 172 }173 174 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_MAX ,_param->_nb_context); 175 } 176 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_VAL ,_param->_nb_context); 177 INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_FULL ,_param->_nb_context); 174 178 175 179 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); … … 372 376 DELETE1_SC_SIGNAL( in_EVENT_DEPTH ,_param->_nb_context); 373 377 378 DELETE1_SC_SIGNAL(out_DEPTH_VAL ,_param->_nb_context); 374 379 DELETE1_SC_SIGNAL(out_DEPTH_CURRENT ,_param->_nb_context); 375 380 DELETE1_SC_SIGNAL(out_DEPTH_MIN ,_param->_nb_context); 376 381 DELETE1_SC_SIGNAL(out_DEPTH_MAX ,_param->_nb_context); 382 DELETE1_SC_SIGNAL(out_DEPTH_FULL ,_param->_nb_context); 377 383 #endif 378 384 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp
r98 r101 143 143 ALLOC1_SC_SIGNAL( in_EVENT_DEPTH ," in_EVENT_DEPTH ",Tdepth_t ,_param->_nb_context); 144 144 145 ALLOC1_SC_SIGNAL(out_DEPTH_VAL ,"out_DEPTH_VAL ",Tcontrol_t ,_param->_nb_context); 145 146 ALLOC1_SC_SIGNAL(out_DEPTH_CURRENT ,"out_DEPTH_CURRENT ",Tdepth_t ,_param->_nb_context); 146 147 ALLOC1_SC_SIGNAL(out_DEPTH_MIN ,"out_DEPTH_MIN ",Tdepth_t ,_param->_nb_context); 147 148 ALLOC1_SC_SIGNAL(out_DEPTH_MAX ,"out_DEPTH_MAX ",Tdepth_t ,_param->_nb_context); 149 ALLOC1_SC_SIGNAL(out_DEPTH_FULL ,"out_DEPTH_FULL ",Tcontrol_t ,_param->_nb_context); 148 150 149 151 /******************************************************** … … 239 241 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_CURRENT ,_param->_nb_context); 240 242 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_MIN ,_param->_nb_context); 243 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_MAX ,_param->_nb_context); 241 244 } 242 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_MAX ,_param->_nb_context); 245 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_VAL ,_param->_nb_context); 246 INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_FULL ,_param->_nb_context); 243 247 244 248 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); … … 373 377 374 378 if (_param->_have_port_depth) 379 { 375 380 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 376 381 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 377 382 } 378 383 SC_START(0); // fct melay 379 384 … … 404 409 405 410 if (_param->_have_port_depth) 411 { 406 412 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 407 413 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 414 } 408 415 } 409 416 } … … 462 469 463 470 if (_param->_have_port_depth) 471 { 464 472 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 465 473 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 474 } 466 475 } 467 476 } … … 490 499 491 500 if (_param->_have_port_depth) 501 { 492 502 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 493 503 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 504 } 494 505 495 506 SC_START(0); … … 516 527 517 528 if (_param->_have_port_depth) 529 { 518 530 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 519 531 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 532 } 520 533 } 521 534 } … … 539 552 540 553 // if (_param->_have_port_depth) 554 // { 541 555 // TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 542 556 // TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 557 // } 543 558 544 559 SC_START(0); … … 654 669 655 670 if (_param->_have_port_depth) 671 { 656 672 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 657 673 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 658 674 } 659 675 SC_START(0); // fct melay 660 676 … … 685 701 686 702 if (_param->_have_port_depth) 703 { 687 704 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 688 705 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 706 } 689 707 } 690 708 } … … 764 782 765 783 if (_param->_have_port_depth) 784 { 766 785 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 767 786 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 787 } 768 788 } 769 789 } … … 793 813 794 814 if (_param->_have_port_depth) 815 { 795 816 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 796 817 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 797 818 } 798 819 SC_START(0); 799 820 … … 819 840 820 841 if (_param->_have_port_depth) 842 { 821 843 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 822 844 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 845 } 823 846 } 824 847 } … … 1013 1036 1014 1037 if (_param->_have_port_depth) 1038 { 1015 1039 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 1016 1040 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 1017 1041 } 1018 1042 SC_START(0); // fct melay 1019 1043 … … 1044 1068 1045 1069 if (_param->_have_port_depth) 1070 { 1046 1071 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 1047 1072 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 1073 } 1048 1074 } 1049 1075 } … … 1123 1149 1124 1150 if (_param->_have_port_depth) 1151 { 1125 1152 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 1126 1153 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 1154 } 1127 1155 } 1128 1156 } … … 1152 1180 1153 1181 if (_param->_have_port_depth) 1182 { 1154 1183 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 1155 1184 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 1156 1185 } 1157 1186 SC_START(0); 1158 1187 … … 1178 1207 1179 1208 if (_param->_have_port_depth) 1209 { 1180 1210 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 1181 1211 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 1212 } 1182 1213 } 1183 1214 } … … 1450 1481 1451 1482 if (_param->_have_port_depth) 1483 { 1452 1484 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 1453 1485 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 1454 1486 } 1455 1487 SC_START(0); // fct melay 1456 1488 … … 1481 1513 1482 1514 if (_param->_have_port_depth) 1483 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 1515 { 1516 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 1484 1517 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 1518 } 1485 1519 } 1486 1520 } … … 1541 1575 1542 1576 if (_param->_have_port_depth) 1543 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 1577 { 1578 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 1544 1579 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 1580 } 1545 1581 } 1546 1582 } … … 1593 1629 1594 1630 if (_param->_have_port_depth) 1631 { 1595 1632 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 1596 1633 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 1597 1634 } 1598 1635 SC_START(0); // fct melay 1599 1636 … … 1624 1661 1625 1662 if (_param->_have_port_depth) 1626 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 1663 { 1664 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 1627 1665 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 1666 } 1628 1667 } 1629 1668 } … … 1677 1716 1678 1717 if (_param->_have_port_depth) 1718 { 1679 1719 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 1680 1720 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 1681 1721 } 1722 1682 1723 SC_START(0); 1683 1724 … … 1711 1752 1712 1753 if (_param->_have_port_depth) 1754 { 1713 1755 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 1714 1756 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 1757 } 1715 1758 } 1716 1759 } … … 1738 1781 1739 1782 if (_param->_have_port_depth) 1783 { 1740 1784 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 1741 1785 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 1742 1786 } 1743 1787 SC_START(0); 1744 1788 … … 1772 1816 1773 1817 if (_param->_have_port_depth) 1818 { 1774 1819 TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]); 1775 1820 TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]); 1821 } 1776 1822 } 1777 1823 } … … 2176 2222 2177 2223 // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2224 delete [] out_DEPTH_VAL; 2178 2225 delete [] out_DEPTH_CURRENT; 2179 2226 delete [] out_DEPTH_MIN; 2180 2227 delete [] out_DEPTH_MAX; 2228 delete [] out_DEPTH_FULL; 2181 2229 2182 2230 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h
r95 r101 26 26 EVENT_STATE_FLUSH_UPT , // in commit stage, detect a miss, context is stop and ufpt is flush, update RAS 27 27 EVENT_STATE_UPDATE_CONTEXT , // prediction unit is update, send signal to context manager 28 EVENT_STATE_WAIT_END_EVENT // prediction unit is ok, wait the end of e nvent (send by Context State)28 EVENT_STATE_WAIT_END_EVENT // prediction unit is ok, wait the end of event (send by Context State) 29 29 } event_state_t; 30 30 … … 45 45 UPDATE_PREDICTION_STATE_EVENT , // previous branch is a miss prediction 46 46 UPDATE_PREDICTION_STATE_END_OK , // branch is updated, update pointer 47 UPDATE_PREDICTION_STATE_END_KO_WAIT_END , // branch is updated, don't update pointer 47 48 UPDATE_PREDICTION_STATE_END_KO // branch is updated, don't update pointer 48 49 } upt_state_t; … … 147 148 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_EVENT : return "event" ; break; 148 149 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_END_OK : return "end_ok" ; break; 150 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_END_KO_WAIT_END: return "end_ko_wait_end" ; break; 149 151 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_END_KO : return "end_ko" ; break; 150 152 default : return "" ; break; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h
r98 r101 148 148 149 149 // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 150 public : SC_OUT(Tcontrol_t ) ** out_DEPTH_VAL ; //[nb_context] 150 151 public : SC_OUT(Tdepth_t ) ** out_DEPTH_CURRENT ; //[nb_context] 151 152 public : SC_OUT(Tdepth_t ) ** out_DEPTH_MIN ; //[nb_context] 152 153 public : SC_OUT(Tdepth_t ) ** out_DEPTH_MAX ; //[nb_context] 154 public : SC_OUT(Tcontrol_t ) ** out_DEPTH_FULL ; //[nb_context] 153 155 // If DEPTH_CURRENT : 154 156 // equal at DEPTH_MIN -> not speculative … … 172 174 private : uint32_t * reg_UPT_TOP_EVENT ; //[nb_context] 173 175 private : uint32_t * reg_UPT_UPDATE ; //[nb_context] 176 private : bool * reg_UPT_EMPTY ; //[nb_context] 174 177 175 178 private : bool * reg_IS_ACCURATE ; //[nb_context] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp
r98 r101 160 160 { 161 161 ALLOC1_INTERFACE("depth",OUT,SOUTH, "depth", _param->_nb_context); 162 ALLOC1_SIGNAL_OUT(out_DEPTH_CURRENT,"CURRENT",Tdepth_t,_param->_size_depth); 163 ALLOC1_SIGNAL_OUT(out_DEPTH_MIN ,"MIN" ,Tdepth_t,_param->_size_depth); 164 ALLOC1_SIGNAL_OUT(out_DEPTH_MAX ,"MAX" ,Tdepth_t,_param->_size_depth+1); 162 ALLOC1_SIGNAL_OUT(out_DEPTH_VAL ,"VAL" ,Tcontrol_t,1); 163 ALLOC1_SIGNAL_OUT(out_DEPTH_CURRENT,"CURRENT",Tdepth_t ,_param->_size_depth); 164 ALLOC1_SIGNAL_OUT(out_DEPTH_MIN ,"MIN" ,Tdepth_t ,_param->_size_depth); 165 ALLOC1_SIGNAL_OUT(out_DEPTH_MAX ,"MAX" ,Tdepth_t ,_param->_size_depth); 166 ALLOC1_SIGNAL_OUT(out_DEPTH_FULL ,"FULL" ,Tcontrol_t,1); 165 167 } 166 168 … … 201 203 ALLOC1(reg_UPT_TOP_EVENT ,uint32_t ,_param->_nb_context); 202 204 ALLOC1(reg_UPT_UPDATE ,uint32_t ,_param->_nb_context); 205 ALLOC1(reg_UPT_EMPTY ,bool ,_param->_nb_context); 203 206 204 207 ALLOC1(reg_EVENT_STATE ,event_state_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
r98 r101 117 117 118 118 // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 119 DELETE1_SIGNAL(out_DEPTH_VAL ,_param->_nb_context,1); 119 120 DELETE1_SIGNAL(out_DEPTH_CURRENT ,_param->_nb_context,_param->_size_depth); 120 121 DELETE1_SIGNAL(out_DEPTH_MIN ,_param->_nb_context,_param->_size_depth); 121 DELETE1_SIGNAL(out_DEPTH_MAX ,_param->_nb_context,_param->_size_depth+1); 122 DELETE1_SIGNAL(out_DEPTH_MAX ,_param->_nb_context,_param->_size_depth); 123 DELETE1_SIGNAL(out_DEPTH_FULL ,_param->_nb_context,1); 122 124 123 125 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 154 156 DELETE1(reg_UPT_TOP_EVENT ,_param->_nb_context); 155 157 DELETE1(reg_UPT_UPDATE ,_param->_nb_context); 158 DELETE1(reg_UPT_EMPTY ,_param->_nb_context); 156 159 157 160 DELETE1(reg_EVENT_STATE ,_param->_nb_context); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp
r98 r101 34 34 for (uint32_t i=0; i<_param->_nb_context; i++) 35 35 { 36 // is a valid instruction ? 37 // If DEPTH_CURRENT : 38 // equal at DEPTH_MIN -> not speculative 39 // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss 40 // include ]DEPTH_MIN:DEPTH_MAX] -> speculative 41 42 PORT_WRITE(out_DEPTH_VAL [i],(reg_UPDATE_PREDICTION_TABLE [i][reg_UPT_TOP [i]]._state == UPDATE_PREDICTION_STATE_EMPTY)); 36 43 if (_param->_have_port_depth) 37 44 { 38 45 PORT_WRITE(out_DEPTH_CURRENT [i], reg_UPT_TOP [i]); 39 46 PORT_WRITE(out_DEPTH_MIN [i], reg_UPT_BOTTOM [i]); 40 }41 47 PORT_WRITE(out_DEPTH_MAX [i], reg_UPT_TOP [i]); 48 } 49 PORT_WRITE(out_DEPTH_FULL [i], not reg_UPT_EMPTY [i] and (reg_UPT_TOP [i] == reg_UPT_BOTTOM [i])); 50 51 // bool empty = reg_UPT_EMPTY [i]; 52 // PORT_WRITE(out_DEPTH_MAX [i], ((empty)?reg_UPT_BOTTOM [i]:((reg_UPT_TOP [i]==0)?(_param->_size_upt_queue[i]-1):(reg_UPT_TOP [i]-1)))); 42 53 } 43 54 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
r98 r101 46 46 reg_UPT_TOP_EVENT [i] = 0; 47 47 reg_UPT_UPDATE [i] = 0; 48 reg_UPT_EMPTY [i] = true; 48 49 49 50 reg_IS_ACCURATE [i] = true; … … 87 88 // UPDATE_PREDICTION_TABLE 88 89 { 89 uint32_t bottom = reg_UPT_BOTTOM [i]; 90 bool end_ok = (reg_UPDATE_PREDICTION_TABLE [i][bottom]._state == UPDATE_PREDICTION_STATE_END_OK); 91 bool end_ko = (reg_UPDATE_PREDICTION_TABLE [i][bottom]._state == UPDATE_PREDICTION_STATE_END_KO); 90 uint32_t bottom = reg_UPT_BOTTOM [i]; 91 bool end_ok = (reg_UPDATE_PREDICTION_TABLE [i][bottom]._state == UPDATE_PREDICTION_STATE_END_OK); 92 bool end_ko = (reg_UPDATE_PREDICTION_TABLE [i][bottom]._state == UPDATE_PREDICTION_STATE_END_KO); 93 // event_state_t event_state = reg_EVENT_STATE [i]; 92 94 93 95 // Test if state is end 96 // if ((end_ok or end_ko) and 97 // ((event_state != EVENT_STATE_UPDATE_CONTEXT) and 98 // (event_state != EVENT_STATE_WAIT_END_EVENT))) 94 99 if (end_ok or end_ko) 95 100 { … … 102 107 // Update pointer 103 108 reg_UPT_BOTTOM [i] = (bottom+1)%_param->_size_upt_queue[i]; 109 110 if (reg_UPT_BOTTOM [i] == reg_UPT_TOP [i]) 111 reg_UPT_EMPTY [i] = true; // free a slot 112 104 113 // if (bottom = reg_UPT_UPDATE [i]) 105 114 // reg_UPT_UPDATE [i] = reg_UPT_BOTTOM [i]; … … 108 117 reg_UPT_TOP [i] = reg_UPT_TOP_EVENT [i]; 109 118 reg_UPT_UPDATE [i] = reg_UPT_TOP_EVENT [i]; 119 120 if (reg_UPT_BOTTOM [i] != reg_UPT_TOP [i]) 121 reg_UPT_EMPTY [i] = false; 110 122 } 111 123 } … … 290 302 // Update pointer 291 303 reg_UPT_TOP [context] = (upt_ptr_write+1)%_param->_size_upt_queue [context]; 304 reg_UPT_EMPTY [context] = false; 292 305 // reg_UPT_UPDATE [context] = reg_UPT_TOP [context]; 293 306 } … … 338 351 reg_UPT_TOP_EVENT [context] = top; 339 352 353 if (reg_UPT_BOTTOM [context] == reg_UPT_TOP [context]) 354 reg_UPT_EMPTY [i] = true; 355 340 356 #ifdef DEBUG_TEST 341 357 if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_WAIT_END) … … 483 499 if (ko) 484 500 { 501 // Ko : wait end of all instruction 502 // log_printf(TRACE,Update_Prediction_Table,FUNCTION," * UPT [%d][%d].state <- UPDATE_PREDICTION_STATE_END_KO_WAIT_END (update)",context,depth); 503 504 // reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_END_KO_WAIT_END; 505 485 506 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * UPT [%d][%d].state <- UPDATE_PREDICTION_STATE_END_KO (update)",context,depth); 486 507 … … 535 556 536 557 // Free the branch with no accurate ? 537 if ( reg_UPDATE_PREDICTION_TABLE [context][depth]._is_accurate == false)558 if ( (reg_UPDATE_PREDICTION_TABLE [context][depth]._is_accurate == false) and not ko) 538 559 reg_IS_ACCURATE [context] = true; 539 560 } … … 587 608 // Tdepth_t depth = PORT_READ(in_EVENT_DEPTH [i]); 588 609 589 // Test if end of miss 610 // Test if end of miss -> all previous branch is complete 611 // -> all next branch is finish 590 612 if (event_type == EVENT_TYPE_MISS_SPECULATION) 591 613 { … … 602 624 603 625 reg_EVENT_STATE [i] = EVENT_STATE_OK; 626 reg_IS_ACCURATE [i] = true; 627 628 // Tdepth_t depth = reg_UPT_TOP [i]; 629 630 #ifdef DEBUG_TEST 631 // if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_END_KO_WAIT_END) 632 // throw ERRORMORPHEO(FUNCTION,_("Event : invalid upt event state.")); 633 // if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_END_KO) 634 // throw ERRORMORPHEO(FUNCTION,_("Event : invalid upt event state.")); 635 #endif 636 637 // log_printf(TRACE,Update_Prediction_Table,FUNCTION," * UPT [%d][%d].state <- UPDATE_PREDICTION_STATE_END_KO (update)",i,depth); 638 639 // reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_END_KO; 640 604 641 } 605 642 } … … 699 736 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UPT_TOP_EVENT : %d",reg_UPT_TOP_EVENT [i]); 700 737 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UPT_UPDATE : %d",reg_UPT_UPDATE [i]); 738 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UPT_EMPTY : %d",reg_UPT_EMPTY [i]); 701 739 for (uint32_t j=0; j<_param->_size_upt_queue[i]; j++) 702 740 log_printf(TRACE,Update_Prediction_Table,FUNCTION," [%d] %.4d, %.8x %.8x, %.1d %.1d %.1d, %.8d %.8x %.4d - %s", -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Prediction_unit.h
r98 r101 121 121 122 122 // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 123 public : SC_OUT(Tcontrol_t ) ** out_DEPTH_VAL ; //[nb_context] 123 124 public : SC_OUT(Tdepth_t ) ** out_DEPTH_CURRENT ; //[nb_context] 124 125 public : SC_OUT(Tdepth_t ) ** out_DEPTH_MIN ; //[nb_context] 125 126 public : SC_OUT(Tdepth_t ) ** out_DEPTH_MAX ; //[nb_context] 127 public : SC_OUT(Tcontrol_t ) ** out_DEPTH_FULL ; //[nb_context] 126 128 127 129 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_allocation.cpp
r98 r101 127 127 ALLOC1_INTERFACE("depth",OUT,SOUTH,"Interface with depth",_param->_nb_context); 128 128 129 ALLOC1_SIGNAL_OUT(out_DEPTH_CURRENT ,"current" ,Tdepth_t,_param->_size_depth); 130 ALLOC1_SIGNAL_OUT(out_DEPTH_MIN ,"min" ,Tdepth_t,_param->_size_depth); 131 ALLOC1_SIGNAL_OUT(out_DEPTH_MAX ,"max" ,Tdepth_t,_param->_size_depth+1); 129 ALLOC1_SIGNAL_OUT(out_DEPTH_VAL ,"val" ,Tcontrol_t,1); 130 ALLOC1_SIGNAL_OUT(out_DEPTH_CURRENT ,"current" ,Tdepth_t ,_param->_size_depth); 131 ALLOC1_SIGNAL_OUT(out_DEPTH_MIN ,"min" ,Tdepth_t ,_param->_size_depth); 132 ALLOC1_SIGNAL_OUT(out_DEPTH_MAX ,"max" ,Tdepth_t ,_param->_size_depth); 133 ALLOC1_SIGNAL_OUT(out_DEPTH_FULL ,"full" ,Tcontrol_t,1); 132 134 } 133 135 … … 729 731 #endif 730 732 733 PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_VAL", 734 dest,"out_DEPTH_"+toString(i)+"_VAL"); 735 PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_FULL", 736 dest,"out_DEPTH_"+toString(i)+"_FULL"); 731 737 if (_param->_have_port_depth) 732 738 { … … 735 741 PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MIN", 736 742 dest,"out_DEPTH_"+toString(i)+"_MIN"); 737 }738 743 PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MAX", 739 744 dest,"out_DEPTH_"+toString(i)+"_MAX"); 745 } 740 746 } 741 747 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_deallocation.cpp
r98 r101 76 76 DELETE1_SIGNAL( in_EVENT_DEPTH ,_param->_nb_context,_param->_size_depth ); 77 77 78 DELETE1_SIGNAL(out_DEPTH_VAL ,_param->_nb_context,1); 78 79 DELETE1_SIGNAL(out_DEPTH_CURRENT ,_param->_nb_context,_param->_size_depth); 79 80 DELETE1_SIGNAL(out_DEPTH_MIN ,_param->_nb_context,_param->_size_depth); 80 DELETE1_SIGNAL(out_DEPTH_MAX ,_param->_nb_context,_param->_size_depth+1); 81 DELETE1_SIGNAL(out_DEPTH_MAX ,_param->_nb_context,_param->_size_depth); 82 DELETE1_SIGNAL(out_DEPTH_FULL ,_param->_nb_context,1); 81 83 } 82 84 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/src/test.cpp
r98 r101 117 117 ALLOC1_SC_SIGNAL(out_DEPTH_MIN ,"out_DEPTH_MIN ",Tdepth_t ,_param->_nb_context); 118 118 ALLOC1_SC_SIGNAL(out_DEPTH_MAX ,"out_DEPTH_MAX ",Tdepth_t ,_param->_nb_context); 119 ALLOC1_SC_SIGNAL(out_DEPTH_FULL ,"out_DEPTH_FULL ",Tcontrol_t ,_param->_nb_context); 119 120 ALLOC1_SC_SIGNAL( in_SPR_SR_IEE ," in_SPR_SR_IEE ",Tcontrol_t ,_param->_nb_context); 120 121 ALLOC1_SC_SIGNAL( in_SPR_SR_EPH ," in_SPR_SR_EPH ",Tcontrol_t ,_param->_nb_context); … … 206 207 INSTANCE1_SC_SIGNAL(_Front_end, in_NB_INST_COMMIT_MEM ,_param->_nb_context); 207 208 if (_param->_have_port_depth) 209 { 208 210 INSTANCE1_SC_SIGNAL(_Front_end,out_DEPTH_MIN ,_param->_nb_context); 209 211 INSTANCE1_SC_SIGNAL(_Front_end,out_DEPTH_MAX ,_param->_nb_context); 212 } 213 INSTANCE1_SC_SIGNAL(_Front_end,out_DEPTH_FULL ,_param->_nb_context); 210 214 INSTANCE1_SC_SIGNAL(_Front_end, in_SPR_SR_IEE ,_param->_nb_context); 211 215 INSTANCE1_SC_SIGNAL(_Front_end, in_SPR_SR_EPH ,_param->_nb_context); … … 257 261 TEST(Tdepth_t ,out_DEPTH_MIN [i]->read(),0); // no branch speculated 258 262 TEST(Tdepth_t ,out_DEPTH_MAX [i]->read(),0); // no branch speculated 263 TEST(Tdepth_t ,out_DEPTH_FULL [i]->read(),0); // no branch speculated 259 264 } 260 265 for (uint32_t i=0; i<_param->_sum_inst_decod; ++i) … … 359 364 DELETE1_SC_SIGNAL(out_DEPTH_MIN ,_param->_nb_context); 360 365 DELETE1_SC_SIGNAL(out_DEPTH_MAX ,_param->_nb_context); 366 DELETE1_SC_SIGNAL(out_DEPTH_FULL ,_param->_nb_context); 361 367 DELETE1_SC_SIGNAL( in_SPR_SR_IEE ,_param->_nb_context); 362 368 DELETE1_SC_SIGNAL( in_SPR_SR_EPH ,_param->_nb_context); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/include/Front_end.h
r98 r101 155 155 public : SC_OUT(Tdepth_t ) ** out_DEPTH_MIN ;//[nb_context] 156 156 public : SC_OUT(Tdepth_t ) ** out_DEPTH_MAX ;//[nb_context] 157 public : SC_OUT(Tcontrol_t ) ** out_DEPTH_FULL ;//[nb_context] 157 158 158 159 // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_allocation.cpp
r98 r101 180 180 ALLOC1_INTERFACE("depth",OUT,EAST,_("Interface depth"),_param->_nb_context); 181 181 182 ALLOC1_SIGNAL_OUT (out_DEPTH_MIN ,"MIN" ,Tdepth_t ,_param->_size_depth ); 183 ALLOC1_SIGNAL_OUT (out_DEPTH_MAX ,"MAX" ,Tdepth_t ,_param->_size_depth+1); 182 ALLOC1_SIGNAL_OUT (out_DEPTH_MIN ,"MIN" ,Tdepth_t ,_param->_size_depth); 183 ALLOC1_SIGNAL_OUT (out_DEPTH_MAX ,"MAX" ,Tdepth_t ,_param->_size_depth); 184 ALLOC1_SIGNAL_OUT (out_DEPTH_FULL ,"FULL" ,Tcontrol_t ,1); 184 185 } 185 186 … … 611 612 #endif 612 613 614 COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_VAL", 615 dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_VAL"); 613 616 if (_param->_have_port_depth) 614 617 { … … 617 620 COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_MIN" , 618 621 dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_MIN" ); 619 }620 622 COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_MAX" , 621 623 dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_MAX" ); 624 } 625 COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_FULL" , 626 dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_FULL" ); 622 627 } 623 628 } … … 787 792 788 793 if (_param->_have_port_depth) 794 { 789 795 COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+ "_MIN", 790 796 dest,"out_DEPTH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_MIN"); 791 797 COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+ "_MAX", 792 798 dest,"out_DEPTH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_MAX"); 799 } 800 COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+ "_FULL", 801 dest,"out_DEPTH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_FULL"); 802 793 803 } 794 804 … … 828 838 #endif 829 839 840 COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+ "_DEPTH_VAL", 841 dest,"out_CONTEXT_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_DEPTH_VAL"); 830 842 if (_param->_have_port_depth) 831 843 COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+ "_DEPTH", … … 1180 1192 1181 1193 if (_param->_have_port_depth) 1194 { 1182 1195 PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MIN", 1183 1196 dest,"out_DEPTH_"+toString(i)+"_MIN"); 1184 1197 PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MAX", 1185 1198 dest,"out_DEPTH_"+toString(i)+"_MAX"); 1186 } 1187 1199 } 1200 PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_FULL", 1201 dest,"out_DEPTH_"+toString(i)+"_FULL"); 1202 } 1203 1204 // in_DEPTH_PREDICTION_UNIT_VAL - component_prediction_unit 1188 1205 // in_DEPTH_PREDICTION_UNIT_CURRENT - component_prediction_unit 1189 1206 // in_DEPTH_PREDICTION_UNIT_MIN - component_prediction_unit 1190 1207 // in_DEPTH_PREDICTION_UNIT_MAX - component_prediction_unit 1208 // in_DEPTH_PREDICTION_UNIT_FULL - component_prediction_unit 1191 1209 // out_DEPTH_DECOD_UNIT_MIN - component_decod_unit 1192 1210 // out_DEPTH_DECOD_UNIT_MAX - component_decod_unit 1211 // out_DEPTH_DECOD_UNIT_FULL - component_decod_unit 1193 1212 // out_DEPTH_CONTEXT_STATE_MIN - component_context_state 1194 1213 1195 1214 // ~~~~~[ Interface : "context"" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1215 // out_CONTEXT_DECOD_UNIT_DEPTH_VAL - component_decod_unit 1196 1216 // out_CONTEXT_DECOD_UNIT_DEPTH - component_decod_unit 1197 1217 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_deallocation.cpp
r98 r101 104 104 DELETE1_SIGNAL(out_DEPTH_MIN ,_param->_nb_context,_param->_size_depth ); 105 105 DELETE1_SIGNAL(out_DEPTH_MAX ,_param->_nb_context,_param->_size_depth+1); 106 DELETE1_SIGNAL(out_DEPTH_FULL ,_param->_nb_context,_param->_size_depth+1); 106 107 107 108 DELETE1_SIGNAL( in_SPR_SR_IEE ,_param->_nb_context,1); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/src/test.cpp
r98 r101 164 164 ALLOC2_SC_SIGNAL( in_DEPTH_MIN ," in_DEPTH_MIN ",Tdepth_t ,_param->_nb_front_end,_param->_nb_context[it1]); 165 165 ALLOC2_SC_SIGNAL( in_DEPTH_MAX ," in_DEPTH_MAX ",Tdepth_t ,_param->_nb_front_end,_param->_nb_context[it1]); 166 ALLOC2_SC_SIGNAL( in_DEPTH_FULL ," in_DEPTH_FULL ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_context[it1]); 166 167 167 168 ALLOC2_SC_SIGNAL( in_SPR_READ_SR_OVE ," in_SPR_READ_SR_OVE ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_context[it1]); … … 308 309 INSTANCE2_SC_SIGNAL(_Commit_unit,out_NB_INST_COMMIT_ALL ,_param->_nb_front_end,_param->_nb_context[it1]); 309 310 INSTANCE2_SC_SIGNAL(_Commit_unit,out_NB_INST_COMMIT_MEM ,_param->_nb_front_end,_param->_nb_context[it1]); 311 312 if (_param->_have_port_depth) 313 { 314 INSTANCE2_SC_SIGNAL(_Commit_unit, in_DEPTH_MIN ,_param->_nb_front_end,_param->_nb_context[it1]); 310 315 INSTANCE2_SC_SIGNAL(_Commit_unit, in_DEPTH_MAX ,_param->_nb_front_end,_param->_nb_context[it1]); 316 } 317 INSTANCE2_SC_SIGNAL(_Commit_unit, in_DEPTH_FULL ,_param->_nb_front_end,_param->_nb_context[it1]); 311 318 312 319 INSTANCE2_SC_SIGNAL(_Commit_unit, in_SPR_READ_SR_OVE ,_param->_nb_front_end,_param->_nb_context[it1]); … … 321 328 INSTANCE2_SC_SIGNAL(_Commit_unit,out_SPR_WRITE_SR_OV ,_param->_nb_front_end,_param->_nb_context[it1]); 322 329 323 for (uint32_t i=0; i<_param->_nb_front_end; i++)324 for (uint32_t j=0; j<_param->_nb_context[i]; j++)325 if (_param->_have_port_depth)326 INSTANCE_SC_SIGNAL(_Commit_unit, in_DEPTH_MIN [i][j]);327 328 330 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); 329 331 … … 703 705 DELETE2_SC_SIGNAL( in_DEPTH_MIN ,_param->_nb_front_end,_param->_nb_context[it1]); 704 706 DELETE2_SC_SIGNAL( in_DEPTH_MAX ,_param->_nb_front_end,_param->_nb_context[it1]); 707 DELETE2_SC_SIGNAL( in_DEPTH_FULL ,_param->_nb_front_end,_param->_nb_context[it1]); 705 708 706 709 DELETE2_SC_SIGNAL( in_SPR_READ_SR_OVE ,_param->_nb_front_end,_param->_nb_context[it1]); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h
r100 r101 194 194 public : SC_IN (Tdepth_t ) *** in_DEPTH_MIN ;//[nb_front_end][nb_context] 195 195 public : SC_IN (Tdepth_t ) *** in_DEPTH_MAX ;//[nb_front_end][nb_context] 196 public : SC_IN (Tcontrol_t ) *** in_DEPTH_FULL ;//[nb_front_end][nb_context] 196 197 197 198 // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp
r100 r101 213 213 ALLOC2_INTERFACE("depth",IN,WEST,_("Interface with Prediction unit."),_param->_nb_front_end, _param->_nb_context[it1]); 214 214 215 _ALLOC2_SIGNAL_IN ( in_DEPTH_MIN ,"min" ,Tdepth_t ,_param->_size_depth ,_param->_nb_front_end, _param->_nb_context[it1]); 216 _ALLOC2_SIGNAL_IN ( in_DEPTH_MAX ,"max" ,Tdepth_t ,_param->_size_depth+1,_param->_nb_front_end, _param->_nb_context[it1]); 215 _ALLOC2_SIGNAL_IN ( in_DEPTH_MIN ,"min" ,Tdepth_t ,_param->_size_depth,_param->_nb_front_end, _param->_nb_context[it1]); 216 _ALLOC2_SIGNAL_IN ( in_DEPTH_MAX ,"max" ,Tdepth_t ,_param->_size_depth,_param->_nb_front_end, _param->_nb_context[it1]); 217 _ALLOC2_SIGNAL_IN ( in_DEPTH_FULL ,"full" ,Tcontrol_t ,1 ,_param->_nb_front_end, _param->_nb_context[it1]); 217 218 } 218 219 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp
r100 r101 140 140 DELETE2_SIGNAL(out_NB_INST_COMMIT_MEM ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_nb_inst_commit); 141 141 142 DELETE2_SIGNAL( in_DEPTH_MIN ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_depth ); 143 DELETE2_SIGNAL( in_DEPTH_MAX ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_depth+1); 142 DELETE2_SIGNAL( in_DEPTH_MIN ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_depth); 143 DELETE2_SIGNAL( in_DEPTH_MAX ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_depth); 144 DELETE2_SIGNAL( in_DEPTH_FULL ,_param->_nb_front_end, _param->_nb_context[it1],1); 144 145 145 146 DELETE2_SIGNAL( in_SPR_READ_SR_OVE ,_param->_nb_front_end, _param->_nb_context[it1],1); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp
r100 r101 347 347 if (internal_REEXECUTE_VAL [0] and PORT_READ(in_REEXECUTE_ACK [0])) 348 348 { 349 log_printf(TRACE,Commit_unit,FUNCTION," * REEXECUTE [0]"); 350 349 351 uint32_t num_bank = internal_REEXECUTE_NUM_BANK [0]; 350 352 … … 368 370 if (internal_BRANCH_COMPLETE_VAL [i] and PORT_READ(in_BRANCH_COMPLETE_ACK [i])) 369 371 { 372 log_printf(TRACE,Commit_unit,FUNCTION," * BRANCH_COMPLETE [%d]",i); 373 log_printf(TRACE,Commit_unit,FUNCTION," * miss_prediction : %d",PORT_READ(in_BRANCH_COMPLETE_MISS_PREDICTION [i])); 374 370 375 uint32_t num_bank = internal_BRANCH_COMPLETE_NUM_BANK [i]; 371 376 … … 378 383 #endif 379 384 380 entry->state = (PORT_READ(in_BRANCH_COMPLETE_MISS_PREDICTION [i]))?ROB_END_ OK_SPECULATIVE:ROB_END_BRANCH_MISS_SPECULATIVE;385 entry->state = (PORT_READ(in_BRANCH_COMPLETE_MISS_PREDICTION [i]))?ROB_END_BRANCH_MISS_SPECULATIVE:ROB_END_OK_SPECULATIVE; 381 386 // entry->state = ROB_END_OK_SPECULATIVE; 382 387 } … … 410 415 Tdepth_t depth = entry->depth; 411 416 412 Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [front_end_id][context_id]):0; 413 Tdepth_t depth_max = PORT_READ(in_DEPTH_MAX[front_end_id][context_id]); 417 Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN[front_end_id][context_id]):0; 418 Tdepth_t depth_max = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX[front_end_id][context_id]):0; 419 Tcontrol_t depth_full = PORT_READ(in_DEPTH_FULL [front_end_id][context_id]); 414 420 415 421 // is a valid instruction ? 416 422 // If DEPTH_CURRENT : 417 423 // equal at DEPTH_MIN -> not speculative 418 // not include ]DEPTH_MIN:DEPTH_MAX [-> previous branch miss419 // include ]DEPTH_MIN:DEPTH_MAX [-> speculative424 // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss 425 // include ]DEPTH_MIN:DEPTH_MAX] -> speculative 420 426 421 427 // All case … … 428 434 429 435 Tcontrol_t is_valid = ((depth == depth_min) or 430 ((depth_min < depth_max)? 431 (depth<depth_max): 432 ((depth > depth_min) or (depth < depth_max)))); 433 436 depth_full or 437 ((depth_min <= depth_max)? 438 ((depth >= depth_min) and (depth <=depth_max)): 439 ((depth >= depth_min) or (depth <=depth_max)))); 440 441 log_printf(TRACE,Commit_unit,FUNCTION," * HEAD [%d]",i); 442 log_printf(TRACE,Commit_unit,FUNCTION," * is_valid : %d",is_valid); 443 log_printf(TRACE,Commit_unit,FUNCTION," * depth : %d",depth ); 444 log_printf(TRACE,Commit_unit,FUNCTION," * depth_min : %d",depth_min); 445 log_printf(TRACE,Commit_unit,FUNCTION," * depth_max : %d",depth_max); 446 434 447 //------------------------------------------------------ 435 448 // test if instruction is miss speculative … … 542 555 toString((*it)->state).c_str() , 543 556 (*it)->ptr ); 544 log_printf(TRACE,Commit_unit,FUNCTION," %.1d %. 5d %.6d, %.1d %.5d %.6d, %.1d %.5d %.6d, %.1d %.1d %.6d %.6d, %.1d %.1d %.6d %.6d ",557 log_printf(TRACE,Commit_unit,FUNCTION," %.1d %.2d %.6d, %.1d %.2d %.6d, %.1d %.1d %.6d, %.1d %.2d %.6d %.6d, %.1d %.1d %.6d %.6d ", 545 558 (*it)->read_ra , 546 559 (*it)->num_reg_ra_log , … … 562 575 563 576 log_printf(TRACE,Commit_unit,FUNCTION," %.2d %.2d %.1d %.1d %.8x", 577 (*it)->exception_use , 564 578 (*it)->exception , 565 (*it)->exception_use ,566 579 (*it)->flags , 567 580 (*it)->no_sequence , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_transition.cpp
r98 r101 86 86 { 87 87 entry->data = PORT_READ(in_SPR_RDATA [i]); 88 entry->write_rd = not PORT_READ(in_SPR_INVALID [i]); 88 // entry->write_rd = not PORT_READ(in_SPR_INVALID [i]); // in all case write value 89 89 } 90 90 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/src/Register_translation_unit_Glue_genMealy_insert.cpp
r98 r101 36 36 Tcontrol_t WRITE_RD = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_WRITE_RD [i]); 37 37 Tgeneral_address_t NUM_REG_RD_LOG = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_LOG [i]); 38 Tgeneral_address_t NUM_REG_RD_PHY_OLD = (NUM_REG_RD_LOG!=0)?PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_OLD [i]):0; 39 Tgeneral_address_t NUM_REG_RD_PHY_NEW = (NUM_REG_RD_LOG!=0)?PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_NEW [i]):0; 38 // Tgeneral_address_t NUM_REG_RD_PHY_OLD = (NUM_REG_RD_LOG!=0)?PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_OLD [i]):0; 39 // Tgeneral_address_t NUM_REG_RD_PHY_NEW = (NUM_REG_RD_LOG!=0)?PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_NEW [i]):0; 40 Tgeneral_address_t NUM_REG_RD_PHY_OLD = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_OLD [i]); 41 Tgeneral_address_t NUM_REG_RD_PHY_NEW = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_NEW [i]); 40 42 Tcontrol_t WRITE_RE = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_WRITE_RE [i]); 41 43 Tspecial_address_t NUM_REG_RE_LOG = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_LOG [i]); … … 43 45 Tspecial_address_t NUM_REG_RE_PHY_NEW = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_NEW [i]); 44 46 45 PORT_WRITE(out_INSERT_FREE_LIST_GPR_VAL [i], WRITE_RD and (NUM_REG_RD_LOG!=0)); 47 // PORT_WRITE(out_INSERT_FREE_LIST_GPR_VAL [i], WRITE_RD and (NUM_REG_RD_LOG!=0)); 48 PORT_WRITE(out_INSERT_FREE_LIST_GPR_VAL [i], WRITE_RD ); 46 49 PORT_WRITE(out_INSERT_FREE_LIST_SPR_VAL [i], WRITE_RE ); 47 50 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/SelfTest/src/test.cpp
r98 r101 167 167 ALLOC2_SC_SIGNAL( in_DEPTH_MIN ," in_DEPTH_MIN ",Tdepth_t ,_param->_nb_front_end,_param->_nb_context[it1]); 168 168 ALLOC2_SC_SIGNAL( in_DEPTH_MAX ," in_DEPTH_MAX ",Tdepth_t ,_param->_nb_front_end,_param->_nb_context[it1]); 169 ALLOC2_SC_SIGNAL( in_DEPTH_FULL ," in_DEPTH_FULL ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_context[it1]); 169 170 170 171 ALLOC2_SC_SIGNAL(out_SPR_SR_IEE ,"out_SPR_SR_IEE ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_context[it1]); … … 313 314 INSTANCE2_SC_SIGNAL(_OOO_Engine,out_NB_INST_COMMIT_MEM ,_param->_nb_front_end,_param->_nb_context[it1]); 314 315 315 for (uint32_t i=0; i<_param->_nb_front_end; i++) 316 for (uint32_t j=0; j<_param->_nb_context[i]; j++) 317 if (_param->_have_port_depth) 318 INSTANCE_SC_SIGNAL(_OOO_Engine, in_DEPTH_MIN [i][j]); 316 if (_param->_have_port_depth) 317 { 318 INSTANCE2_SC_SIGNAL(_OOO_Engine, in_DEPTH_MIN ,_param->_nb_front_end,_param->_nb_context[it1]); 319 319 INSTANCE2_SC_SIGNAL(_OOO_Engine, in_DEPTH_MAX ,_param->_nb_front_end,_param->_nb_context[it1]); 320 320 } 321 INSTANCE2_SC_SIGNAL(_OOO_Engine, in_DEPTH_FULL ,_param->_nb_front_end,_param->_nb_context[it1]); 321 322 INSTANCE2_SC_SIGNAL(_OOO_Engine,out_SPR_SR_IEE ,_param->_nb_front_end,_param->_nb_context[it1]); 322 323 INSTANCE2_SC_SIGNAL(_OOO_Engine,out_SPR_SR_EPH ,_param->_nb_front_end,_param->_nb_context[it1]); … … 482 483 DELETE2_SC_SIGNAL( in_DEPTH_MIN ,_param->_nb_front_end,_param->_nb_context[it1]); 483 484 DELETE2_SC_SIGNAL( in_DEPTH_MAX ,_param->_nb_front_end,_param->_nb_context[it1]); 485 DELETE2_SC_SIGNAL( in_DEPTH_FULL ,_param->_nb_front_end,_param->_nb_context[it1]); 484 486 DELETE2_SC_SIGNAL(out_SPR_SR_IEE ,_param->_nb_front_end,_param->_nb_context[it1]); 485 487 DELETE2_SC_SIGNAL(out_SPR_SR_EPH ,_param->_nb_front_end,_param->_nb_context[it1]); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/include/SPR.h
r98 r101 478 478 479 479 //---------------------------------------------------------- 480 // [0][19] CID481 //----------------------------------------------------------482 class CID : public GENERIC483 {484 public : CID (uint32_t num_front_end=0, uint32_t num_context=0,const Parameters * param=NULL) : GENERIC (num_front_end,num_context,param) {};485 };486 487 //----------------------------------------------------------488 480 // [0][20] FPCSR 489 481 //---------------------------------------------------------- … … 548 540 fpee = x >> 0; 549 541 }; 542 }; 543 544 //---------------------------------------------------------- 545 // [0][21] CID 546 //---------------------------------------------------------- 547 class CID : public GENERIC 548 { 549 public : CID (uint32_t num_front_end=0, uint32_t num_context=0,const Parameters * param=NULL) : GENERIC (num_front_end,num_context,param) {}; 550 }; 551 552 //---------------------------------------------------------- 553 // [0][22] TID 554 //---------------------------------------------------------- 555 class TID : public GENERIC 556 { 557 public : TID (uint32_t num_front_end=0, uint32_t num_context=0,const Parameters * param=NULL) : GENERIC (num_front_end,num_context,param) {}; 558 }; 559 560 //---------------------------------------------------------- 561 // [0][23] TSR 562 //---------------------------------------------------------- 563 class TSR : public GENERIC 564 { 565 public : TSR (uint32_t num_front_end=0, uint32_t num_context=0,const Parameters * param=NULL) : GENERIC (num_front_end,num_context,param) {}; 550 566 }; 551 567 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/src/Special_Register_unit_allocation.cpp
r98 r101 168 168 _spr [i][j][k][SPR_SR ] = new SR (i,j,_param); 169 169 _spr [i][j][k][SPR_PPC ] = new PPC (i,j,_param); 170 _spr [i][j][k][SPR_FPCSR ] = new FPCSR (i,j,_param); 170 171 _spr [i][j][k][SPR_CID ] = new CID (i,j,_param); 171 _spr [i][j][k][SPR_FPCSR ] = new FPCSR (i,j,_param); 172 _spr [i][j][k][SPR_TID ] = new TID (i,j,_param); 173 _spr [i][j][k][SPR_TSR ] = new TSR (i,j,_param); 172 174 _spr [i][j][k][SPR_EPCR ] = new EPCR (i,j,_param); 173 175 _spr [i][j][k][SPR_EEAR ] = new EEAR (i,j,_param); … … 197 199 case GROUP_TICK_TIMER : 198 200 case GROUP_FLOATING_POINT : 199 200 201 case GROUP_MAC : 201 202 case GROUP_RESERVED_1 : -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/OOO_Engine.h
r98 r101 197 197 public : SC_IN (Tdepth_t ) *** in_DEPTH_MIN ;//[nb_front_end][nb_context] 198 198 public : SC_IN (Tdepth_t ) *** in_DEPTH_MAX ;//[nb_front_end][nb_context] 199 public : SC_IN (Tcontrol_t ) *** in_DEPTH_FULL ;//[nb_front_end][nb_context] 199 200 200 201 // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_allocation.cpp
r98 r101 225 225 226 226 _ALLOC2_SIGNAL_IN ( in_DEPTH_MIN ,"MIN" ,Tdepth_t ,_param->_size_depth ,_param->_nb_front_end, _param->_nb_context[it1]); 227 _ALLOC2_SIGNAL_IN ( in_DEPTH_MAX ,"MAX" ,Tdepth_t ,_param->_size_depth+1 ,_param->_nb_front_end, _param->_nb_context[it1]); 227 _ALLOC2_SIGNAL_IN ( in_DEPTH_MAX ,"MAX" ,Tdepth_t ,_param->_size_depth ,_param->_nb_front_end, _param->_nb_context[it1]); 228 _ALLOC2_SIGNAL_IN ( in_DEPTH_FULL ,"FULL" ,Tcontrol_t ,1 ,_param->_nb_front_end, _param->_nb_context[it1]); 228 229 } 229 230 … … 990 991 991 992 if (_param->_have_port_depth) 993 { 992 994 PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MIN", 993 995 dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MIN"); 994 996 PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MAX", 995 997 dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_MAX"); 998 } 999 PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_"+toString(j)+"_FULL", 1000 dest, "in_DEPTH_"+toString(i)+"_"+toString(j)+"_FULL"); 996 1001 } 997 1002 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_deallocation.cpp
r98 r101 142 142 DELETE2_SIGNAL(out_NB_INST_COMMIT_MEM ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_nb_inst_commit ); 143 143 DELETE2_SIGNAL( in_DEPTH_MIN ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth ); 144 DELETE2_SIGNAL( in_DEPTH_MAX ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth+1 ); 144 DELETE2_SIGNAL( in_DEPTH_MAX ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth ); 145 DELETE2_SIGNAL( in_DEPTH_FULL ,_param->_nb_front_end,_param->_nb_context[it1],1 ); 145 146 DELETE2_SIGNAL(out_SPR_SR_IEE ,_param->_nb_front_end,_param->_nb_context[it1],1 ); 146 147 DELETE2_SIGNAL(out_SPR_SR_EPH ,_param->_nb_front_end,_param->_nb_context[it1],1 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Core_allocation.cpp
r98 r101 383 383 384 384 // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 385 // out_DEPTH_MIN - ooo_engine. in_DEPTH_MIN 386 // out_DEPTH_MAX - ooo_engine. in_DEPTH_MAX 385 // out_DEPTH_MIN - ooo_engine. in_DEPTH_MIN 386 // out_DEPTH_MAX - ooo_engine. in_DEPTH_MAX 387 // out_DEPTH_FULL - ooo_engine. in_DEPTH_FULL 387 388 388 389 // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 646 647 647 648 if (_param->_have_port_depth) 649 { 648 650 COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+"_"+toString(k)+"_MIN", 649 651 dest,"out_DEPTH_" +toString(k)+"_MIN"); 650 652 COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+"_"+toString(k)+"_MAX", 651 653 dest,"out_DEPTH_" +toString(k)+"_MAX"); 654 } 655 COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+"_"+toString(k)+"_FULL", 656 dest,"out_DEPTH_" +toString(k)+"_FULL"); 652 657 } 653 658 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters.cpp
r97 r101 495 495 _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_BNF ] |= (instruction_size_data(INSTRUCTION_L_BNF ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_BNF )._type][instruction_information(INSTRUCTION_L_BNF )._operation]._latence > 0); 496 496 _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CMOV ] |= (instruction_size_data(INSTRUCTION_L_CMOV ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_CMOV )._type][instruction_information(INSTRUCTION_L_CMOV )._operation]._latence > 0); 497 497 // _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CSYNC ] |= (instruction_size_data(INSTRUCTION_L_CSYNC ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_CSYNC )._type][instruction_information(INSTRUCTION_L_CSYNC )._operation]._latence > 0); 498 498 _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST1 ] |= (instruction_size_data(INSTRUCTION_L_CUST1 ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_CUST1 )._type][instruction_information(INSTRUCTION_L_CUST1 )._operation]._latence > 0); 499 499 _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CUST2 ] |= (instruction_size_data(INSTRUCTION_L_CUST2 ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_CUST2 )._type][instruction_information(INSTRUCTION_L_CUST2 )._operation]._latence > 0); … … 531 531 _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MOVHI ] |= (instruction_size_data(INSTRUCTION_L_MOVHI ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_MOVHI )._type][instruction_information(INSTRUCTION_L_MOVHI )._operation]._latence > 0); 532 532 _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MSB ] |= (instruction_size_data(INSTRUCTION_L_MSB ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_MSB )._type][instruction_information(INSTRUCTION_L_MSB )._operation]._latence > 0); 533 533 // _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MSYNC ] |= (instruction_size_data(INSTRUCTION_L_MSYNC ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_MSYNC )._type][instruction_information(INSTRUCTION_L_MSYNC )._operation]._latence > 0); 534 534 _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MTSPR ] |= (instruction_size_data(INSTRUCTION_L_MTSPR ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_MTSPR )._type][instruction_information(INSTRUCTION_L_MTSPR )._operation]._latence > 0); 535 535 _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MUL ] |= (instruction_size_data(INSTRUCTION_L_MUL ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_MUL )._type][instruction_information(INSTRUCTION_L_MUL )._operation]._latence > 0); … … 539 539 _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_OR ] |= (instruction_size_data(INSTRUCTION_L_OR ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_OR )._type][instruction_information(INSTRUCTION_L_OR )._operation]._latence > 0); 540 540 _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_ORI ] |= (instruction_size_data(INSTRUCTION_L_ORI ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_ORI )._type][instruction_information(INSTRUCTION_L_ORI )._operation]._latence > 0); 541 541 // _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_PSYNC ] |= (instruction_size_data(INSTRUCTION_L_PSYNC ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_PSYNC )._type][instruction_information(INSTRUCTION_L_PSYNC )._operation]._latence > 0); 542 542 _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_RFE ] |= (instruction_size_data(INSTRUCTION_L_RFE ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_RFE )._type][instruction_information(INSTRUCTION_L_RFE )._operation]._latence > 0); 543 543 _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_ROR ] |= (instruction_size_data(INSTRUCTION_L_ROR ) <= size_general_data) and (_timing[j][instruction_information(INSTRUCTION_L_ROR )._type][instruction_information(INSTRUCTION_L_ROR )._operation]._latence > 0); … … 728 728 _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SH ] |= (instruction_size_data(INSTRUCTION_L_SH ) <= size_general_data); 729 729 _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_SW ] |= (instruction_size_data(INSTRUCTION_L_SW ) <= size_general_data); 730 731 // _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_CSYNC ] = true; 732 _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_MSYNC ] = true; 733 _front_end_instruction_implemeted [num_front_end][num_context][INSTRUCTION_L_PSYNC ] = true; 730 734 } 731 735 736 // Reedit timing 737 { 738 multi_execute_loop::execute_loop::execute_timing_t timing_tmp [_nb_functionnal_unit][_nb_type][_nb_operation]; 739 740 for (uint32_t i=0; i<_nb_functionnal_unit; ++i) 741 for (uint32_t j=0; j<_nb_type; ++j) 742 for (uint32_t k=0; k<_nb_operation; ++k) 743 { 744 timing_tmp [i][j][k]._latence = _timing [i][j][k]._latence; 745 timing_tmp [i][j][k]._delay = _timing [i][j][k]._delay ; 746 747 // Reset 748 _timing [i][j][k]._latence = _timing [i][j][k]._delay = 0; 749 } 750 751 for (uint32_t i=0; i<_nb_thread; ++i) 752 { 753 uint32_t num_front_end = _link_context_with_thread [i].first; 754 uint32_t num_context = _link_context_with_thread [i].second; 755 756 for (uint32_t j=0; j<_nb_functionnal_unit; ++j) 757 { 758 // Test if link 759 if (not _link_thread_and_functionnal_unit[i][j]) 760 continue; 761 762 for (uint32_t k=0; k<NB_INSTRUCTION; ++k) 763 if (_front_end_instruction_implemeted [num_front_end][num_context][k]) 764 { 765 uint32_t x = instruction_information(k)._type; 766 uint32_t y = instruction_information(k)._operation; 767 768 _timing[j][x][y]._latence = timing_tmp[j][x][y]._latence; 769 _timing[j][x][y]._delay = timing_tmp[j][x][y]._delay ; 770 } 771 } 772 } 773 } 774 732 775 ALLOC1(_front_end_nb_inst_branch_complete ,uint32_t ,_nb_front_end); 733 776 ALLOC2(_front_end_size_decod_queue ,uint32_t ,_nb_front_end,_nb_decod_unit[it1]); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/config_min.cfg
r100 r101 3 3 1 1 *2 #_size_data 4 4 0 1 +1 #_nb_port_slot 5 0 0 +1 #_have_port_write 6 0 0 +1 #_have_port_read -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/config_size_queue_log2.cfg
r100 r101 3 3 32 32 *2 #_size_data 4 4 0 0 *2 #_nb_port_slot 5 1 1 +1 #_have_port_write 6 1 1 +1 #_have_port_read -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/config_size_queue_no_log2.cfg
r100 r101 3 3 32 32 *2 #_size_data 4 4 0 0 *2 #_nb_port_slot 5 1 1 +1 #_have_port_write 6 1 1 +1 #_have_port_read -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/config_slot_out_size_queue_log2.cfg
r100 r101 3 3 32 32 *2 #_size_data 4 4 1 8 *2 #_nb_port_slot 5 1 1 +1 #_have_port_write 6 1 1 +1 #_have_port_read -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/config_slot_out_size_queue_no_log2.cfg
r100 r101 3 3 32 32 *2 #_size_data 4 4 1 8 *2 #_nb_port_slot 5 1 1 +1 #_have_port_write 6 1 1 +1 #_have_port_read -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/main.cpp
r100 r101 8 8 #include "Behavioural/Generic/Queue/SelfTest/include/test.h" 9 9 10 #define NB_PARAMS 310 #define NB_PARAMS 5 11 11 12 12 void usage (int argc, char * argv[]) … … 14 14 cerr << "<Usage> " << argv[0] << " name_instance list_params" << endl 15 15 << "list_params is :" << endl 16 << " - size_queue (uint32_t)" << endl 17 << " - size_data (uint32_t)" << endl 18 << " - nb_port_slot (uint32_t)" << endl 16 << " - size_queue (uint32_t)" << endl 17 << " - size_data (uint32_t)" << endl 18 << " - nb_port_slot (uint32_t)" << endl 19 << " - have_port_write (bool )" << endl 20 << " - have_port_read (bool )" << endl 19 21 << "" << endl; 20 22 … … 37 39 uint32_t x = 1; 38 40 39 const string name = argv[x++]; 40 const uint32_t size_queue = atoi(argv[x++]); 41 const uint32_t size_data = atoi(argv[x++]); 42 const uint32_t nb_port_slot = atoi(argv[x++]); 43 41 const string name = argv[x++]; 42 const uint32_t size_queue = fromString<uint32_t>(argv[x++]); 43 const uint32_t size_data = fromString<uint32_t>(argv[x++]); 44 const uint32_t nb_port_slot = fromString<uint32_t>(argv[x++]); 45 const bool have_port_write = fromString<bool>(argv[x++]); 46 const bool have_port_read = fromString<bool>(argv[x++]); 44 47 try 45 48 { … … 47 50 (size_queue, 48 51 size_data , 49 nb_port_slot 52 nb_port_slot, 53 have_port_write, 54 have_port_read 50 55 ); 51 56 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/test.cpp
r100 r101 58 58 ALLOC1_SC_SIGNAL(out_SLOT_VAL ,"out_SLOT_VAL" ,Tcontrol_t,_param->_nb_port_slot); 59 59 ALLOC1_SC_SIGNAL(out_SLOT_DATA ,"out_SLOT_DATA" ,Tdata_t ,_param->_nb_port_slot); 60 ALLOC0_SC_SIGNAL(out_PTR_WRITE ,"out_PTR_WRITE" ,Tptr_t ); 61 ALLOC0_SC_SIGNAL(out_PTR_READ ,"out_PTR_READ" ,Tptr_t ); 60 62 61 63 /******************************************************** … … 76 78 INSTANCE1_SC_SIGNAL(_Queue,out_SLOT_VAL ,_param->_nb_port_slot); 77 79 INSTANCE1_SC_SIGNAL(_Queue,out_SLOT_DATA ,_param->_nb_port_slot); 80 if (_param->_have_port_ptr_write) 81 INSTANCE0_SC_SIGNAL(_Queue,out_PTR_WRITE ); 82 if (_param->_have_port_ptr_read ) 83 INSTANCE0_SC_SIGNAL(_Queue,out_PTR_READ ); 78 84 79 85 cout << "<" << name << "> Start Simulation ............" << endl; … … 168 174 DELETE1_SC_SIGNAL(out_SLOT_VAL ,_param->_nb_port_slot); 169 175 DELETE1_SC_SIGNAL(out_SLOT_DATA ,_param->_nb_port_slot); 170 176 DELETE0_SC_SIGNAL(out_PTR_WRITE ); 177 DELETE0_SC_SIGNAL(out_PTR_READ ); 171 178 #endif 172 179 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/include/Parameters.h
r100 r101 22 22 { 23 23 //-----[ fields ]------------------------------------------------------------ 24 public : const uint32_t _size_queue ; 25 public : const uint32_t _size_data ; 26 public : const uint32_t _nb_port_slot; 24 public : const uint32_t _size_queue ; 25 public : const uint32_t _size_data ; 26 public : const uint32_t _nb_port_slot ; 27 public : const bool _have_port_ptr_write; 28 public : const bool _have_port_ptr_read ; 29 30 public : const uint32_t _size_ptr ; 31 public : const bool _have_port_ptr ; 27 32 28 33 //-----[ methods ]----------------------------------------------------------- 29 public : Parameters (uint32_t size_queue, 30 uint32_t size_data , 31 uint32_t nb_port_slot); 34 public : Parameters (uint32_t size_queue , 35 uint32_t size_data , 36 uint32_t nb_port_slot , 37 bool have_port_ptr_write, 38 bool have_port_ptr_read ); 32 39 33 40 // public : Parameters (Parameters & param) ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/include/Queue.h
r100 r101 78 78 public : SC_OUT(Tdata_t ) ** out_SLOT_DATA; 79 79 80 // ~~~~~[ Interface "ptr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 81 public : SC_OUT(Tptr_t ) * out_PTR_WRITE; 82 public : SC_OUT(Tptr_t ) * out_PTR_READ ; 83 80 84 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 81 85 protected : morpheo::behavioural::generic::queue_control::Queue_Control * _queue_control; … … 87 91 protected : Tcontrol_t internal_INSERT_ACK; 88 92 protected : Tcontrol_t internal_RETIRE_VAL; 89 90 93 #endif 91 94 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Parameters.cpp
r100 r101 7 7 8 8 #include "Behavioural/Generic/Queue/include/Parameters.h" 9 9 #include "Common/include/Log2.h" 10 10 namespace morpheo { 11 11 namespace behavioural { … … 16 16 #undef FUNCTION 17 17 #define FUNCTION "Queue::Parameters" 18 Parameters::Parameters (uint32_t size_queue, 19 uint32_t size_data , 20 uint32_t nb_port_slot): 21 _size_queue (size_queue), 22 _size_data (size_data ), 23 _nb_port_slot (nb_port_slot) 18 Parameters::Parameters (uint32_t size_queue , 19 uint32_t size_data , 20 uint32_t nb_port_slot , 21 bool have_port_ptr_write, 22 bool have_port_ptr_read ): 23 _size_queue (size_queue), 24 _size_data (size_data ), 25 _nb_port_slot (nb_port_slot), 26 _have_port_ptr_write (have_port_ptr_write and (log2(size_queue)>0)), 27 _have_port_ptr_read (have_port_ptr_read and (log2(size_queue)>0)), 28 _size_ptr (log2(size_queue)), 29 _have_port_ptr (have_port_ptr_write or have_port_ptr_read) 24 30 { 25 31 log_printf(FUNC,Queue,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_allocation.cpp
r100 r101 72 72 ALLOC1_SIGNAL_OUT(out_SLOT_DATA ,"data",Tdata_t,_param->_size_data); 73 73 } 74 75 // ~~~~~[ Interface "ptr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 76 if (_param->_have_port_ptr) 77 { 78 ALLOC0_INTERFACE("ptr", OUT, EAST, _("Internal pointer.")); 79 80 if (_param->_have_port_ptr_write) 81 ALLOC0_SIGNAL_OUT(out_PTR_WRITE ,"write",Tptr_t,_param->_size_ptr); 82 if (_param->_have_port_ptr_read ) 83 ALLOC0_SIGNAL_OUT(out_PTR_READ ,"read" ,Tptr_t,_param->_size_ptr); 84 } 74 85 75 86 if (usage_is_set(_usage,USE_SYSTEMC)) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_deallocation.cpp
r100 r101 36 36 DELETE1_SIGNAL(out_SLOT_VAL ,_param->_nb_port_slot,1); 37 37 DELETE1_SIGNAL(out_SLOT_DATA ,_param->_nb_port_slot,_param->_size_data); 38 39 if (_param->_have_port_ptr_write) 40 DELETE0_SIGNAL(out_PTR_WRITE ,_param->_size_ptr); 41 if (_param->_have_port_ptr_read ) 42 DELETE0_SIGNAL(out_PTR_READ ,_param->_size_ptr); 38 43 39 44 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_genMoore.cpp
r100 r101 20 20 log_printf(FUNC,Queue,FUNCTION,"Begin"); 21 21 22 //--------------------------------------------- 22 23 // Output 24 //--------------------------------------------- 23 25 internal_INSERT_ACK = not _queue_control->full(); 24 26 internal_RETIRE_VAL = not _queue_control->empty(); … … 28 30 PORT_WRITE(out_RETIRE_DATA,_queue_data[(*_queue_control)[0]]); 29 31 32 //--------------------------------------------- 30 33 // Slot 34 //--------------------------------------------- 31 35 // Note : Slot 0 is the same slot as retire interface. 32 36 uint32_t nb_elt = _queue_control->nb_elt(); … … 37 41 PORT_WRITE(out_SLOT_DATA [i],_queue_data[(*_queue_control)[i]]); 38 42 } 43 44 //--------------------------------------------- 45 // Pointer 46 //--------------------------------------------- 47 if (_param->_have_port_ptr_write) 48 PORT_WRITE(out_PTR_WRITE, _queue_control->ptr_push()); 49 if (_param->_have_port_ptr_read ) 50 PORT_WRITE(out_PTR_READ , _queue_control->ptr_pop ()); 39 51 40 52 log_printf(FUNC,Queue,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_vhdl_body.cpp
r100 r101 62 62 else 63 63 vhdl->set_body (0,"out_SLOT_"+toString(i)+"_DATA <= reg_DATA(conv_integer(0));"); 64 } 65 66 if (_param->_have_port_ptr) 67 { 68 vhdl->set_body (0,""); 69 vhdl->set_comment(0,"---------------------------------------------------------------------------"); 70 vhdl->set_comment(0," Slot"); 71 vhdl->set_comment(0,"---------------------------------------------------------------------------"); 72 vhdl->set_body (0,""); 73 if (_param->_have_port_ptr_write) 74 vhdl->set_body (0,"out_PTR_WRITE <= signal_PTR_WRITE;"); 75 if (_param->_have_port_ptr_read) 76 vhdl->set_body (0,"out_PTR_READ <= signal_PTR_READ;"); 64 77 } 65 78 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue_Control/include/Queue_Control.h
r81 r101 35 35 public : void clear (void); 36 36 37 public : uint32_t ptr_pop (uint32_t index=0); 38 public : uint32_t ptr_push (void); 39 40 37 41 public : uint32_t push (void); 38 42 public : uint32_t push_ovf (void); 39 public : void pop (uint32_t );43 public : void pop (uint32_t index); 40 44 public : void pop (void); 41 public : void pop_ovf (uint32_t );45 public : void pop_ovf (uint32_t index); 42 46 public : void pop_ovf (void); 43 47 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h
r88 r101 21 21 class Parameters : public morpheo::behavioural::Parameters 22 22 { 23 public : const uint32_t _nb_port_read ; 24 public : const uint32_t _nb_port_write; 25 public : const uint32_t _nb_port_read_write; 26 public : const uint32_t _nb_word ; 27 public : const uint32_t _size_word ; 28 public : const uint32_t _size_address ; 29 public : const bool _have_port_address; 23 public : const uint32_t _nb_port_read ; 24 public : const uint32_t _nb_port_write; 25 public : const uint32_t _nb_port_read_write; 26 public : const uint32_t _nb_word ; 27 public : const uint32_t _size_word ; 28 public : const uint32_t _size_address ; 29 public : const bool _have_port_address; 30 public : const bool _have_init_value; 31 public : const std::string _init_value; 30 32 31 public : Parameters (uint32_t nb_port_read , 32 uint32_t nb_port_write, 33 uint32_t nb_port_read_write, 34 uint32_t nb_word , 35 uint32_t size_word ); 33 public : Parameters (uint32_t nb_port_read , 34 uint32_t nb_port_write, 35 uint32_t nb_port_read_write, 36 uint32_t nb_word , 37 uint32_t size_word , 38 std::string init_value=""); 36 39 // public : Parameters (Parameters & param) ; 37 40 public : ~Parameters () ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/Parameters.cpp
r88 r101 14 14 namespace registerfile_monolithic { 15 15 16 Parameters::Parameters (uint32_t nb_port_read , 17 uint32_t nb_port_write, 18 uint32_t nb_port_read_write , 19 uint32_t nb_word , 20 uint32_t size_word 16 Parameters::Parameters (uint32_t nb_port_read , 17 uint32_t nb_port_write, 18 uint32_t nb_port_read_write , 19 uint32_t nb_word , 20 uint32_t size_word , 21 std::string init_value 21 22 ) : 22 23 _nb_port_read (nb_port_read ), … … 26 27 _size_word (size_word ), 27 28 _size_address (static_cast<uint32_t>(log2(_nb_word))), 28 _have_port_address (_size_address != 0) 29 29 _have_port_address (_size_address != 0), 30 _have_init_value (init_value != ""), 31 _init_value (init_value) 30 32 { 31 33 test(); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/Parameters_msg_error.cpp
r81 r101 33 33 test.error("you need a write port"); 34 34 35 // Need test init_value 36 35 37 return test; 36 38 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp
r88 r101 18 18 log_printf(FUNC,RegisterFile,"transition","Begin"); 19 19 20 for (uint32_t i=0; i<_param->_nb_port_write; i++)20 if (_param->_have_init_value and (PORT_READ(in_NRESET) == 0)) 21 21 { 22 // Have a write? 23 if ( PORT_READ(in_WRITE_VAL[i]) == true) 24 { 22 for (uint32_t i=0; i<_param->_nb_word; ++i) 23 reg_DATA[i] = fromString<Tdata_t>(_param->_init_value); 24 } 25 else 26 { 27 for (uint32_t i=0; i<_param->_nb_port_write; i++) 28 { 29 // Have a write? 30 if ( PORT_READ(in_WRITE_VAL[i]) == true) 31 { 25 32 #ifdef STATISTICS 26 if (usage_is_set(_usage,USE_STATISTICS)) 27 (*_stat_nb_write) ++; 28 #endif 29 30 Taddress_t address; 31 if (_param->_have_port_address) 32 address = PORT_READ(in_WRITE_ADDRESS[i]); 33 else 34 address = 0; 35 36 Tdata_t data = PORT_READ(in_WRITE_DATA [i]); 37 38 log_printf(TRACE,RegisterFile,"transition","[%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data)); 39 40 // Write in registerFile 41 reg_DATA[address] = data; 42 } 43 } 44 for (uint32_t i=0; i<_param->_nb_port_read_write; i++) 45 { 46 // Have a read_write? 47 if (PORT_READ(in_READ_WRITE_VAL[i]) == true) 48 { 49 if (PORT_READ(in_READ_WRITE_RW [i]) == RW_WRITE) 50 { 51 #ifdef STATISTICS 52 if (usage_is_set(_usage,USE_STATISTICS)) 33 if (usage_is_set(_usage,USE_STATISTICS)) 53 34 (*_stat_nb_write) ++; 54 35 #endif 55 56 Taddress_t address; 57 if (_param->_have_port_address) 58 address = PORT_READ(in_READ_WRITE_ADDRESS[i]); 59 else 60 address = 0; 61 Tdata_t data = PORT_READ(in_READ_WRITE_WDATA [i]); 62 63 log_printf(TRACE,RegisterFile,"transition","[%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data)); 64 65 // Write in registerFile 66 reg_DATA[address] = data; 67 } 36 37 Taddress_t address = (_param->_have_port_address)?PORT_READ(in_WRITE_ADDRESS[i]):0; 38 Tdata_t data = PORT_READ(in_WRITE_DATA [i]); 39 40 log_printf(TRACE,RegisterFile,"transition","[%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data)); 41 42 // Write in registerFile 43 reg_DATA[address] = data; 44 } 45 } 46 for (uint32_t i=0; i<_param->_nb_port_read_write; i++) 47 { 48 // Have a read_write? 49 if (PORT_READ(in_READ_WRITE_VAL[i]) == true) 50 { 51 if (PORT_READ(in_READ_WRITE_RW [i]) == RW_WRITE) 52 { 68 53 #ifdef STATISTICS 69 else 70 { 71 if (usage_is_set(_usage,USE_STATISTICS)) 72 (*_stat_nb_read) ++; 73 } 54 if (usage_is_set(_usage,USE_STATISTICS)) 55 (*_stat_nb_write) ++; 74 56 #endif 75 } 57 58 Taddress_t address = (_param->_have_port_address)?PORT_READ(in_READ_WRITE_ADDRESS[i]):0; 59 Tdata_t data = PORT_READ(in_READ_WRITE_WDATA [i]); 60 61 log_printf(TRACE,RegisterFile,"transition","[%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data)); 62 63 // Write in registerFile 64 reg_DATA[address] = data; 65 } 66 #ifdef STATISTICS 67 else 68 { 69 if (usage_is_set(_usage,USE_STATISTICS)) 70 (*_stat_nb_read) ++; 71 } 72 #endif 73 } 74 } 76 75 } 77 76 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_body.cpp
r94 r101 65 65 vhdl->set_body (0,"begin -- process RegisterFile_write"); 66 66 vhdl->set_body (1,"if in_CLOCK'event and in_CLOCK = '1' then"); 67 68 if (_param->_have_init_value) 69 { 70 vhdl->set_body (2,"if in_NRESET = '0' then"); 71 72 std::string init_value = ((_param->_size_word>1)?"\"":"'")+_param->_init_value+((_param->_size_word>1)?"\"":"'"); 73 74 for (uint32_t i=0; i<_param->_nb_word; ++i) 75 vhdl->set_body (3,"reg_DATA("+toString(i)+") <= "+init_value+";"); 76 77 vhdl->set_body (2,"else"); 78 } 67 79 68 80 for (uint32_t i = 0; i < _param->_nb_port_write; i++) … … 92 104 93 105 vhdl->set_body (1,"end if;"); 106 107 if (_param->_have_init_value) 108 vhdl->set_body (1,"end if;"); 109 94 110 vhdl->set_body (0,"end process RegisterFile_write;"); 95 111 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Constants.h
r100 r101 14 14 15 15 I Use reserved SPR : 16 [0][19] - SPR_CID 16 [0][21] - SPR_CID : Context Id 17 [0][22] - SPR_TID : Thread Id 18 [0][23] - SPR_TSR : Thread Status Register (Priority) 17 19 */ 18 20 … … 216 218 # define OPERATION_SPECIAL_L_MACRC 0x12 // 001_0010 l.macrc 217 219 # define OPERATION_SPECIAL_L_MSB 0x14 // 001_0100 l.msb 218 #define OPERATION_SPECIAL_L_MSYNC 0x21 // 010_0001 l.msync219 #define OPERATION_SPECIAL_L_PSYNC 0x22 // 010_0010 l.psync220 #define OPERATION_SPECIAL_L_CSYNC 0x24 // 010_0100 l.csync220 //#define OPERATION_SPECIAL_L_MSYNC 0x21 // 010_0001 l.msync 221 //#define OPERATION_SPECIAL_L_PSYNC 0x22 // 010_0010 l.psync 222 //#define OPERATION_SPECIAL_L_CSYNC 0x24 // 010_0100 l.csync 221 223 # define OPERATION_SPECIAL_L_SYS 0x41 // 100_0001 l.sys 222 224 # define OPERATION_SPECIAL_L_TRAP 0x42 // 100_0010 l.trap … … 542 544 # define SPR_SR 17 // Supervision register 543 545 # define SPR_PPC 18 // PC mapped to SPR space (previous PC) 544 # define SPR_CID 19 // Context Id545 546 # define SPR_FPCSR 20 // FP Control Status register 547 # define SPR_CID 21 // Context Id 548 # define SPR_TID 22 // Thread Id 549 # define SPR_TSR 23 // Thread Priority 546 550 # define SPR_EPCR 32 // Exception PC register 547 551 # define SPR_EEAR 48 // Exception EA register -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h
r100 r101 10 10 #define MORPHEO_MAJOR_VERSION 0 11 11 #define MORPHEO_MINOR_VERSION 2 12 #define MORPHEO_REVISION "10 0"12 #define MORPHEO_REVISION "101" 13 13 #define MORPHEO_CODENAME "Castor" 14 14 15 #define MORPHEO_DATE_DAY " 08"15 #define MORPHEO_DATE_DAY "15" 16 16 #define MORPHEO_DATE_MONTH "01" 17 17 #define MORPHEO_DATE_YEAR "2009" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Types.cpp
r100 r101 27 27 case INSTRUCTION_L_BNF : return instruction_t (TYPE_BRANCH ,OPERATION_BRANCH_L_TEST_NF ,ORBIS32,1); 28 28 case INSTRUCTION_L_CMOV : return instruction_t (TYPE_MOVE ,OPERATION_MOVE_L_CMOV ,ORBIS32,2); 29 case INSTRUCTION_L_CSYNC : return instruction_t (TYPE_SPECIAL,OPERATION_SPECIAL_L_CSYNC ,ORBIS32,2); 29 // case INSTRUCTION_L_CSYNC : return instruction_t (TYPE_SPECIAL,OPERATION_SPECIAL_L_CSYNC ,ORBIS32,2); 30 case INSTRUCTION_L_CSYNC : return instruction_t (TYPE_MEMORY ,OPERATION_MEMORY_SYNCHRONIZATION,ORBIS32,2); 30 31 case INSTRUCTION_L_CUST1 : return instruction_t (TYPE_CUSTOM ,OPERATION_CUSTOM_L_1 ,ORBIS32,2); 31 32 case INSTRUCTION_L_CUST2 : return instruction_t (TYPE_CUSTOM ,OPERATION_CUSTOM_L_2 ,ORBIS32,2); … … 63 64 case INSTRUCTION_L_MOVHI : return instruction_t (TYPE_MOVE ,OPERATION_MOVE_L_MOVHI ,ORBIS32,1); 64 65 case INSTRUCTION_L_MSB : return instruction_t (TYPE_SPECIAL,OPERATION_SPECIAL_L_MSB ,ORBIS32,2); 65 case INSTRUCTION_L_MSYNC : return instruction_t (TYPE_SPECIAL,OPERATION_SPECIAL_L_MSYNC ,ORBIS32,2); 66 // case INSTRUCTION_L_MSYNC : return instruction_t (TYPE_SPECIAL,OPERATION_SPECIAL_L_MSYNC ,ORBIS32,2); 67 case INSTRUCTION_L_MSYNC : return instruction_t (TYPE_MEMORY ,OPERATION_MEMORY_SYNCHRONIZATION,ORBIS32,2); 66 68 case INSTRUCTION_L_MTSPR : return instruction_t (TYPE_SPECIAL,OPERATION_SPECIAL_L_MTSPR ,ORBIS32,1); 67 69 case INSTRUCTION_L_MUL : return instruction_t (TYPE_MUL ,OPERATION_MUL_L_MUL ,ORBIS32,1); … … 71 73 case INSTRUCTION_L_OR : return instruction_t (TYPE_ALU ,OPERATION_ALU_L_OR ,ORBIS32,1); 72 74 case INSTRUCTION_L_ORI : return instruction_t (TYPE_ALU ,OPERATION_ALU_L_OR ,ORBIS32,1); 73 case INSTRUCTION_L_PSYNC : return instruction_t (TYPE_SPECIAL,OPERATION_SPECIAL_L_PSYNC ,ORBIS32,2); 75 // case INSTRUCTION_L_PSYNC : return instruction_t (TYPE_SPECIAL,OPERATION_SPECIAL_L_PSYNC ,ORBIS32,2); 76 case INSTRUCTION_L_PSYNC : return instruction_t (TYPE_MEMORY ,OPERATION_MEMORY_SYNCHRONIZATION,ORBIS32,2); 74 77 case INSTRUCTION_L_RFE : return instruction_t (TYPE_SPECIAL,OPERATION_SPECIAL_L_RFE ,ORBIS32,1); 75 78 case INSTRUCTION_L_ROR : return instruction_t (TYPE_SHIFT ,OPERATION_SHIFT_L_ROR ,ORBIS32,2); -
trunk/IPs/systemC/processor/Morpheo/Files/Morpheo.gen
r100 r101 73 73 <parameter name="btb_associativity" min="1" max="8" step="* 2" default="1" level="..." description="..." /> 74 74 <parameter name="btb_size_counter" min="2" max="8" step="* 2" default="2" level="..." description="..." /> 75 <parameter name="btb_victim_scheme" min=" 1" max="8" step="+ 1" default="1" level="..." description="..." />76 <parameter name="dir_predictor_scheme" min=" 1" max="8" step="* 2" default="1" level="..." description="..." />75 <parameter name="btb_victim_scheme" min="0" max="5" step="+ 1" default="1" level="..." description="0 : Random, 1 : Round Robin, 2 : Not Last Used, 3 : Pseudo LRU, 4 : Least Recently Used, 5 : FIFO" /> 76 <parameter name="dir_predictor_scheme" min="0" max="8" step="+ 1" default="1" level="..." description="0 : Never take, 1 : Always Take, 2 : Static, 3 : Last Take, 4 : Counter, 5 : Local predictor, 6 : Global predictor, 7 : Meta predictor, 8 : Custom predictor" /> 77 77 <parameter name="dir_have_bht" min="1" max="8" step="* 2" default="1" level="..." description="..." /> 78 78 <parameter name="dir_bht_size_shifter" min="1" max="8" step="* 2" default="1" level="..." description="..." /> -
trunk/IPs/systemC/processor/Morpheo/Files/Morpheo.sim
r100 r101 15 15 <parameter name="statistics_period" value="0" /> 16 16 17 <parameter name="simulation_nb_cycle" value="100 00" />17 <parameter name="simulation_nb_cycle" value="100" /> 18 18 <parameter name="simulation_nb_instruction" value="0" /> 19 19 … … 23 23 <parameter name="directory_log" value="." /> 24 24 25 <parameter name="debug_level" value=" 0" />25 <parameter name="debug_level" value="3" /> 26 26 <parameter name="debug_cycle_start" value="0" /> 27 <parameter name="debug_cycle_stop" value=" 400" />27 <parameter name="debug_cycle_stop" value="300" /> 28 28 <parameter name="debug_have_log_file" value="0" /> 29 29 -
trunk/IPs/systemC/shared/mapping_memory.h
r98 r101 3 3 4 4 # define TEXT_BASE 0x00000000 5 # define TEXT_SIZE 0x0 00020005 # define TEXT_SIZE 0x01000000 6 6 7 7 # define DATA_CACHED_BASE 0x10000000 8 # define DATA_CACHED_SIZE 0x 000010008 # define DATA_CACHED_SIZE 0x10000000 9 9 10 # define DATA_UNCACHED_BASE 0x40000000 11 # define DATA_UNCACHED_SIZE 0x00001000 10 # define DATA_STACK_BASE 0x40000000 11 # define DATA_STACK_SIZE 0x02000000 12 13 # define DATA_UNCACHED_BASE 0x80000000 14 # define DATA_UNCACHED_SIZE 0x01000000 12 15 13 16 # define TTY_BASE 0xa0000000
Note: See TracChangeset
for help on using the changeset viewer.