Changeset 139 for trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Timestamp:
- Jul 30, 2010, 4:47:27 PM (14 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h
r137 r139 413 413 } while (0) 414 414 415 #define ALLOC1_SIGNAL_IN ( sig, name, type, size)\415 #define ALLOC1_SIGNAL_IN_COND( sig, name, type, size, cond) \ 416 416 do \ 417 417 { \ … … 419 419 for (uint32_t it1=0; it1<iterator_1; it1++) \ 420 420 { \ 421 if (size > 0) \ 422 { \ 423 sig [it1] = interface[it1]->set_signal_in <type> (name, size); \ 424 } \ 425 else \ 426 { \ 427 PRINT_SIZE_NUL(_component,interface[it1],name); \ 428 } \ 429 } \ 430 } while (0) 431 432 #define ALLOC1_SIGNAL_OUT(sig, name, type, size) \ 421 if (cond) \ 422 { \ 423 if (size > 0) \ 424 { \ 425 sig [it1] = interface[it1]->set_signal_in <type> (name, size); \ 426 } \ 427 else \ 428 { \ 429 PRINT_SIZE_NUL(_component,interface[it1],name); \ 430 } \ 431 } \ 432 } \ 433 } while (0) 434 435 #define ALLOC1_SIGNAL_OUT_COND(sig, name, type, size, cond) \ 433 436 do \ 434 437 { \ … … 436 439 for (uint32_t it1=0; it1<iterator_1; it1++) \ 437 440 { \ 438 if (size > 0) \ 439 { \ 440 sig [it1] = interface[it1]->set_signal_out<type> (name, size); \ 441 } \ 442 else \ 443 { \ 444 PRINT_SIZE_NUL(_component,interface[it1],name); \ 445 } \ 446 } \ 447 } while (0) 448 449 #define DELETE1_SIGNAL(sig, x1, size) \ 450 do \ 451 { \ 452 for (uint32_t it1=0; it1<x1; it1++) \ 453 { \ 454 if (size > 0) \ 455 { \ 456 delete sig[it1]; \ 441 if (cond) \ 442 { \ 443 if (size > 0) \ 444 { \ 445 sig [it1] = interface[it1]->set_signal_out<type> (name, size); \ 446 } \ 447 else \ 448 { \ 449 PRINT_SIZE_NUL(_component,interface[it1],name); \ 450 } \ 451 } \ 452 } \ 453 } while (0) 454 455 #define ALLOC1_SIGNAL_IN( sig, name, type, size) ALLOC1_SIGNAL_IN_COND( sig, name, type, size,true) 456 #define ALLOC1_SIGNAL_OUT(sig, name, type, size) ALLOC1_SIGNAL_OUT_COND(sig, name, type, size,true) 457 458 #define DELETE1_SIGNAL_COND(sig, x1, size, cond) \ 459 do \ 460 { \ 461 for (uint32_t it1=0; it1<x1; it1++) \ 462 { \ 463 if (cond) \ 464 { \ 465 if (size > 0) \ 466 { \ 467 delete sig[it1]; \ 468 } \ 457 469 } \ 458 470 } \ 459 471 delete [] sig; \ 460 472 } while (0) 473 474 #define DELETE1_SIGNAL(sig, x1, size) DELETE1_SIGNAL_COND(sig, x1, size, true) 461 475 462 476 #define ALLOC1_FOREIGN_SIGNAL_IN(sig, interface, name, type, size,x1) \ … … 661 675 } while (0) 662 676 663 #define _ALLOC2_SIGNAL_IN ( sig, name, type, size, x1, x2)\677 #define _ALLOC2_SIGNAL_IN_COND( sig, name, type, size, x1, x2, cond) \ 664 678 do \ 665 679 { \ … … 670 684 for (uint32_t it2=0; it2<x2; it2++) \ 671 685 { \ 672 if (size > 0) \ 673 { \ 674 sig [it1][it2] = interface[it1][it2]->set_signal_in <type> (name, size); \ 675 } \ 676 else \ 677 { \ 678 PRINT_SIZE_NUL(_component,interface[it1][it2],name); \ 679 } \ 680 } \ 681 } \ 682 } while (0) 683 684 #define _ALLOC2_SIGNAL_OUT( sig, name, type, size, x1, x2) \ 686 if (cond) \ 687 { \ 688 if (size > 0) \ 689 { \ 690 sig [it1][it2] = interface[it1][it2]->set_signal_in <type> (name, size); \ 691 } \ 692 else \ 693 { \ 694 PRINT_SIZE_NUL(_component,interface[it1][it2],name); \ 695 } \ 696 } \ 697 } \ 698 } \ 699 } while (0) 700 701 #define _ALLOC2_SIGNAL_OUT_COND( sig, name, type, size, x1, x2, cond) \ 685 702 do \ 686 703 { \ … … 691 708 for (uint32_t it2=0; it2<x2; it2++) \ 692 709 { \ 693 if (size > 0) \ 694 { \ 695 sig [it1][it2] = interface[it1][it2]->set_signal_out <type> (name, size); \ 696 } \ 697 else \ 698 { \ 699 PRINT_SIZE_NUL(_component,interface[it1][it2],name); \ 700 } \ 701 } \ 702 } \ 703 } while (0) 704 705 #define ALLOC2_VAL_ACK_IN( sig, name, type ) _ALLOC2_VAL_ACK_IN( sig, name, type , iterator_1, iterator_2) 706 #define ALLOC2_VAL_ACK_OUT(sig, name, type ) _ALLOC2_VAL_ACK_OUT(sig, name, type , iterator_1, iterator_2) 707 #define ALLOC2_VALACK_IN( sig, type ) _ALLOC2_VALACK_IN( sig, type , iterator_1, iterator_2) 708 #define ALLOC2_VALACK_OUT( sig, type ) _ALLOC2_VALACK_OUT( sig, type , iterator_1, iterator_2) 709 #define ALLOC2_SIGNAL_IN( sig, name, type, size) _ALLOC2_SIGNAL_IN( sig, name, type, size, iterator_1, iterator_2) 710 #define ALLOC2_SIGNAL_OUT( sig, name, type, size) _ALLOC2_SIGNAL_OUT( sig, name, type, size, iterator_1, iterator_2) 711 712 #define DELETE2_SIGNAL(sig, x1,x2, size) \ 713 do \ 714 { \ 715 for (uint32_t it1=0; it1<x1; it1++) \ 716 { \ 717 for (uint32_t it2=0; it2<x2; it2++) \ 718 { \ 719 if (size > 0) \ 720 { \ 721 delete sig[it1][it2]; \ 710 if (cond) \ 711 { \ 712 if (size > 0) \ 713 { \ 714 sig [it1][it2] = interface[it1][it2]->set_signal_out <type> (name, size); \ 715 } \ 716 else \ 717 { \ 718 PRINT_SIZE_NUL(_component,interface[it1][it2],name); \ 719 } \ 720 } \ 721 } \ 722 } \ 723 } while (0) 724 725 #define _ALLOC2_SIGNAL_IN( sig, name, type, size, x1, x2) _ALLOC2_SIGNAL_IN_COND( sig, name, type, size, x1, x2,true) 726 #define _ALLOC2_SIGNAL_OUT(sig, name, type, size, x1, x2) _ALLOC2_SIGNAL_OUT_COND(sig, name, type, size, x1, x2,true) 727 728 #define ALLOC2_VAL_ACK_IN( sig, name, type ) _ALLOC2_VAL_ACK_IN( sig, name, type , iterator_1, iterator_2) 729 #define ALLOC2_VAL_ACK_OUT(sig, name, type ) _ALLOC2_VAL_ACK_OUT(sig, name, type , iterator_1, iterator_2) 730 #define ALLOC2_VALACK_IN( sig, type ) _ALLOC2_VALACK_IN( sig, type , iterator_1, iterator_2) 731 #define ALLOC2_VALACK_OUT( sig, type ) _ALLOC2_VALACK_OUT( sig, type , iterator_1, iterator_2) 732 #define ALLOC2_SIGNAL_IN( sig, name, type, size) _ALLOC2_SIGNAL_IN( sig, name, type, size, iterator_1, iterator_2) 733 #define ALLOC2_SIGNAL_OUT( sig, name, type, size) _ALLOC2_SIGNAL_OUT( sig, name, type, size, iterator_1, iterator_2) 734 735 #define DELETE2_SIGNAL_COND(sig, x1,x2, size, cond) \ 736 do \ 737 { \ 738 for (uint32_t it1=0; it1<x1; it1++) \ 739 { \ 740 for (uint32_t it2=0; it2<x2; it2++) \ 741 { \ 742 if (cond) \ 743 { \ 744 if (size > 0) \ 745 { \ 746 delete sig[it1][it2]; \ 747 } \ 722 748 } \ 723 749 } \ … … 726 752 delete [] sig; \ 727 753 } while (0) 754 755 #define DELETE2_SIGNAL(sig, x1,x2, size) DELETE2_SIGNAL_COND(sig, x1,x2, size,true) 728 756 729 757 #define ALLOC2_FOREIGN_SIGNAL_IN( sig, interface, name, type, size, x1, x2) \ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h
r131 r139 131 131 132 132 public : bool test_map (bool recursive=true); 133 private : bool test_map (uint32_t depth,bool recursive);133 //private : bool test_map (bool recursive); 134 134 135 135 public : void * get_sc_signal (std::string component, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h
r113 r139 79 79 #endif 80 80 81 public : bool test_map ( uint32_t depth,bool top_level, bool is_behavioural);82 // 81 public : bool test_map (bool top_level, bool is_behavioural); 82 //public : bool test_equi (uint32_t depth); 83 83 84 84 #ifdef POSITION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h
r135 r139 248 248 #endif 249 249 250 public : bool test_map (uint32_t depth, bool top_level, bool is_behavioural); 250 public : bool test_map (std::string name_interfaces, 251 bool top_level, 252 bool is_behavioural); 251 253 //public : bool test_equi (uint32_t depth); 252 254 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h
r88 r139 80 80 #endif 81 81 82 public : bool test_map ( uint32_t depth,bool top_level, bool is_behavioural);83 // 82 public : bool test_map (bool top_level, bool is_behavioural); 83 //public : bool test_equi (uint32_t depth); 84 84 85 85 public : friend std::ostream& operator<< (std::ostream& output_stream, -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h
r138 r139 96 96 public : bool presence_testbench (void); 97 97 98 public : bool test_map (uint32_t depth, bool top_level, bool is_behavioural); 98 public : bool test_map (std::string name_interface, 99 bool top_level, 100 bool is_behavioural); 99 101 //public : bool test_equi (uint32_t depth); 100 102 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Stat.h
r138 r139 37 37 typedef struct 38 38 { 39 39 // bool each_cycle; 40 40 counter_t * variable; 41 41 Stat_binary_tree * expression; … … 54 54 private: std::map<std::string, var_t> * _list_operand; 55 55 // Liste chaîné des expressions 56 private: std::list<expr_t> * _list_expr; 56 private: std::list<expr_t> * _list_expr_per_cycle; 57 private: std::list<expr_t> * _list_expr_per_period; 57 58 // List chaîné des "counters" (seulement pour la désallocation) 58 59 private: std::list<counters_t*> * _list_counters; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Types.h
r138 r139 120 120 } Tmanage_event_t; 121 121 122 typedef enum 123 { 124 RAT_NO_SAVE , // Rat without save 125 RAT_ONE_SAVE , // Rat with one save 126 RAT_DEPTH_SAVE // RAT with multiple save (depth) 127 } Trat_scheme_t; 128 122 129 //--------------------------------------------------[ instruction ]----- 123 130 class instruction_t … … 307 314 }; 308 315 316 template<> inline std::string toString<morpheo::behavioural::Trat_scheme_t>(const morpheo::behavioural::Trat_scheme_t& x) 317 { 318 switch (x) 319 { 320 case morpheo::behavioural::RAT_NO_SAVE : return "rat_no_save" ; break; 321 case morpheo::behavioural::RAT_ONE_SAVE : return "rat_one_save" ; break; 322 case morpheo::behavioural::RAT_DEPTH_SAVE : return "rat_depth_save"; break; 323 default : return "" ; break; 324 } 325 }; 326 327 template<> inline morpheo::behavioural::Trat_scheme_t fromString<morpheo::behavioural::Trat_scheme_t>(const std::string& x) 328 { 329 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::RAT_NO_SAVE ))) == 0) or 330 (x.compare(toString( morpheo::behavioural::RAT_NO_SAVE )) == 0)) 331 return morpheo::behavioural::RAT_NO_SAVE; 332 333 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::RAT_ONE_SAVE ))) == 0) or 334 (x.compare(toString( morpheo::behavioural::RAT_ONE_SAVE )) == 0)) 335 return morpheo::behavioural::RAT_ONE_SAVE; 336 337 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::RAT_DEPTH_SAVE))) == 0) or 338 (x.compare(toString( morpheo::behavioural::RAT_DEPTH_SAVE )) == 0)) 339 return morpheo::behavioural::RAT_DEPTH_SAVE; 340 341 throw (ERRORMORPHEO ("fromString","Unknow string : \""+x+"\"")); 342 }; 343 309 344 }; // end namespace morpheo 310 345 #endif
Note: See TracChangeset
for help on using the changeset viewer.