Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit
- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit
- Files:
-
- 1 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/src/Operation.cpp
r81 r88 8 8 9 9 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/include/Operation.h" 10 11 #define neg(data) (~(data)+1) 12 #define sign(data) ((data)>>(param->_size_data-1)) 13 #define unsigned(data) (data) 14 #define signed(data) ((sign(data)==0)?(data):neg(data)) 15 #define ovf(op1, op2, res) ((sign(op1) == sign(op2))?(sign(op1) xor sign(res)):0) 16 #define carry(op1, op2, res) (((res)<(op1)) or ((res)<(op2))) 17 #define set_flag(data,flag,is_set) (((is_set)==1)?((data)|(flag)):((data)&~(flag))) 18 #define get_flag(data,flag) (((data)&(flag))!=0) 19 #define concatenation_bool(a,b) (((a)<<1) | (b)) 10 #include "Behavioural/include/Operation.h" 20 11 21 12 namespace morpheo { … … 43 34 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_add"); 44 35 45 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);46 Tgeneral_data_t gpr2 = unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb);36 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 37 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 47 38 48 39 Tgeneral_data_t gpr3 = param->_mask_data & (gpr1 + gpr2); 49 40 50 bool overflow = ovf ( gpr1,gpr2,gpr3);51 bool carry_out = carry( gpr1,gpr2,gpr3);41 bool overflow = ovf (param->_size_data,gpr1,gpr2,gpr3); 42 bool carry_out = carry(param->_size_data,gpr1,gpr2,gpr3); 52 43 53 44 // Result … … 70 61 Tgeneral_data_t carry_in = get_flag(op->_data_rc,FLAG_CY); 71 62 72 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);73 Tgeneral_data_t gpr2 = unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb);63 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 64 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 74 65 Tgeneral_data_t gpr3 = param->_mask_data & (gpr1 + gpr2 + carry_in); 75 66 76 bool overflow = ovf ( gpr1,gpr2,gpr3);77 bool carry_out = carry( gpr1,gpr2,gpr3);67 bool overflow = ovf (param->_size_data,gpr1,gpr2,gpr3); 68 bool carry_out = carry(param->_size_data,gpr1,gpr2,gpr3); 78 69 79 70 // Result … … 94 85 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sub"); 95 86 96 Tgeneral_data_t gpr1 = unsigned(op->_data_ra);97 Tgeneral_data_t gpr2 = neg( unsigned(op->_data_rb));87 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 88 Tgeneral_data_t gpr2 = neg(param->_size_data,unsigned(param->_size_data,op->_data_rb)); 98 89 Tgeneral_data_t gpr3 = param->_mask_data & (gpr1 + gpr2); 99 90 100 bool overflow = ovf ( gpr1,gpr2,gpr3);101 bool carry_out = carry( gpr1,gpr2,gpr3);91 bool overflow = ovf (param->_size_data,gpr1,gpr2,gpr3); 92 bool carry_out = carry(param->_size_data,gpr1,gpr2,gpr3); 102 93 103 94 // Result … … 118 109 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_and"); 119 110 120 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);121 Tgeneral_data_t gpr2 = unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb);111 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 112 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 122 113 Tgeneral_data_t gpr3 = (gpr1 & gpr2); 123 114 … … 137 128 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_or"); 138 129 139 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);140 Tgeneral_data_t gpr2 = unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb);130 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 131 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 141 132 Tgeneral_data_t gpr3 = (gpr1 | gpr2); 142 133 … … 156 147 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_xor"); 157 148 158 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);159 Tgeneral_data_t gpr2 = unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb);149 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 150 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 160 151 Tgeneral_data_t gpr3 = (gpr1 ^ gpr2); 161 152 … … 175 166 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_movhi"); 176 167 177 Tgeneral_data_t gpr1 = unsigned( op->_immediat);168 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_immediat); 178 169 Tgeneral_data_t gpr2 = param->_mask_data & (gpr1<<16); 179 170 … … 195 186 Tgeneral_data_t f_in = get_flag(op->_data_rc,FLAG_F); 196 187 197 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);198 Tgeneral_data_t gpr2 = unsigned( op->_data_rb);188 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 189 Tgeneral_data_t gpr2 = unsigned(param->_size_data,op->_data_rb); 199 190 Tgeneral_data_t gpr3 = ((f_in==0)?gpr2:gpr1); 200 191 … … 215 206 216 207 Tgeneral_data_t f_in = get_flag(op->_data_rc,FLAG_F); 217 Tgeneral_data_t imm = unsigned( op->_immediat);208 Tgeneral_data_t imm = unsigned(param->_size_data,op->_immediat); 218 209 219 210 // Result … … 233 224 234 225 Tgeneral_data_t f_in = get_flag(op->_data_rc,FLAG_F); 235 Tgeneral_data_t imm = unsigned( op->_immediat);226 Tgeneral_data_t imm = unsigned(param->_size_data,op->_immediat); 236 227 237 228 // Result … … 254 245 255 246 256 Tgeneral_data_t gpr = unsigned( op->_data_rb);257 Tgeneral_data_t imm = unsigned( op->_immediat);247 Tgeneral_data_t gpr = unsigned(param->_size_data,op->_data_rb); 248 Tgeneral_data_t imm = unsigned(param->_size_data,op->_immediat); 258 249 259 250 // Result … … 272 263 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_extend_s"); 273 264 274 Tgeneral_data_t imm = unsigned( op->_immediat);275 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);265 Tgeneral_data_t imm = unsigned(param->_size_data,op->_immediat); 266 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 276 267 Tgeneral_data_t gpr2 = extend<Tgeneral_data_t>(param->_size_data, gpr1, true , imm); 277 268 … … 291 282 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_extend_z"); 292 283 293 Tgeneral_data_t imm = unsigned( op->_immediat);294 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);284 Tgeneral_data_t imm = unsigned(param->_size_data,op->_immediat); 285 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 295 286 Tgeneral_data_t gpr2 = extend<Tgeneral_data_t>(param->_size_data, gpr1, false , imm); 296 287 … … 310 301 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sll"); 311 302 312 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);313 Tgeneral_data_t gpr2 = param->_mask_shift & unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb);303 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 304 Tgeneral_data_t gpr2 = param->_mask_shift & unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 314 305 Tgeneral_data_t gpr3 = shift_logic_left<Tgeneral_data_t>(param->_size_data, gpr1, gpr2); 315 306 … … 329 320 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_srl"); 330 321 331 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);332 Tgeneral_data_t gpr2 = param->_mask_shift & unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb);322 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 323 Tgeneral_data_t gpr2 = param->_mask_shift & unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 333 324 Tgeneral_data_t gpr3 = shift_logic_right<Tgeneral_data_t>(param->_size_data, gpr1, gpr2); 334 325 … … 348 339 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sra"); 349 340 350 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);351 Tgeneral_data_t gpr2 = param->_mask_shift & unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb);341 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 342 Tgeneral_data_t gpr2 = param->_mask_shift & unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 352 343 Tgeneral_data_t gpr3 = shift_arithmetic_right<Tgeneral_data_t>(param->_size_data, gpr1, gpr2); 353 344 … … 367 358 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_ror"); 368 359 369 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);370 Tgeneral_data_t gpr2 = param->_mask_shift & unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb);360 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 361 Tgeneral_data_t gpr2 = param->_mask_shift & unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 371 362 Tgeneral_data_t gpr3 = rotate_right<Tgeneral_data_t>(param->_size_data, gpr1, gpr2); 372 363 … … 386 377 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_ff1"); 387 378 388 Tgeneral_data_t gpr = unsigned( op->_data_ra);379 Tgeneral_data_t gpr = unsigned(param->_size_data,op->_data_ra); 389 380 Tgeneral_data_t index; 390 381 … … 406 397 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_fl1"); 407 398 408 Tgeneral_data_t gpr = unsigned( op->_data_ra);399 Tgeneral_data_t gpr = unsigned(param->_size_data,op->_data_ra); 409 400 Tgeneral_data_t index; 410 401 … … 426 417 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfeq"); 427 418 428 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);429 Tgeneral_data_t gpr2 = unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb);419 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 420 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 430 421 431 422 bool f_out = (gpr1 == gpr2); … … 446 437 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfne"); 447 438 448 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);449 Tgeneral_data_t gpr2 = unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb);439 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 440 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 450 441 451 442 bool f_out = (gpr1 != gpr2); … … 466 457 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfgeu"); 467 458 468 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);469 Tgeneral_data_t gpr2 = unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb);459 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 460 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 470 461 471 462 bool f_out = (gpr1 >= gpr2); … … 486 477 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfgtu"); 487 478 488 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);489 Tgeneral_data_t gpr2 = unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb);479 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 480 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 490 481 491 482 bool f_out = (gpr1 > gpr2); … … 506 497 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfleu"); 507 498 508 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);509 Tgeneral_data_t gpr2 = unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb);499 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 500 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 510 501 511 502 bool f_out = (gpr1 <= gpr2); … … 526 517 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfltu"); 527 518 528 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);529 Tgeneral_data_t gpr2 = unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb);519 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 520 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 530 521 531 522 bool f_out = (gpr1 < gpr2); … … 549 540 Tgeneral_data_t gpr2 = (op->_has_immediat==1)?op->_immediat:op->_data_rb; 550 541 551 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ra : %.8x",unsigned( op->_data_ra));552 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ras : %.8x", signed( op->_data_ra));553 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rb : %.8x",unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb));554 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rbs : %.8x", signed( (op->_has_immediat==1)?op->_immediat:op->_data_rb));542 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ra : %.8x",unsigned(param->_size_data,op->_data_ra)); 543 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ras : %.8x", signed(param->_size_data,op->_data_ra)); 544 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rb : %.8x",unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb)); 545 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rbs : %.8x", signed(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb)); 555 546 556 547 bool f_out; 557 548 558 switch (concatenation_bool(sign( gpr1),sign(gpr2)))549 switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2))) 559 550 { 560 551 case 1 /*b01*/ : f_out = 1 ; break; 561 552 case 2 /*b10*/ : f_out = 0 ; break; 562 default : f_out = signed( gpr1) >= signed(gpr2); break;553 default : f_out = signed(param->_size_data,gpr1) >= signed(param->_size_data,gpr2); break; 563 554 } 564 555 … … 585 576 bool f_out; 586 577 587 switch (concatenation_bool(sign( gpr1),sign(gpr2)))578 switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2))) 588 579 { 589 580 case 1 /*b01*/ : f_out = 1; break; 590 581 case 2 /*b10*/ : f_out = 0; break; 591 default : f_out = signed( gpr1) > signed(gpr2); break;582 default : f_out = signed(param->_size_data,gpr1) > signed(param->_size_data,gpr2); break; 592 583 } 593 584 … … 612 603 bool f_out; 613 604 614 switch (concatenation_bool(sign( gpr1),sign(gpr2)))605 switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2))) 615 606 { 616 607 case 1 /*b01*/ : f_out = 0; break; 617 608 case 2 /*b10*/ : f_out = 1; break; 618 default : f_out = signed( gpr1) <= signed(gpr2); break;609 default : f_out = signed(param->_size_data,gpr1) <= signed(param->_size_data,gpr2); break; 619 610 } 620 611 … … 639 630 bool f_out; 640 631 641 switch (concatenation_bool(sign( gpr1),sign(gpr2)))632 switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2))) 642 633 { 643 634 case 1 /*b01*/ : f_out = 0; break; 644 635 case 2 /*b10*/ : f_out = 1; break; 645 default : f_out = signed( gpr1) < signed(gpr2); break;636 default : f_out = signed(param->_size_data,gpr1) < signed(param->_size_data,gpr2); break; 646 637 } 647 638 … … 661 652 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_mtspr"); 662 653 663 Tgeneral_data_t imm = unsigned( op->_immediat);664 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);665 Tgeneral_data_t gpr2 = unsigned( op->_data_rb);654 Tgeneral_data_t imm = unsigned(param->_size_data,op->_immediat); 655 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 656 Tgeneral_data_t gpr2 = unsigned(param->_size_data,op->_data_rb); 666 657 Tgeneral_data_t addr = range<Tgeneral_data_t>(gpr1|imm,16); 667 658 … … 694 685 else 695 686 { 696 exception = EXCEPTION_ALU_SPR_ACCESS_ NOT_COMPLETE;687 exception = EXCEPTION_ALU_SPR_ACCESS_MUST_WRITE; 697 688 } 698 689 … … 712 703 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_mfspr"); 713 704 714 Tgeneral_data_t imm = unsigned( op->_immediat);715 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);705 Tgeneral_data_t imm = unsigned(param->_size_data,op->_immediat); 706 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 716 707 Tgeneral_data_t gpr2 = 0; 717 708 Tgeneral_data_t addr = range<Tgeneral_data_t>(gpr1|imm,16); … … 745 736 else 746 737 { 747 exception = EXCEPTION_ALU_SPR_ACCESS_ NOT_COMPLETE;738 exception = EXCEPTION_ALU_SPR_ACCESS_MUST_READ; 748 739 } 749 740 … … 784 775 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_mac"); 785 776 786 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);787 Tgeneral_data_t gpr2 = unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb);777 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 778 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 788 779 uint64_t temp = range<uint64_t>(gpr1 * gpr2, 32); 789 780 … … 808 799 log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_msb"); 809 800 810 Tgeneral_data_t gpr1 = unsigned( op->_data_ra);811 Tgeneral_data_t gpr2 = unsigned( (op->_has_immediat==1)?op->_immediat:op->_data_rb);801 Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra); 802 Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb); 812 803 uint64_t temp = range<uint64_t>(gpr1 * gpr2, 32); 813 804 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/Makefile
r81 r88 24 24 library_clean : Functionnal_unit_library_clean 25 25 26 local_clean : 27 26 28 include $(DIR_COMPONENT)/Makefile.deps 27 29 include $(DIR_MORPHEO)/Behavioural/Makefile.flags -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/main.cpp
r81 r88 75 75 size_load_queue , 76 76 timing , 77 &(morpheo::behavioural::custom::example_get_custom_information) 77 &(morpheo::behavioural::custom::example_get_custom_information), 78 true // is_toplevel 78 79 ); 79 80 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/test.cpp
r82 r88 69 69 _data_rc (data_rc & gen_mask<Tspecial_data_t>(param->_size_special_data)), 70 70 _write_rd (write_rd ), 71 _num_reg_rd (num_reg_rd % param->_nb_special_register),71 _num_reg_rd (num_reg_rd % (1<<param->_size_general_register)), 72 72 _data_rd (data_rd & gen_mask<Tgeneral_data_t>(param->_size_general_data)), 73 73 _write_re (write_re ), 74 _num_reg_re (num_reg_re % param->_nb_special_register),74 _num_reg_re (num_reg_re % (1<<param->_size_special_register)), 75 75 _data_re (data_re & gen_mask<Tspecial_data_t>(param->_size_special_data)), 76 76 _exception (exception ), … … 88 88 89 89 #ifdef STATISTICS 90 morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5, 50);90 morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX); 91 91 #endif 92 93 Tusage_t _usage = USE_ALL; 94 95 // _usage = usage_unset(_usage,USE_SYSTEMC ); 96 // _usage = usage_unset(_usage,USE_VHDL ); 97 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH ); 98 // _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT); 99 // _usage = usage_unset(_usage,USE_POSITION ); 100 // _usage = usage_unset(_usage,USE_STATISTICS ); 101 // _usage = usage_unset(_usage,USE_INFORMATION ); 92 102 93 103 Functionnal_unit * _Functionnal_unit = new Functionnal_unit (name.c_str(), … … 96 106 #endif 97 107 _param, 98 USE_ALL);108 _usage); 99 109 100 110 #ifdef SYSTEMC … … 162 172 if (_param->_have_port_ooo_engine_id) 163 173 (*(_Functionnal_unit-> in_EXECUTE_IN_OOO_ENGINE_ID )) ( in_EXECUTE_IN_OOO_ENGINE_ID ); 164 if (_param->_have_port_ packet_id)174 if (_param->_have_port_rob_ptr) 165 175 (*(_Functionnal_unit-> in_EXECUTE_IN_PACKET_ID )) ( in_EXECUTE_IN_PACKET_ID ); 166 176 (*(_Functionnal_unit-> in_EXECUTE_IN_OPERATION )) ( in_EXECUTE_IN_OPERATION ); … … 187 197 if (_param->_have_port_ooo_engine_id) 188 198 (*(_Functionnal_unit->out_EXECUTE_OUT_OOO_ENGINE_ID)) (out_EXECUTE_OUT_OOO_ENGINE_ID); 189 if (_param->_have_port_ packet_id)199 if (_param->_have_port_rob_ptr) 190 200 (*(_Functionnal_unit->out_EXECUTE_OUT_PACKET_ID )) (out_EXECUTE_OUT_PACKET_ID ); 191 201 //(*(_Functionnal_unit->out_EXECUTE_OUT_OPERATION )) (out_EXECUTE_OUT_OPERATION ); … … 475 485 transaction_in.push_back(execute_transaction(_param,0,0,0,301,OPERATION_TEST_L_SFLTS ,TYPE_TEST,0,0 ,0x11111111,0xdeadbeef,0 ,0,63,0x0 ,1,15,0 ,EXCEPTION_NONE ,0)); // + < - (in unsigned) 476 486 477 transaction_in.push_back(execute_transaction(_param,0,0,0,400,OPERATION_SPECIAL_L_MTSPR ,TYPE_SPECIAL,1,GROUP_ICACHE<<11, 3,0xdeadbeef,0 ,0,63,0xdeadbeef,0, 0,0 ,EXCEPTION_ALU_SPR_ACCESS_ NOT_COMPLETE,0,(GROUP_ICACHE<<11)| 3));478 transaction_in.push_back(execute_transaction(_param,0,0,0,401,OPERATION_SPECIAL_L_MTSPR ,TYPE_SPECIAL,1,GROUP_ICACHE<<11, 5,0xdeadbeef,0 ,0,63,0xdeadbeef,0, 0,0 ,EXCEPTION_ALU_SPR_ACCESS_ NOT_COMPLETE,0,(GROUP_ICACHE<<11)| 5));487 transaction_in.push_back(execute_transaction(_param,0,0,0,400,OPERATION_SPECIAL_L_MTSPR ,TYPE_SPECIAL,1,GROUP_ICACHE<<11, 3,0xdeadbeef,0 ,0,63,0xdeadbeef,0, 0,0 ,EXCEPTION_ALU_SPR_ACCESS_MUST_WRITE ,0,(GROUP_ICACHE<<11)| 3)); 488 transaction_in.push_back(execute_transaction(_param,0,0,0,401,OPERATION_SPECIAL_L_MTSPR ,TYPE_SPECIAL,1,GROUP_ICACHE<<11, 5,0xdeadbeef,0 ,0,63,0xdeadbeef,0, 0,0 ,EXCEPTION_ALU_SPR_ACCESS_MUST_WRITE ,0,(GROUP_ICACHE<<11)| 5)); 479 489 transaction_in.push_back(execute_transaction(_param,0,0,0,402,OPERATION_SPECIAL_L_MTSPR ,TYPE_SPECIAL,1,GROUP_MAC <<11, 0,0xdeadbeef,0 ,0,63,0xdeadbeef,0, 0,0 ,EXCEPTION_ALU_SPR_ACCESS_INVALID ,0,(GROUP_MAC <<11)| 0)); 480 490 transaction_in.push_back(execute_transaction(_param,0,0,0,403,OPERATION_SPECIAL_L_MTSPR ,TYPE_SPECIAL,1,GROUP_MAC <<11, 1,0xdeadbeef,0 ,0,63,0xdeadbeef,0, 0,0 ,EXCEPTION_ALU_NONE ,0,(GROUP_MAC <<11)| 1)); … … 590 600 if (_param->_have_port_ooo_engine_id) 591 601 in_EXECUTE_IN_OOO_ENGINE_ID .write(transaction_in.front()._ooo_engine_id); 592 if (_param->_have_port_ packet_id)602 if (_param->_have_port_rob_ptr) 593 603 in_EXECUTE_IN_PACKET_ID .write(transaction_in.front()._packet_id ); 594 604 in_EXECUTE_IN_OPERATION .write(transaction_in.front()._operation ); … … 613 623 { 614 624 // TEST 615 if (_param->_have_port_ packet_id)625 if (_param->_have_port_rob_ptr) 616 626 TEST(Tpacket_t , out_EXECUTE_OUT_PACKET_ID .read(), transaction_out.front()._packet_id ); 617 627 if (_param->_have_port_context_id) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Functionnal_unit.h
r82 r88 124 124 private : Tcontrol_t internal_EXECUTE_IN_ACK; 125 125 private : Tcontrol_t internal_EXECUTE_OUT_VAL; 126 private : bool reg_BUSY; 126 private : bool reg_BUSY_IN ; 127 private : bool reg_BUSY_OUT; 127 128 128 private : execute_operation_t * _execute_operation; 129 private : execute_operation_t * _execute_operation_in ; 130 private : execute_operation_t * _execute_operation_out; 129 131 private : execute_register_t **** _execute_register; 130 132 private : execute_param_t * _execute_param; … … 158 160 public : void transition (void); 159 161 public : void genMoore (void); 160 public : void genMealy (void);161 162 162 163 163 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Parameters.h
r81 r88 25 25 namespace functionnal_unit { 26 26 27 28 27 class Parameters : public morpheo::behavioural::Parameters 29 28 { 30 29 //-----[ fields ]------------------------------------------------------------ 31 public : constuint32_t _nb_context ;32 public : constuint32_t _nb_front_end ;33 public : constuint32_t _nb_ooo_engine ;34 public : constuint32_t _nb_packet ;35 public : constuint32_t _size_general_data ;36 public : const uint32_t _nb_general_register;37 public : const uint32_t _size_special_data;38 public : constuint32_t _nb_special_register ;39 public : constuint32_t _size_store_queue ;40 public : constuint32_t _size_load_queue ;30 public : uint32_t _nb_context ; 31 public : uint32_t _nb_front_end ; 32 public : uint32_t _nb_ooo_engine ; 33 public : uint32_t _nb_packet ; 34 //public : uint32_t _size_general_data ; 35 //public : uint32_t _size_special_data ; 36 //public : uint32_t _nb_general_register ; 37 //public : uint32_t _nb_special_register ; 38 //public : uint32_t _size_store_queue ; 39 //public : uint32_t _size_load_queue ; 41 40 42 public : 43 public : morpheo::behavioural::custom::custom_information_t (*_get_custom_information) ( uint32_t);41 public : execute_timing_t ** _timing ; 42 public : morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (void); 44 43 45 public : constuint32_t _size_context_id ;46 public : constuint32_t _size_front_end_id ;47 public : constuint32_t _size_ooo_engine_id ;48 public : constuint32_t _size_packet_id ;49 public : constuint32_t _size_general_register ;50 public : constuint32_t _size_special_register ;44 //public : uint32_t _size_context_id ; 45 //public : uint32_t _size_front_end_id ; 46 //public : uint32_t _size_ooo_engine_id ; 47 //public : uint32_t _size_packet_id ; 48 //public : uint32_t _size_general_register ; 49 //public : uint32_t _size_special_register ; 51 50 52 public : constbool _have_port_context_id ;53 public : constbool _have_port_front_end_id ;54 public : constbool _have_port_ooo_engine_id ;55 public : constbool _have_port_packet_id ;56 public : constbool _have_port_load_queue_ptr ;51 //public : bool _have_port_context_id ; 52 //public : bool _have_port_front_end_id ; 53 //public : bool _have_port_ooo_engine_id ; 54 //public : bool _have_port_packet_id ; 55 //public : bool _have_port_load_queue_ptr ; 57 56 58 public : constbool _have_groupe_MAC ;57 public : bool _have_groupe_MAC ; 59 58 60 59 //-----[ methods ]----------------------------------------------------------- … … 70 69 uint32_t size_load_queue , 71 70 execute_timing_t** timing , 72 morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t)); 73 public : Parameters (Parameters & param) ; 71 morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void), 72 bool is_toplevel=true 73 ); 74 // public : Parameters (Parameters & param) ; 74 75 public : ~Parameters () ; 76 77 public : void copy (void); 75 78 76 79 public : Parameters_test msg_error (void); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit.cpp
r81 r88 42 42 allocation (); 43 43 44 #if DEBUG_Functionnal_unit == true 45 log_printf(INFO,Functionnal_unit,FUNCTION,_("<%s> Parameters"),_name.c_str()); 46 47 std::cout << *param << std::endl; 48 #endif 49 44 50 #ifdef STATISTICS 45 if ( _usage & USE_STATISTICS)51 if (usage_is_set(_usage,USE_STATISTICS)) 46 52 { 47 53 log_printf(INFO,Functionnal_unit,FUNCTION,"Allocation of statistics"); … … 52 58 53 59 #ifdef VHDL 54 if ( _usage & USE_VHDL)60 if (usage_is_set(_usage,USE_VHDL)) 55 61 { 56 62 // generate the vhdl … … 62 68 63 69 #ifdef SYSTEMC 64 if ( _usage & USE_SYSTEMC)70 if (usage_is_set(_usage,USE_SYSTEMC)) 65 71 { 66 72 log_printf(INFO,Functionnal_unit,FUNCTION,"Method - transition"); … … 84 90 # endif 85 91 86 log_printf(INFO,Functionnal_unit,FUNCTION,"Method - genMealy");87 88 SC_METHOD (genMealy);89 dont_initialize ();90 sensitive << (*(in_CLOCK)).neg()91 << (*(in_EXECUTE_OUT_ACK));92 93 # ifdef SYSTEMCASS_SPECIFIC94 // List dependency information95 (*(out_EXECUTE_IN_ACK)) (*(in_EXECUTE_OUT_ACK));96 # endif97 98 92 #endif 99 93 } … … 108 102 109 103 #ifdef STATISTICS 110 if ( _usage & USE_STATISTICS)104 if (usage_is_set(_usage,USE_STATISTICS)) 111 105 { 112 106 log_printf(INFO,Functionnal_unit,FUNCTION,"Generate Statistics file"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_allocation.cpp
r81 r88 67 67 if (_param->_have_port_ooo_engine_id) 68 68 in_EXECUTE_IN_OOO_ENGINE_ID = interface->set_signal_in <Tcontext_t > ("ooo_engine_id", _param->_size_ooo_engine_id); 69 if (_param->_have_port_ packet_id)70 in_EXECUTE_IN_PACKET_ID = interface->set_signal_in <Tpacket_t > ("packet_id" , _param->_size_ packet_id);69 if (_param->_have_port_rob_ptr) 70 in_EXECUTE_IN_PACKET_ID = interface->set_signal_in <Tpacket_t > ("packet_id" , _param->_size_rob_ptr ); 71 71 in_EXECUTE_IN_OPERATION = interface->set_signal_in <Toperation_t > ("operation" , _param->_size_operation ); 72 72 in_EXECUTE_IN_TYPE = interface->set_signal_in <Ttype_t > ("type" , _param->_size_type ); 73 in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t> ("store_queue_ptr_write", log2(_param->_size_store_queue));73 in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t> ("store_queue_ptr_write",_param->_size_store_queue_ptr); 74 74 if (_param->_have_port_load_queue_ptr) 75 in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t> ("load_queue_ptr_write" , log2(_param->_size_load_queue));75 in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t> ("load_queue_ptr_write" ,_param->_size_load_queue_ptr); 76 76 in_EXECUTE_IN_HAS_IMMEDIAT = interface->set_signal_in <Tcontrol_t > ("has_immediat" , 1); 77 77 in_EXECUTE_IN_IMMEDIAT = interface->set_signal_in <Tgeneral_data_t > ("immediat" , _param->_size_general_data); … … 102 102 if (_param->_have_port_ooo_engine_id) 103 103 out_EXECUTE_OUT_OOO_ENGINE_ID = interface->set_signal_out<Tcontext_t > ("ooo_engine_id",_param->_size_ooo_engine_id); 104 if (_param->_have_port_ packet_id)105 out_EXECUTE_OUT_PACKET_ID = interface->set_signal_out<Tpacket_t > ("packet_id" ,_param->_size_ packet_id);104 if (_param->_have_port_rob_ptr) 105 out_EXECUTE_OUT_PACKET_ID = interface->set_signal_out<Tpacket_t > ("packet_id" ,_param->_size_rob_ptr ); 106 106 //out_EXECUTE_OUT_OPERATION = interface->set_signal_out<Toperation_t > ("operation" ,_param->_size_operation ); 107 107 out_EXECUTE_OUT_TYPE = interface->set_signal_out<Ttype_t > ("type" ,_param->_size_type ); … … 117 117 } 118 118 119 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 120 _execute_operation = new execute_operation_t; 121 _execute_param = new execute_param_t(_param->_size_general_data, 122 _param->_timing); 119 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 120 if (usage_is_set(_usage,USE_SYSTEMC)) 121 { 122 _execute_operation_in = new execute_operation_t; 123 _execute_operation_out = new execute_operation_t; 124 _execute_param = new execute_param_t(_param->_size_general_data, 125 _param->_timing); 123 126 124 127 _execute_register = new execute_register_t *** [_param->_nb_context]; … … 134 137 for (uint32_t k=0; k<_param->_nb_ooo_engine; k++) 135 138 { 136 uint32_t num_thread = get_num_thread(i,_param->_size_context_id,137 j,_param->_size_front_end_id,138 k,_param->_size_ooo_engine_id);139 // uint32_t num_thread = get_num_thread(i,_param->_size_context_id, 140 // j,_param->_size_front_end_id, 141 // k,_param->_size_ooo_engine_id); 139 142 140 143 _execute_register [i][j][k] = new execute_register_t; … … 144 147 145 148 for (uint32_t x=GROUP_CUSTOM_1; x<GROUP_CUSTOM_8; x++) 146 if ((_param->_get_custom_information( num_thread))._get_valid_group(x) == true)149 if ((_param->_get_custom_information())._get_valid_group(x) == true) 147 150 { 148 uint32_t nb_reg = (_param->_get_custom_information( num_thread))._get_nb_register(x);151 uint32_t nb_reg = (_param->_get_custom_information())._get_nb_register(x); 149 152 _execute_register[i][j][k]->implement_group(x,nb_reg); 150 153 151 154 for (uint32_t y=0; y<nb_reg; y++) 152 _execute_register[i][j][k]->_spr_access_mode->change_mode(x,y,(_param->_get_custom_information( num_thread))._get_access_mode(x,y));155 _execute_register[i][j][k]->_spr_access_mode->change_mode(x,y,(_param->_get_custom_information())._get_access_mode(x,y)); 153 156 } 154 157 } … … 211 214 if (_param->_timing[TYPE_TEST ][OPERATION_TEST_L_SFNE ]._latence > 0) 212 215 _function_execute[TYPE_TEST ][OPERATION_TEST_L_SFNE ] = &(operation_l_sfne ); 213 // if (_param->_timing[TYPE_MUL _DIV][OPERATION_MUL_DIV_L_MUL]._latence > 0)214 // _function_execute[TYPE_MUL _DIV][OPERATION_MUL_DIV_L_MUL] = &(operation_l_mul );215 // if (_param->_timing[TYPE_MUL _DIV][OPERATION_MUL_DIV_L_MULU]._latence > 0)216 // _function_execute[TYPE_ MUL_DIV][OPERATION_MUL_DIV_L_MULU] = &(operation_l_mulu );217 // if (_param->_timing[TYPE_ MUL_DIV][OPERATION_MUL_DIV_L_DIV]._latence > 0)218 // _function_execute[TYPE_ MUL_DIV][OPERATION_MUL_DIV_L_DIV] = &(operation_l_div );219 // if (_param->_timing[TYPE_ MUL_DIV][OPERATION_MUL_DIV_L_DIVU]._latence > 0)220 // _function_execute[TYPE_ MUL_DIV][OPERATION_MUL_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_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 ); 221 224 if (_param->_timing[TYPE_EXTEND ][OPERATION_EXTEND_L_EXTEND_S ]._latence > 0) 222 225 _function_execute[TYPE_EXTEND ][OPERATION_EXTEND_L_EXTEND_S ] = &(operation_l_extend_s); … … 243 246 if (_param->_timing[TYPE_BRANCH ][OPERATION_BRANCH_L_JALR ]._latence > 0) 244 247 _function_execute[TYPE_BRANCH ][OPERATION_BRANCH_L_JALR ] = &(operation_l_jalr ); 245 246 247 248 #ifdef POSITION 249 _component->generate_file();248 } 249 250 #ifdef POSITION 251 if (usage_is_set(_usage,USE_POSITION)) 252 _component->generate_file(); 250 253 #endif 251 254 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_deallocation.cpp
r81 r88 24 24 log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin"); 25 25 26 if ( _usage & USE_SYSTEMC)26 if (usage_is_set(_usage,USE_SYSTEMC)) 27 27 { 28 28 delete in_CLOCK ; … … 37 37 if (_param->_have_port_ooo_engine_id) 38 38 delete in_EXECUTE_IN_OOO_ENGINE_ID ; 39 if (_param->_have_port_ packet_id)39 if (_param->_have_port_rob_ptr) 40 40 delete in_EXECUTE_IN_PACKET_ID ; 41 41 delete in_EXECUTE_IN_OPERATION ; … … 62 62 if (_param->_have_port_ooo_engine_id) 63 63 delete out_EXECUTE_OUT_OOO_ENGINE_ID ; 64 if (_param->_have_port_ packet_id)64 if (_param->_have_port_rob_ptr) 65 65 delete out_EXECUTE_OUT_PACKET_ID ; 66 66 //delete out_EXECUTE_OUT_OPERATION ; … … 75 75 delete out_EXECUTE_OUT_NO_SEQUENCE ; 76 76 delete out_EXECUTE_OUT_ADDRESS ; 77 78 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 79 80 delete [] _execute_register; 81 delete _execute_param; 82 delete _execute_operation_in; 83 delete _execute_operation_out; 84 delete [] _function_execute; 77 85 } 78 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~79 80 delete [] _execute_register;81 delete _execute_param;82 delete _execute_operation;83 delete [] _function_execute;84 86 85 87 delete _component; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_end_cycle.cpp
r81 r88 26 26 27 27 #ifdef STATISTICS 28 _stat->end_cycle(); 28 if (usage_is_set(_usage,USE_STATISTICS)) 29 _stat->end_cycle(); 29 30 #endif 30 31 … … 32 33 // Evaluation before read the ouput signal 33 34 // sc_start(0); 34 _interfaces->testbench(); 35 if (usage_is_set(_usage,USE_VHDL_TESTBENCH)) 36 _interfaces->testbench(); 35 37 #endif 36 38 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_genMoore.cpp
r81 r88 23 23 void Functionnal_unit::genMoore (void) 24 24 { 25 log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin"); 25 log_begin(Functionnal_unit,FUNCTION); 26 log_function(Functionnal_unit,FUNCTION,_name.c_str()); 26 27 27 internal_EXECUTE_OUT_VAL = reg_BUSY and (_execute_operation->_timing._latence == 0); 28 { 29 internal_EXECUTE_IN_ACK = not reg_BUSY_IN; 30 31 PORT_WRITE(out_EXECUTE_IN_ACK , internal_EXECUTE_IN_ACK); 32 } 28 33 29 PORT_WRITE(out_EXECUTE_OUT_VAL , internal_EXECUTE_OUT_VAL); 30 if (_param->_have_port_context_id) 31 PORT_WRITE(out_EXECUTE_OUT_CONTEXT_ID ,_execute_operation->_context_id ); 32 if (_param->_have_port_front_end_id) 33 PORT_WRITE(out_EXECUTE_OUT_FRONT_END_ID ,_execute_operation->_front_end_id ); 34 if (_param->_have_port_ooo_engine_id) 35 PORT_WRITE(out_EXECUTE_OUT_OOO_ENGINE_ID,_execute_operation->_ooo_engine_id); 36 if (_param->_have_port_packet_id) 37 PORT_WRITE(out_EXECUTE_OUT_PACKET_ID ,_execute_operation->_packet_id ); 38 //PORT_WRITE(out_EXECUTE_OUT_OPERATION ,_execute_operation->_operation ); 39 PORT_WRITE(out_EXECUTE_OUT_TYPE ,_execute_operation->_type ); 40 PORT_WRITE(out_EXECUTE_OUT_WRITE_RD ,_execute_operation->_write_rd ); 41 PORT_WRITE(out_EXECUTE_OUT_NUM_REG_RD ,_execute_operation->_num_reg_rd ); 42 PORT_WRITE(out_EXECUTE_OUT_DATA_RD ,_execute_operation->_data_rd ); 43 PORT_WRITE(out_EXECUTE_OUT_WRITE_RE ,_execute_operation->_write_re ); 44 PORT_WRITE(out_EXECUTE_OUT_NUM_REG_RE ,_execute_operation->_num_reg_re ); 45 PORT_WRITE(out_EXECUTE_OUT_DATA_RE ,_execute_operation->_data_re ); 46 PORT_WRITE(out_EXECUTE_OUT_EXCEPTION ,_execute_operation->_exception ); 47 PORT_WRITE(out_EXECUTE_OUT_NO_SEQUENCE ,_execute_operation->_no_sequence ); 48 PORT_WRITE(out_EXECUTE_OUT_ADDRESS ,_execute_operation->_address ); 34 { 35 internal_EXECUTE_OUT_VAL = reg_BUSY_OUT and (_execute_operation_out->_timing._latence == 0); 36 37 PORT_WRITE(out_EXECUTE_OUT_VAL , internal_EXECUTE_OUT_VAL); 38 if (_param->_have_port_context_id) 39 PORT_WRITE(out_EXECUTE_OUT_CONTEXT_ID ,_execute_operation_out->_context_id ); 40 if (_param->_have_port_front_end_id) 41 PORT_WRITE(out_EXECUTE_OUT_FRONT_END_ID ,_execute_operation_out->_front_end_id ); 42 if (_param->_have_port_ooo_engine_id) 43 PORT_WRITE(out_EXECUTE_OUT_OOO_ENGINE_ID,_execute_operation_out->_ooo_engine_id); 44 if (_param->_have_port_rob_ptr) 45 PORT_WRITE(out_EXECUTE_OUT_PACKET_ID ,_execute_operation_out->_packet_id ); 46 // PORT_WRITE(out_EXECUTE_OUT_OPERATION ,_execute_operation_out->_operation ); 47 PORT_WRITE(out_EXECUTE_OUT_TYPE ,_execute_operation_out->_type ); 48 PORT_WRITE(out_EXECUTE_OUT_WRITE_RD ,_execute_operation_out->_write_rd ); 49 PORT_WRITE(out_EXECUTE_OUT_NUM_REG_RD ,_execute_operation_out->_num_reg_rd ); 50 PORT_WRITE(out_EXECUTE_OUT_DATA_RD ,_execute_operation_out->_data_rd ); 51 PORT_WRITE(out_EXECUTE_OUT_WRITE_RE ,_execute_operation_out->_write_re ); 52 PORT_WRITE(out_EXECUTE_OUT_NUM_REG_RE ,_execute_operation_out->_num_reg_re ); 53 PORT_WRITE(out_EXECUTE_OUT_DATA_RE ,_execute_operation_out->_data_re ); 54 PORT_WRITE(out_EXECUTE_OUT_EXCEPTION ,_execute_operation_out->_exception ); 55 PORT_WRITE(out_EXECUTE_OUT_NO_SEQUENCE ,_execute_operation_out->_no_sequence ); 56 PORT_WRITE(out_EXECUTE_OUT_ADDRESS ,_execute_operation_out->_address ); 57 } 49 58 50 log_ printf(FUNC,Functionnal_unit,FUNCTION,"End");59 log_end(Functionnal_unit,FUNCTION); 51 60 }; 52 61 … … 57 66 }; // end namespace multi_execute_loop 58 67 }; // end namespace core 59 60 68 }; // end namespace behavioural 61 69 }; // end namespace morpheo -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_transition.cpp
r81 r88 23 23 void Functionnal_unit::transition (void) 24 24 { 25 log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin"); 25 log_begin(Functionnal_unit,FUNCTION); 26 log_function(Functionnal_unit,FUNCTION,_name.c_str()); 26 27 27 28 if (PORT_READ(in_NRESET) == 0) 28 29 { 29 reg_BUSY = false; 30 reg_BUSY_IN = false; 31 reg_BUSY_OUT = false; 30 32 31 33 for (uint32_t i=0; i<_param->_nb_context; i++) … … 33 35 for (uint32_t k=0; k<_param->_nb_ooo_engine; k++) 34 36 { 35 uint32_t num_thread = get_num_thread(i,_param->_size_context_id,36 j,_param->_size_front_end_id,37 k,_param->_size_ooo_engine_id);37 // uint32_t num_thread = get_num_thread(i,_param->_size_context_id, 38 // j,_param->_size_front_end_id, 39 // k,_param->_size_ooo_engine_id); 38 40 39 41 for (uint32_t x=GROUP_CUSTOM_1; x<GROUP_CUSTOM_8; x++) 40 42 { 41 function_execute_end_cycle_t * fct = (_param->_get_custom_information( num_thread)._get_custom_execute_reset(x));43 function_execute_end_cycle_t * fct = (_param->_get_custom_information()._get_custom_execute_reset(x)); 42 44 43 45 if (fct != NULL) … … 51 53 if (internal_EXECUTE_OUT_VAL and PORT_READ(in_EXECUTE_OUT_ACK)) 52 54 { 55 log_printf(TRACE,Functionnal_unit,FUNCTION," * EXECUTE_OUT : Transaction Accepted"); 53 56 // transaction 54 reg_BUSY = false;57 reg_BUSY_OUT = false; 55 58 } 56 59 … … 60 63 if (PORT_READ(in_EXECUTE_IN_VAL) and internal_EXECUTE_IN_ACK) 61 64 { 62 reg_BUSY = true; 65 log_printf(TRACE,Functionnal_unit,FUNCTION," * EXECUTE_IN : Transaction Accepted"); 66 67 reg_BUSY_IN = true; 63 68 64 69 Tcontext_t context_id = (_param->_have_port_context_id )?PORT_READ(in_EXECUTE_IN_CONTEXT_ID ):0; 65 70 Tcontext_t front_end_id = (_param->_have_port_front_end_id )?PORT_READ(in_EXECUTE_IN_FRONT_END_ID ):0; 66 71 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id)?PORT_READ(in_EXECUTE_IN_OOO_ENGINE_ID):0; 67 Tcontext_t packet_id = (_param->_have_port_ packet_id)?PORT_READ(in_EXECUTE_IN_PACKET_ID ):0;72 Tcontext_t packet_id = (_param->_have_port_rob_ptr )?PORT_READ(in_EXECUTE_IN_PACKET_ID ):0; 68 73 Toperation_t operation = PORT_READ(in_EXECUTE_IN_OPERATION); 69 74 Ttype_t type = PORT_READ(in_EXECUTE_IN_TYPE); 70 75 71 _execute_operation->_context_id = context_id ; 72 _execute_operation->_front_end_id = front_end_id ; 73 _execute_operation->_ooo_engine_id = ooo_engine_id; 74 _execute_operation->_packet_id = packet_id ; 75 _execute_operation->_operation = operation ; 76 _execute_operation->_type = type ; 77 _execute_operation->_has_immediat = PORT_READ(in_EXECUTE_IN_HAS_IMMEDIAT); 78 _execute_operation->_immediat = PORT_READ(in_EXECUTE_IN_IMMEDIAT ); 79 _execute_operation->_data_ra = PORT_READ(in_EXECUTE_IN_DATA_RA ); 80 _execute_operation->_data_rb = PORT_READ(in_EXECUTE_IN_DATA_RB ); 81 _execute_operation->_data_rc = PORT_READ(in_EXECUTE_IN_DATA_RC ); 82 _execute_operation->_write_rd = PORT_READ(in_EXECUTE_IN_WRITE_RD ); 83 _execute_operation->_num_reg_rd = PORT_READ(in_EXECUTE_IN_NUM_REG_RD ); 84 _execute_operation->_write_re = PORT_READ(in_EXECUTE_IN_WRITE_RE ); 85 _execute_operation->_num_reg_re = PORT_READ(in_EXECUTE_IN_NUM_REG_RE ); 86 76 _execute_operation_in->_context_id = context_id ; 77 _execute_operation_in->_front_end_id = front_end_id ; 78 _execute_operation_in->_ooo_engine_id = ooo_engine_id; 79 _execute_operation_in->_packet_id = packet_id ; 80 _execute_operation_in->_operation = operation ; 81 _execute_operation_in->_type = type ; 82 _execute_operation_in->_has_immediat = PORT_READ(in_EXECUTE_IN_HAS_IMMEDIAT); 83 _execute_operation_in->_immediat = PORT_READ(in_EXECUTE_IN_IMMEDIAT ); 84 _execute_operation_in->_data_ra = PORT_READ(in_EXECUTE_IN_DATA_RA ); 85 _execute_operation_in->_data_rb = PORT_READ(in_EXECUTE_IN_DATA_RB ); 86 _execute_operation_in->_data_rc = PORT_READ(in_EXECUTE_IN_DATA_RC ); 87 _execute_operation_in->_write_rd = PORT_READ(in_EXECUTE_IN_WRITE_RD ); 88 _execute_operation_in->_num_reg_rd = PORT_READ(in_EXECUTE_IN_NUM_REG_RD ); 89 _execute_operation_in->_write_re = PORT_READ(in_EXECUTE_IN_WRITE_RE ); 90 _execute_operation_in->_num_reg_re = PORT_READ(in_EXECUTE_IN_NUM_REG_RE ); 91 92 log_printf(TRACE,Functionnal_unit,FUNCTION," * context_id : %d",_execute_operation_in->_context_id ); 93 log_printf(TRACE,Functionnal_unit,FUNCTION," * front_end_id : %d",_execute_operation_in->_front_end_id ); 94 log_printf(TRACE,Functionnal_unit,FUNCTION," * ooo_engine_id : %d",_execute_operation_in->_ooo_engine_id); 95 log_printf(TRACE,Functionnal_unit,FUNCTION," * packet_id : %d",_execute_operation_in->_packet_id ); 96 log_printf(TRACE,Functionnal_unit,FUNCTION," * operation : %d",_execute_operation_in->_operation ); 97 log_printf(TRACE,Functionnal_unit,FUNCTION," * type : %s",toString_type(_execute_operation_in->_type).c_str()); 98 log_printf(TRACE,Functionnal_unit,FUNCTION," * has_immediat : %d",_execute_operation_in->_has_immediat ); 99 log_printf(TRACE,Functionnal_unit,FUNCTION," * immediat : %.8x",_execute_operation_in->_immediat ); 100 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ra : %.8x",_execute_operation_in->_data_ra ); 101 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rb : %.8x",_execute_operation_in->_data_rb ); 102 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rc : %.8x",_execute_operation_in->_data_rc ); 103 log_printf(TRACE,Functionnal_unit,FUNCTION," * write_rd : %d" ,_execute_operation_in->_write_rd ); 104 log_printf(TRACE,Functionnal_unit,FUNCTION," * num_reg_rd : %d" ,_execute_operation_in->_num_reg_rd ); 105 log_printf(TRACE,Functionnal_unit,FUNCTION," * write_re : %d" ,_execute_operation_in->_write_re ); 106 log_printf(TRACE,Functionnal_unit,FUNCTION," * num_reg_re : %d" ,_execute_operation_in->_num_reg_re ); 107 87 108 #ifdef DEBUG_TEST 88 109 if (type >= _param->_nb_type) … … 98 119 if (type == TYPE_CUSTOM) 99 120 { 100 uint32_t num_thread = get_num_thread(context_id ,_param->_size_context_id,101 front_end_id ,_param->_size_front_end_id,102 ooo_engine_id,_param->_size_ooo_engine_id);103 104 (*(_param->_get_custom_information( num_thread)._get_custom_execute_genMoore(operation))) (_execute_operation, execute_register, _execute_param);121 // uint32_t num_thread = get_num_thread(context_id ,_param->_size_context_id, 122 // front_end_id ,_param->_size_front_end_id, 123 // ooo_engine_id,_param->_size_ooo_engine_id); 124 125 (*(_param->_get_custom_information()._get_custom_execute_genMoore(operation))) (_execute_operation_in, execute_register, _execute_param); 105 126 } 106 127 else 107 (*(_function_execute[type][operation])) (_execute_operation, execute_register, _execute_param); 108 128 (*(_function_execute[type][operation])) (_execute_operation_in, execute_register, _execute_param); 129 130 131 log_printf(TRACE,Functionnal_unit,FUNCTION," -----------------"); 132 log_printf(TRACE,Functionnal_unit,FUNCTION," * latence : %.8x",_execute_operation_in->_timing._latence); 133 log_printf(TRACE,Functionnal_unit,FUNCTION," * delay : %.8x",_execute_operation_in->_timing._delay); 134 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rd : %.8x",_execute_operation_in->_data_rd ); 135 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_re : %.8x",_execute_operation_in->_data_re ); 136 log_printf(TRACE,Functionnal_unit,FUNCTION," * exception : %d" ,_execute_operation_in->_exception ); 137 log_printf(TRACE,Functionnal_unit,FUNCTION," * no_sequence : %d" ,_execute_operation_in->_no_sequence); 138 log_printf(TRACE,Functionnal_unit,FUNCTION," * address : %.8x",_execute_operation_in->_address ); 109 139 110 140 #ifdef STATISTICS 111 (*_stat_use_functionnal_unit) ++; 112 (*_stat_sum_delay) += _execute_operation->_timing._delay; 113 (*_stat_sum_latence) += _execute_operation->_timing._latence; 141 if (usage_is_set(_usage,USE_STATISTICS)) 142 { 143 (*_stat_use_functionnal_unit) ++; 144 (*_stat_sum_delay) += _execute_operation_in->_timing._delay; 145 (*_stat_sum_latence) += _execute_operation_in->_timing._latence; 146 } 114 147 #endif 115 148 } … … 121 154 for (uint32_t k=0; k<_param->_nb_ooo_engine; k++) 122 155 { 123 uint32_t num_thread = get_num_thread(i,_param->_size_context_id,124 j,_param->_size_front_end_id,125 k,_param->_size_ooo_engine_id);156 // uint32_t num_thread = get_num_thread(i,_param->_size_context_id, 157 // j,_param->_size_front_end_id, 158 // k,_param->_size_ooo_engine_id); 126 159 127 160 for (uint32_t x=GROUP_CUSTOM_1; x<GROUP_CUSTOM_8; x++) 128 161 { 129 function_execute_end_cycle_t * fct = (_param->_get_custom_information( num_thread)._get_custom_execute_transition(x));162 function_execute_end_cycle_t * fct = (_param->_get_custom_information()._get_custom_execute_transition(x)); 130 163 131 164 if (fct != NULL) … … 142 175 } 143 176 } 177 178 if (reg_BUSY_IN and not reg_BUSY_OUT) 179 { 180 reg_BUSY_OUT = reg_BUSY_IN; 181 reg_BUSY_IN = false; 182 183 _execute_operation_out->_timing = _execute_operation_in->_timing ; 184 _execute_operation_out->_context_id = _execute_operation_in->_context_id ; 185 _execute_operation_out->_front_end_id = _execute_operation_in->_front_end_id ; 186 _execute_operation_out->_ooo_engine_id = _execute_operation_in->_ooo_engine_id; 187 _execute_operation_out->_packet_id = _execute_operation_in->_packet_id ; 188 _execute_operation_out->_operation = _execute_operation_in->_operation ; 189 _execute_operation_out->_type = _execute_operation_in->_type ; 190 _execute_operation_out->_has_immediat = _execute_operation_in->_has_immediat ; 191 _execute_operation_out->_immediat = _execute_operation_in->_immediat ; 192 _execute_operation_out->_data_ra = _execute_operation_in->_data_ra ; 193 _execute_operation_out->_data_rb = _execute_operation_in->_data_rb ; 194 _execute_operation_out->_data_rc = _execute_operation_in->_data_rc ; 195 _execute_operation_out->_data_rd = _execute_operation_in->_data_rd ; 196 _execute_operation_out->_data_re = _execute_operation_in->_data_re ; 197 _execute_operation_out->_write_rd = _execute_operation_in->_write_rd ; 198 _execute_operation_out->_num_reg_rd = _execute_operation_in->_num_reg_rd ; 199 _execute_operation_out->_write_re = _execute_operation_in->_write_re ; 200 _execute_operation_out->_num_reg_re = _execute_operation_in->_num_reg_re ; 201 _execute_operation_out->_exception = _execute_operation_in->_exception ; 202 _execute_operation_out->_no_sequence = _execute_operation_in->_no_sequence ; 203 _execute_operation_out->_address = _execute_operation_in->_address ; 204 } 205 206 // each cycle : decrease the latence 207 if (reg_BUSY_OUT and (_execute_operation_out->_timing._latence > 0)) 208 _execute_operation_out->_timing._latence --; 144 209 } 145 146 // each cycle : decrease the latence147 if (reg_BUSY and (_execute_operation->_timing._latence > 0))148 _execute_operation->_timing._latence --;149 210 150 211 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) … … 152 213 #endif 153 214 154 log_ printf(FUNC,Functionnal_unit,FUNCTION,"End");215 log_end(Functionnal_unit,FUNCTION); 155 216 }; 156 217 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters.cpp
r81 r88 31 31 uint32_t size_load_queue , 32 32 execute_timing_t** timing , 33 morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t)) : 34 _nb_context (nb_context ), 35 _nb_front_end (nb_front_end ), 36 _nb_ooo_engine (nb_ooo_engine ), 37 _nb_packet (nb_packet ), 38 _size_general_data (size_general_data ), 39 _nb_general_register (nb_general_register ), 40 _size_special_data (size_special_data ), 41 _nb_special_register (nb_special_register ), 42 _size_store_queue (size_store_queue ), 43 _size_load_queue (size_load_queue ), 44 45 _size_context_id (log2(nb_context )), 46 _size_front_end_id (log2(nb_front_end )), 47 _size_ooo_engine_id (log2(nb_ooo_engine )), 48 _size_packet_id (log2(nb_packet )), 49 _size_general_register (log2(nb_general_register)), 50 _size_special_register (log2(nb_special_register)), 51 52 _have_port_context_id (_size_context_id > 0), 53 _have_port_front_end_id (_size_front_end_id > 0), 54 _have_port_ooo_engine_id (_size_ooo_engine_id > 0), 55 _have_port_packet_id (_size_packet_id > 0), 56 _have_port_load_queue_ptr(_size_load_queue > 1), 57 58 _have_groupe_MAC ( (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MAC ]._latence > 0) or 59 (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MACRC]._latence > 0) or 60 (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MSB ]._latence > 0)) 33 morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void), 34 bool is_toplevel) 61 35 { 62 36 log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin"); 63 37 64 _timing = timing; 38 _nb_context = nb_context ; 39 _nb_front_end = nb_front_end ; 40 _nb_ooo_engine = nb_ooo_engine ; 41 _nb_packet = nb_packet ; 42 // _size_general_data = size_general_data ; 43 // _size_special_data = size_special_data ; 44 // _nb_general_register = nb_general_register ; 45 // _nb_special_register = nb_special_register ; 46 // _size_store_queue = size_store_queue ; 47 // _size_load_queue = size_load_queue ; 48 49 // _size_context_id = log2(nb_context ); 50 // _size_front_end_id = log2(nb_front_end ); 51 // _size_ooo_engine_id = log2(nb_ooo_engine ); 52 // _size_packet_id = log2(nb_packet ); 53 // _size_general_register = log2(nb_general_register); 54 // _size_special_register = log2(nb_special_register); 55 56 // _have_port_context_id = _size_context_id > 0; 57 // _have_port_front_end_id = _size_front_end_id > 0; 58 // _have_port_ooo_engine_id = _size_ooo_engine_id > 0; 59 // _have_port_packet_id = _size_packet_id > 0; 60 // _have_port_load_queue_ptr= _size_load_queue > 1; 61 62 _have_groupe_MAC = ( (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MAC ]._latence > 0) or 63 (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MACRC]._latence > 0) or 64 (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MSB ]._latence > 0)); 65 66 _timing = timing; 65 67 66 68 if (get_custom_information == NULL) … … 71 73 test(); 72 74 75 if (is_toplevel) 76 { 77 _size_context_id = log2(nb_context ); 78 _size_front_end_id = log2(nb_front_end ); 79 _size_ooo_engine_id = log2(nb_ooo_engine ); 80 _size_rob_ptr = log2(nb_packet ); 81 _size_general_register = log2(nb_general_register); 82 _size_special_register = log2(nb_special_register); 83 84 _size_general_data = size_general_data ; 85 _size_special_data = size_special_data ; 86 _size_general_register = log2(nb_general_register); 87 _size_special_register = log2(nb_special_register); 88 89 _size_load_queue_ptr = log2(size_load_queue ); 90 _size_store_queue_ptr = log2(size_store_queue); 91 92 _have_port_context_id = _size_context_id > 0; 93 _have_port_front_end_id = _size_front_end_id > 0; 94 _have_port_ooo_engine_id = _size_ooo_engine_id > 0; 95 _have_port_rob_ptr = _size_rob_ptr > 0; 96 _have_port_load_queue_ptr= _size_load_queue_ptr> 0; 97 98 copy(); 99 } 100 73 101 log_printf(FUNC,Functionnal_unit,FUNCTION,"End"); 74 102 }; 75 103 104 // #undef FUNCTION 105 // #define FUNCTION "Functionnal_unit::Parameters (copy)" 106 // Parameters::Parameters (Parameters & param): 107 // _nb_context (param._nb_context ), 108 // _nb_front_end (param._nb_front_end ), 109 // _nb_ooo_engine (param._nb_ooo_engine ), 110 // _nb_packet (param._nb_packet ), 111 // _size_general_data (param._size_general_data ), 112 // _nb_general_register (param._nb_general_register ), 113 // _size_special_data (param._size_special_data ), 114 // _nb_special_register (param._nb_special_register ), 115 // _size_store_queue (param._size_store_queue ), 116 // _size_load_queue (param._size_load_queue ), 117 118 // _size_context_id (param._size_context_id ), 119 // _size_front_end_id (param._size_front_end_id ), 120 // _size_ooo_engine_id (param._size_ooo_engine_id ), 121 // _size_packet_id (param._size_packet_id ), 122 // _size_general_register (param._size_general_register ), 123 // _size_special_register (param._size_special_register ), 124 125 // _have_port_context_id (param._have_port_context_id ), 126 // _have_port_front_end_id (param._have_port_front_end_id ), 127 // _have_port_ooo_engine_id (param._have_port_ooo_engine_id), 128 // _have_port_packet_id (param._have_port_packet_id ), 129 // _have_port_load_queue_ptr(param._have_port_load_queue_ptr), 130 131 // _have_groupe_MAC (param._have_groupe_MAC ) 132 // { 133 // log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin"); 134 135 // _timing = param._timing; 136 // _get_custom_information = param._get_custom_information; 137 138 // test(); 139 // log_printf(FUNC,Functionnal_unit,FUNCTION,"End"); 140 // }; 141 76 142 #undef FUNCTION 77 #define FUNCTION "Functionnal_unit::Parameters (copy)" 78 Parameters::Parameters (Parameters & param): 79 _nb_context (param._nb_context ), 80 _nb_front_end (param._nb_front_end ), 81 _nb_ooo_engine (param._nb_ooo_engine ), 82 _nb_packet (param._nb_packet ), 83 _size_general_data (param._size_general_data ), 84 _nb_general_register (param._nb_general_register ), 85 _size_special_data (param._size_special_data ), 86 _nb_special_register (param._nb_special_register ), 87 _size_store_queue (param._size_store_queue ), 88 _size_load_queue (param._size_load_queue ), 89 90 _size_context_id (param._size_context_id ), 91 _size_front_end_id (param._size_front_end_id ), 92 _size_ooo_engine_id (param._size_ooo_engine_id ), 93 _size_packet_id (param._size_packet_id ), 94 _size_general_register (param._size_general_register ), 95 _size_special_register (param._size_special_register ), 96 97 _have_port_context_id (param._have_port_context_id ), 98 _have_port_front_end_id (param._have_port_front_end_id ), 99 _have_port_ooo_engine_id (param._have_port_ooo_engine_id), 100 _have_port_packet_id (param._have_port_packet_id ), 101 _have_port_load_queue_ptr(param._have_port_load_queue_ptr), 102 103 _have_groupe_MAC (param._have_groupe_MAC ) 143 #define FUNCTION "Functionnal_unit::~Parameters" 144 Parameters::~Parameters (void) 104 145 { 105 146 log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin"); 106 107 _timing = param._timing;108 _get_custom_information = param._get_custom_information;109 110 test();111 147 log_printf(FUNC,Functionnal_unit,FUNCTION,"End"); 112 148 }; 113 149 114 150 #undef FUNCTION 115 #define FUNCTION "Functionnal_unit:: ~Parameters"116 Parameters::~Parameters ()151 #define FUNCTION "Functionnal_unit::copy" 152 void Parameters::copy (void) 117 153 { 118 154 log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters_msg_error.cpp
r81 r88 31 31 for (uint32_t j=0; j<_nb_operation; j++) 32 32 if (_timing[i][j]._delay != _timing[i][j]._latence) 33 test.error( "For the type '"+toString(i)+"', and the operation '"+toString(j)+"', the delay and the latence must be equal.");33 test.error(toString(_("For the type '%d', and the operation '%d', the delay and the latence must be equal.\n"),i,j)); 34 34 35 35 if (_have_groupe_MAC and ((_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MAC ]._latence == 0) or 36 36 (_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MACRC]._latence == 0) or 37 37 (_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MSB ]._latence == 0))) 38 test.error("The functionnal unit implement a MAC unit, the latence to operation OPERATION_ALU_L_MAC, OPERATION_ALU_L_MACRC and OPERATION_ALU_L_MSB must be higher than 0. ");38 test.error("The functionnal unit implement a MAC unit, the latence to operation OPERATION_ALU_L_MAC, OPERATION_ALU_L_MACRC and OPERATION_ALU_L_MSB must be higher than 0.\n"); 39 39 40 40 log_printf(FUNC,Functionnal_unit,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters_print.cpp
r81 r88 32 32 xml.singleton_begin("nb_packet "); xml.attribut("value",toString(_nb_packet )); xml.singleton_end(); 33 33 xml.singleton_begin("size_general_data "); xml.attribut("value",toString(_size_general_data )); xml.singleton_end(); 34 34 // xml.singleton_begin("nb_general_register"); xml.attribut("value",toString(_nb_general_register)); xml.singleton_end(); 35 35 xml.singleton_begin("size_special_data "); xml.attribut("value",toString(_size_special_data )); xml.singleton_end(); 36 36 // xml.singleton_begin("nb_special_register"); xml.attribut("value",toString(_nb_special_register)); xml.singleton_end(); 37 37 xml.balise_close(); 38 38
Note: See TracChangeset
for help on using the changeset viewer.