Changeset 15 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Constant
- Timestamp:
- Apr 5, 2007, 4:17:30 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Constant/Constant_OpenRISC.h
r2 r15 13 13 namespace behavioural { 14 14 namespace constant { 15 #define _size_instruction 32 16 #define _size_instruction_log2 5 15 17 16 18 //------------------------------------------------------[ Control ]----- 17 typedef bool Tcontrol_t;19 typedef bool Tcontrol_t; 18 20 21 //----------------------------------------------------[ Operation ]----- 22 typedef uint8_t Toperation_t; 23 #define _nb_operation 32 24 #define _size_operation 5 25 26 #define _operation_none 0x0 27 #define _operation_l_adds 0x1 28 #define _operation_l_addu 0x2 29 #define _operation_l_subs 0x3 30 #define _operation_l_and 0x4 31 #define _operation_l_or 0x5 32 #define _operation_l_xor 0x6 33 #define _operation_l_cmove 0x7 34 #define _operation_l_read_imm 0x8 35 #define _operation_l_movhi 0x9 36 #define _operation_l_muls 0xa 37 #define _operation_l_mulu 0xb 38 #define _operation_l_divs 0xc 39 #define _operation_l_divu 0xd 40 #define _operation_l_exts 0xe 41 #define _operation_l_extz 0xf 42 #define _operation_l_ff1 0x10 43 #define _operation_l_fl1 0x11 44 #define _operation_l_sll 0x12 45 #define _operation_l_sla 0x13 46 #define _operation_l_srl 0x14 47 #define _operation_l_ror 0x15 48 #define _operation_l_cmp_eq 0x16 49 #define _operation_l_cmp_ne 0x17 50 #define _operation_l_cmp_ges 0x18 51 #define _operation_l_cmp_geu 0x19 52 #define _operation_l_cmp_gts 0x1a 53 #define _operation_l_cmp_gtu 0x1b 54 #define _operation_l_cmp_les 0x1c 55 #define _operation_l_cmp_leu 0x1d 56 #define _operation_l_cmp_lts 0x1e 57 #define _operation_l_cmp_ltu 0x1f 58 59 //--------------------------------------------------[ destination ]----- 60 typedef uint8_t Tdestination1_t; 61 #define _size_destination1 4 62 63 #define cst_DESTINATION1_NONE 0x0 64 #define mask_DESTINATION1_GPR 0x1 65 #define mask_DESTINATION1_MEMORY 0x2 66 #define mask_DESTINATION1_SPR 0x4 67 #define mask_DESTINATION1_MAC_UNIT 0x8 68 69 typedef uint8_t Tdestination2_t; 70 #define _size_destination2 3 71 72 #define cst_DESTINATION2_NONE 0x0 73 #define mask_DESTINATION2_COMMIT 0x1 74 #define mask_DESTINATION2_MEMORY 0x2 75 #define mask_DESTINATION2_SPR 0x4 76 77 //----------------------------------------------------[ exec_flag ]----- 78 typedef uint8_t Texec_flag_t; 79 #define _size_exec_flag 2 80 81 #define mask_EXEC_FLAG_NONE 0x1 82 #define mask_EXEC_FLAG_CARRY 0x1 83 #define mask_EXEC_FLAG_FLAG 0x1 84 #define mask_EXEC_FLAG_OVERFLOW 0x2 85 86 //---------------------------------------------------[ exec_excep ]----- 87 typedef bool Texec_excep_t; 88 #define _size_exec_excep 1 89 90 #define mask_EXEC_EXCEP_NONE 0x0 91 #define mask_EXEC_EXCEP_RANGE 0x1 92 19 93 //----------------------------------------------------[ Condition ]----- 20 typedef uint8_t Tcondition_t; 94 typedef uint8_t Tcondition_t; 95 #define _size_condition 3 21 96 22 const Tcondition_t cst_CONDITION_NONE = 0x0; // None condition (jump) 23 const Tcondition_t cst_CONDITION_F = 0x2; // Branch if Flag is set 24 const Tcondition_t cst_CONDITION_NF = 0x3; // Branch if Flag is clear 25 const Tcondition_t cst_CONDITION_REG = 0x4; // Branch if a register is read 26 const Tcondition_t cst_CONDITION_STACK = 0x8; // Branch with pop in stack pointer 97 #define cst_CONDITION_UNCONDITIONAL 0x0 // None condition (jump) 98 #define mask_CONDITION_CONDITIONAL 0x2 99 #define mask_CONDITION_CONDITIONAL_NF 0x0 // Branch if Flag is clear 100 #define mask_CONDITION_CONDITIONAL_F 0x1 // Branch if Flag is set 101 #define mask_CONDITION_REG 0x4 // Branch if a register is read 102 #define mask_CONDITION_STACK 0x8 // Branch with pop in stack pointer 27 103 28 104 //-------------------------------------------------[ branch_state ]----- 29 typedef uint8_t Tbranch_state_t;105 typedef uint8_t Tbranch_state_t; 30 106 31 const Tbranch_state_t cst_BRANCH_STATE_NONE = 0x0; // 0 0 32 const Tbranch_state_t cst_BRANCH_STATE_NSPEC_TAKE = 0x1; // 0 1 -> incondionnal 33 const Tbranch_state_t cst_BRANCH_STATE_SPEC_NTAKE = 0x2; // 1 0 34 const Tbranch_state_t cst_BRANCH_STATE_SPEC_TAKE = 0x3; // 1 1 35 107 #define cst_BRANCH_STATE_NONE 0x0 // 0 0 108 #define cst_BRANCH_STATE_NSPEC_TAKE 0x1 // 0 1 -> incondionnal 109 #define cst_BRANCH_STATE_SPEC_NTAKE 0x2 // 1 0 110 #define cst_BRANCH_STATE_SPEC_TAKE 0x3 // 1 1 36 111 37 112 }; // end namespace constant
Note: See TracChangeset
for help on using the changeset viewer.