Changeset 97 for trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Timestamp:
- Dec 19, 2008, 4:34:00 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Constants.h
r88 r97 16 16 [0][19] - SPR_CID 17 17 */ 18 19 #include "Common/include/ToString.h" 18 20 19 21 namespace morpheo { … … 33 35 34 36 //=========================================================[ Type ]===== 35 # define TYPE_ALU 0x0 // 00000 - unit multiple 36 # define TYPE_SHIFT 0x1 // 00000 - unit multiple 37 # define TYPE_MOVE 0x2 // 00000 - unit multiple 38 # define TYPE_TEST 0x3 // 00000 - unit multiple 39 # define TYPE_MUL 0x4 // 00000 - unit multiple 40 # define TYPE_DIV 0x5 // 00000 - unit multiple, type optionnal 41 # define TYPE_EXTEND 0x6 // 00000 - unit multiple, type optionnal 42 # define TYPE_FIND 0x7 // 00000 - unit multiple, type optionnal 43 # define TYPE_SPECIAL 0x8 // 00000 - unit uniq 44 # define TYPE_CUSTOM 0x9 // 00000 - unit uniq , type optionnal 45 # define TYPE_BRANCH 0xa // 00000 - unit multiple 46 # define TYPE_MEMORY 0xb // 00000 - unit uniq 37 typedef enum 38 { 39 TYPE_ALU = 0x0, // 00000 - unit multiple 40 TYPE_SHIFT = 0x1, // 00000 - unit multiple 41 TYPE_MOVE = 0x2, // 00000 - unit multiple 42 TYPE_TEST = 0x3, // 00000 - unit multiple 43 TYPE_MUL = 0x4, // 00000 - unit multiple 44 TYPE_DIV = 0x5, // 00000 - unit multiple, type optionnal 45 TYPE_EXTEND = 0x6, // 00000 - unit multiple, type optionnal 46 TYPE_FIND = 0x7, // 00000 - unit multiple, type optionnal 47 TYPE_SPECIAL = 0x8, // 00000 - unit uniq 48 TYPE_CUSTOM = 0x9, // 00000 - unit uniq , type optionnal 49 TYPE_BRANCH = 0xa, // 00000 - unit multiple 50 TYPE_MEMORY = 0xb // 00000 - unit uniq 51 } type_t; 47 52 48 53 //#define NB_TYPE 11 … … 610 615 611 616 # define SIZE_BRANCH_CONDITION 4 612 613 # define BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK 0x0 // None condition (jump) 614 # define BRANCH_CONDITION_NONE_WITH_WRITE_STACK 0x8 // None condition (jump) 615 # define BRANCH_CONDITION_FLAG_UNSET 0x2 // Branch if Flag is clear 616 # define BRANCH_CONDITION_FLAG_SET 0x3 // Branch if Flag is set 617 # define BRANCH_CONDITION_READ_REGISTER_WITHOUT_WRITE_STACK 0x4 // Branch if a register is read 618 # define BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK 0xc // Branch if a register is read 619 # define BRANCH_CONDITION_READ_STACK 0xf // Branch with pop in stack pointer 620 617 # define MAX_BRANCH_CONDITION (1<<SIZE_BRANCH_CONDITION) 618 typedef enum 619 { 620 BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK = 0x0, // None condition (jump) 621 BRANCH_CONDITION_NONE_WITH_WRITE_STACK = 0x8, // None condition (jump) 622 BRANCH_CONDITION_FLAG_UNSET = 0x2, // Branch if Flag is clear 623 BRANCH_CONDITION_FLAG_SET = 0x3, // Branch if Flag is set 624 BRANCH_CONDITION_READ_REGISTER_WITHOUT_WRITE_STACK = 0x4, // Branch if a register is read 625 BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK = 0xc, // Branch if a register is read 626 BRANCH_CONDITION_READ_STACK = 0xf // Branch with pop in stack pointer 627 } branch_condition_t; 628 629 # define is_branch_condition_valid(x) \ 630 (( x == BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK ) or \ 631 ( x == BRANCH_CONDITION_NONE_WITH_WRITE_STACK ) or \ 632 ( x == BRANCH_CONDITION_FLAG_UNSET ) or \ 633 ( x == BRANCH_CONDITION_FLAG_SET ) or \ 634 ( x == BRANCH_CONDITION_READ_REGISTER_WITHOUT_WRITE_STACK) or \ 635 ( x == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK ) or \ 636 ( x == BRANCH_CONDITION_READ_STACK )) 637 638 639 /* 640 enum 641 { 642 BRANCH_TYPE_SEQUENTIAL, 643 BRANCH_TYPE_JUMP, 644 BRANCH_TYPE_CONDITIONNAL, 645 BRANCH_TYPE_REGISTER, 646 BRANCH_TYPE_CALL, 647 BRANCH_TYPE_RETURN, 648 NB_BRANCH_TYPE 649 }; 650 651 # define branch_condition_to_type(x) \ 652 (x == BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK )?BRANCH_TYPE_JUMP: \ 653 ((x == BRANCH_CONDITION_NONE_WITH_WRITE_STACK )?BRANCH_TYPE_CALL: \ 654 ((x == BRANCH_CONDITION_FLAG_UNSET )?BRANCH_TYPE_CONDITIONNAL: \ 655 ((x == BRANCH_CONDITION_FLAG_SET )?BRANCH_TYPE_CONDITIONNAL: \ 656 ((x == BRANCH_CONDITION_READ_REGISTER_WITHOUT_WRITE_STACK)?BRANCH_TYPE_REGISTER: \ 657 ((x == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK )?BRANCH_TYPE_CALL: \ 658 ((x == BRANCH_CONDITION_READ_STACK )?BRANCH_TYPE_RETURN:BRANCH_TYPE_SEQUENTIAL)))))); 659 */ 660 621 661 //--------------------------------------------------[ instruction ]----- 622 662 # define NB_INSTRUCTION 213 // 92 ORBIS, 30 ORFPX (15 simple, 15 double), 91 ORVDX (38 on byte, 41 on half, 12 independant format) … … 991 1031 992 1032 }; // end namespace behavioural 1033 1034 template<> inline std::string toString<morpheo::behavioural::type_t>(const morpheo::behavioural::type_t& x) 1035 { 1036 switch (x) 1037 { 1038 case morpheo::behavioural::TYPE_ALU : return "ALU" ; 1039 case morpheo::behavioural::TYPE_SHIFT : return "SHIFT" ; 1040 case morpheo::behavioural::TYPE_MOVE : return "MOVE" ; 1041 case morpheo::behavioural::TYPE_TEST : return "TEST" ; 1042 case morpheo::behavioural::TYPE_MUL : return "MUL" ; 1043 case morpheo::behavioural::TYPE_DIV : return "DIV" ; 1044 case morpheo::behavioural::TYPE_EXTEND : return "EXTEND" ; 1045 case morpheo::behavioural::TYPE_FIND : return "FIND" ; 1046 case morpheo::behavioural::TYPE_SPECIAL : return "SPECIAL" ; 1047 case morpheo::behavioural::TYPE_CUSTOM : return "CUSTOM" ; 1048 case morpheo::behavioural::TYPE_BRANCH : return "BRANCH" ; 1049 case morpheo::behavioural::TYPE_MEMORY : return "MEMORY" ; 1050 default : return ""; 1051 } 1052 }; 1053 1054 template<> inline std::string toString<morpheo::behavioural::branch_condition_t>(const morpheo::behavioural::branch_condition_t& x) 1055 { 1056 switch (x) 1057 { 1058 case morpheo::behavioural::BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK : return "none_without_write_stack" ; 1059 case morpheo::behavioural::BRANCH_CONDITION_NONE_WITH_WRITE_STACK : return "none_with_write_stack" ; 1060 case morpheo::behavioural::BRANCH_CONDITION_FLAG_UNSET : return "flag_unset" ; 1061 case morpheo::behavioural::BRANCH_CONDITION_FLAG_SET : return "flag_set" ; 1062 case morpheo::behavioural::BRANCH_CONDITION_READ_REGISTER_WITHOUT_WRITE_STACK : return "read_register_without_write_stack"; 1063 case morpheo::behavioural::BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK : return "read_register_with_write_stack" ; 1064 case morpheo::behavioural::BRANCH_CONDITION_READ_STACK : return "read_stack" ; 1065 default : return ""; 1066 } 1067 }; 1068 993 1069 }; // end namespace morpheo 994 1070 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Types.h
r88 r97 152 152 153 153 }; // end namespace behavioural 154 155 inline std::string toString_type(const morpheo::behavioural::Ttype_t& x)156 {157 switch (x)158 {159 case TYPE_ALU : return "ALU" ; break;160 case TYPE_SHIFT : return "SHIFT" ; break;161 case TYPE_MOVE : return "MOVE" ; break;162 case TYPE_TEST : return "TEST" ; break;163 case TYPE_MUL : return "MUL" ; break;164 case TYPE_DIV : return "DIV" ; break;165 case TYPE_EXTEND : return "EXTEND" ; break;166 case TYPE_FIND : return "FIND" ; break;167 case TYPE_SPECIAL : return "SPECIAL" ; break;168 case TYPE_CUSTOM : return "CUSTOM" ; break;169 case TYPE_BRANCH : return "BRANCH" ; break;170 case TYPE_MEMORY : return "MEMORY" ; break;171 default : return "Unknow type"; break;172 }173 };174 154 175 155 template<> inline std::string toString<morpheo::behavioural::Tpriority_t>(const morpheo::behavioural::Tpriority_t& x) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h
r96 r97 10 10 #define MORPHEO_MAJOR_VERSION 0 11 11 #define MORPHEO_MINOR_VERSION 2 12 #define MORPHEO_REVISION "9 6"12 #define MORPHEO_REVISION "97" 13 13 #define MORPHEO_CODENAME "Castor" 14 14 15 #define MORPHEO_DATE_DAY "1 6"15 #define MORPHEO_DATE_DAY "19" 16 16 #define MORPHEO_DATE_MONTH "12" 17 17 #define MORPHEO_DATE_YEAR "2008" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl.h
r95 r97 23 23 namespace behavioural { 24 24 25 std::string std_logic (uint32_t size); 26 std::string std_logic_conv (uint32_t size, std::string value); 27 std::string std_logic_conv (uint32_t size, uint32_t value); 28 std::string std_logic_cst (uint32_t size, uint32_t value); 29 std::string std_logic_range (uint32_t size, uint32_t max , uint32_t min , bool force=false); 30 std::string std_logic_range ( uint32_t max , uint32_t min , bool force=false); 31 std::string std_logic_range (uint32_t size, bool force=false); 32 std::string std_logic_others (uint32_t size, bool cst); 25 std::string std_logic (uint32_t size); 26 std::string std_logic_conv (uint32_t size, std::string value); 27 std::string std_logic_conv (uint32_t size, uint32_t value); 28 std::string std_logic_cst (uint32_t size, uint32_t value); 29 std::string std_logic_range (uint32_t size, uint32_t max , uint32_t min ); 30 std::string std_logic_range ( uint32_t max , uint32_t min ); 31 std::string std_logic_range (uint32_t size ); 32 std::string _std_logic_range (uint32_t size, uint32_t max , uint32_t min ); 33 std::string _std_logic_range ( uint32_t max , uint32_t min ); 34 std::string _std_logic_range (uint32_t size ); 35 std::string std_logic_others (uint32_t size, bool cst); 33 36 34 37 class Vhdl
Note: See TracChangeset
for help on using the changeset viewer.