Changeset 76 for trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Timestamp:
- Feb 2, 2008, 12:39:01 PM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h
r73 r76 41 41 } 42 42 #define ALLOC_SIGNAL_IN( sig, name, type, size) \ 43 { \ 44 sig = interface->set_signal_in <type> (name, size); \ 45 } 43 if (size > 0) \ 44 { \ 45 sig = interface->set_signal_in <type> (name, size); \ 46 } 46 47 #define ALLOC_SIGNAL_OUT( sig, name, type, size) \ 47 { \ 48 sig = interface->set_signal_out<type> (name, size); \ 49 } 48 if (size > 0) \ 49 { \ 50 sig = interface->set_signal_out<type> (name, size); \ 51 } 50 52 51 53 #define ALLOC_SC_SIGNAL( sig, name, type) \ … … 61 63 #ifdef POSITION 62 64 #define ALLOC1_INTERFACE( name, direction, localisation, str, it1) \ 63 Interface_fifo * interface [it1]; \ 65 const uint32_t iterator_1 = it1; \ 66 Interface_fifo * interface [iterator_1]; \ 64 67 { \ 65 68 std::string separator="_"; \ 66 for (uint32_t i=0; i<it 1; i++)\69 for (uint32_t i=0; i<iterator_1; i++) \ 67 70 { \ 68 71 interface [i] = _interfaces->set_interface( name+separator+toString(i), direction, localisation, str); \ … … 71 74 #else 72 75 #define ALLOC1_INTERFACE( name, direction, localisation, str, it1) \ 73 Interface_fifo * interface [it1]; \ 76 const uint32_t iterator_1 = it1; \ 77 Interface_fifo * interface [iterator_1]; \ 74 78 { \ 75 79 std::string separator="_"; \ 76 for (uint32_t i=0; i<it 1; i++)\80 for (uint32_t i=0; i<iterator_1; i++) \ 77 81 { \ 78 82 interface [i] = _interfaces->set_interface( name+separator+toString(i)); \ … … 82 86 83 87 84 #define ALLOC1_VALACK_IN( sig, name, type , it1) \88 #define ALLOC1_VALACK_IN( sig, name, type) \ 85 89 { \ 86 sig = new SC_IN (Tcontrol_t) * [it 1];\87 for (uint32_t i=0; i<it 1; i++)\90 sig = new SC_IN (Tcontrol_t) * [iterator_1]; \ 91 for (uint32_t i=0; i<iterator_1; i++) \ 88 92 { \ 89 93 sig [i] = interface[i]->set_signal_valack_in (name, type); \ 90 94 } \ 91 95 } 92 #define ALLOC1_VALACK_OUT(sig, name, type , it1) \96 #define ALLOC1_VALACK_OUT(sig, name, type) \ 93 97 { \ 94 sig = new SC_OUT(Tcontrol_t) * [it 1];\95 for (uint32_t i=0; i<it 1; i++)\98 sig = new SC_OUT(Tcontrol_t) * [iterator_1]; \ 99 for (uint32_t i=0; i<iterator_1; i++) \ 96 100 { \ 97 101 sig [i] = interface[i]->set_signal_valack_out(name, type); \ 98 102 } \ 99 103 } 100 #define ALLOC1_VAL_IN( sig , it1)\104 #define ALLOC1_VAL_IN( sig) \ 101 105 { \ 102 sig = new SC_IN (Tcontrol_t) * [it 1];\103 for (uint32_t i=0; i<it 1; i++)\106 sig = new SC_IN (Tcontrol_t) * [iterator_1]; \ 107 for (uint32_t i=0; i<iterator_1; i++) \ 104 108 { \ 105 109 sig [i] = interface[i]->set_signal_valack_in (VAL); \ 106 110 } \ 107 111 } 108 #define ALLOC1_VAL_OUT( sig , it1)\112 #define ALLOC1_VAL_OUT( sig) \ 109 113 { \ 110 sig = new SC_OUT(Tcontrol_t) * [it 1];\111 for (uint32_t i=0; i<it 1; i++)\114 sig = new SC_OUT(Tcontrol_t) * [iterator_1]; \ 115 for (uint32_t i=0; i<iterator_1; i++) \ 112 116 { \ 113 117 sig [i] = interface[i]->set_signal_valack_out(VAL); \ 114 118 } \ 115 119 } 116 #define ALLOC1_ACK_IN( sig , it1)\120 #define ALLOC1_ACK_IN( sig) \ 117 121 { \ 118 sig = new SC_IN (Tcontrol_t) * [it 1];\119 for (uint32_t i=0; i<it 1; i++)\122 sig = new SC_IN (Tcontrol_t) * [iterator_1]; \ 123 for (uint32_t i=0; i<iterator_1; i++) \ 120 124 { \ 121 125 sig [i] = interface[i]->set_signal_valack_in (ACK); \ 122 126 } \ 123 127 } 124 #define ALLOC1_ACK_OUT( sig , it1)\128 #define ALLOC1_ACK_OUT( sig) \ 125 129 { \ 126 sig = new SC_OUT(Tcontrol_t) * [it 1];\127 for (uint32_t i=0; i<it 1; i++)\130 sig = new SC_OUT(Tcontrol_t) * [iterator_1]; \ 131 for (uint32_t i=0; i<iterator_1; i++) \ 128 132 { \ 129 133 sig [i] = interface[i]->set_signal_valack_out(ACK); \ 130 134 } \ 131 135 } 132 #define ALLOC1_SIGNAL_IN( sig, name, type, size, it1) \ 133 { \ 134 sig = new SC_IN (type) * [it1]; \ 135 for (uint32_t i=0; i<it1; i++) \ 136 { \ 137 sig [i] = interface[i]->set_signal_in <type> (name, size); \ 138 } \ 139 } 136 #define ALLOC1_SIGNAL_IN( sig, name, type, size) \ 137 if (size > 0) \ 138 { \ 139 sig = new SC_IN (type) * [iterator_1]; \ 140 for (uint32_t i=0; i<iterator_1; i++) \ 141 { \ 142 sig [i] = interface[i]->set_signal_in <type> (name, size); \ 143 } \ 144 } 140 145 141 #define ALLOC1_SIGNAL_OUT(sig, name, type, size, it1) \ 142 { \ 143 sig = new SC_OUT(type) * [it1]; \ 144 for (uint32_t i=0; i<it1; i++) \ 145 { \ 146 sig [i] = interface[i]->set_signal_out<type> (name, size); \ 147 } \ 148 } 146 #define ALLOC1_SIGNAL_OUT(sig, name, type, size) \ 147 if (size > 0) \ 148 { \ 149 sig = new SC_OUT(type) * [iterator_1]; \ 150 for (uint32_t i=0; i<iterator_1; i++) \ 151 { \ 152 sig [i] = interface[i]->set_signal_out<type> (name, size); \ 153 } \ 154 } 149 155 150 156 #define ALLOC1_SC_SIGNAL( sig, name, type, it1) \ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Constants.h
r72 r76 6 6 7 7 //=========================================================[ Type ]===== 8 # define TYPE_ALU 0x0 // 000000 - unit multiple 9 # define TYPE_BRANCH 0x1 // 000001 - unit multiple, to a special routing 10 # define TYPE_MEMORY 0x2 // 000010 - unit uniq 11 # define TYPE_MAC 0x4 // 000100 - unit uniq 12 # define TYPE_TIMER 0x8 // 001000 - unit uniq 13 # define TYPE_CUSTOM 0x10 // 010000 - unit uniq 8 # define TYPE_ALU 0x0 // 00000 - unit multiple 9 # define TYPE_SHIFT 0x1 // 00000 - unit multiple 10 # define TYPE_MOVE 0x2 // 00000 - unit multiple 11 # define TYPE_TEST 0x3 // 00000 - unit multiple 12 # define TYPE_MUL_DIV 0x4 // 00000 - unit multiple, type optionnal 13 # define TYPE_EXTEND 0x5 // 00000 - unit multiple, type optionnal 14 # define TYPE_FIND 0x6 // 00000 - unit multiple, type optionnal 15 # define TYPE_SPECIAL 0x7 // 00000 - unit uniq 16 # define TYPE_CUSTOM 0x8 // 00000 - unit uniq 17 # define TYPE_BRANCH 0x9 // 00000 - unit multiple, to a special routing 18 # define TYPE_MEMORY 0xa // 00000 - unit uniq 19 # define MAX_TYPE 0x10 // 00000 - unit uniq 14 20 15 21 //====================================================[ Operation ]===== … … 116 122 117 123 //---------------------------------------------[ Functionnal Unit ]----- 118 # define OPERATION_ALU_L_ADD 0x0 // 000_0000 l.add , l.addi 119 # define OPERATION_ALU_L_ADDC 0x1 // 000_0000 l.addc , l.addic 120 # define OPERATION_ALU_L_SUB 0x2 // 000_0000 l.sub 121 # define OPERATION_ALU_L_MUL 0x3 // 000_0000 l.mul , l.muli 122 # define OPERATION_ALU_L_MULU 0x4 // 000_0000 l.mulu 123 # define OPERATION_ALU_L_DIV 0x5 // 000_0000 l.div 124 # define OPERATION_ALU_L_DIVU 0x6 // 000_0000 l.divu 125 # define OPERATION_ALU_L_AND 0x7 // 000_0000 l.and , l.andi 126 # define OPERATION_ALU_L_OR 0x8 // 000_0000 l.or , l.ori 127 # define OPERATION_ALU_L_XOR 0x9 // 000_0000 l.xor , l.xori 128 # define OPERATION_ALU_L_TEST_F 0xa // 000_0000 l.bf 129 # define OPERATION_ALU_L_TEST_NF 0xb // 000_0000 l.bnf 130 # define OPERATION_ALU_L_JALR 0xc // 000_0000 l.jal , l.jalr , l.jr 131 # define OPERATION_ALU_L_SLL 0xd // 000_0000 l.sll , l.slli 132 # define OPERATION_ALU_L_SRA 0xe // 000_0000 l.sra , l.srai 133 # define OPERATION_ALU_L_SRL 0xf // 000_0000 l.srl , l.srli 134 # define OPERATION_ALU_L_ROR 0x10 // 000_0000 l.ror , l.rori 135 # define OPERATION_ALU_L_MOVHI 0x11 // 000_0000 l.movhi 136 # define OPERATION_ALU_L_EXTEND_S 0x12 // 000_0000 l.extbs , l.exths, l.extws 137 # define OPERATION_ALU_L_EXTEND_Z 0x13 // 000_0000 l.extbz , l.exthz, l.extwz 138 # define OPERATION_ALU_L_CMOV 0x14 // 000_0000 l.cmov 139 # define OPERATION_ALU_L_FF1 0x15 // 000_0000 l.ff1 140 # define OPERATION_ALU_L_FL1 0x16 // 000_0000 l.fl1 141 # define OPERATION_ALU_L_MFSPR 0x17 // 000_0000 l.mfspr 142 # define OPERATION_ALU_L_MTSPR 0x18 // 000_0000 l.mtspr 143 # define OPERATION_ALU_L_SFGES 0x19 // 000_0000 l.sfges , l.sfges 144 # define OPERATION_ALU_L_SFGEU 0x1a // 000_0000 l.sfgeu , l.sfgeu 145 # define OPERATION_ALU_L_SFGTS 0x1b // 000_0000 L.sfgts , l.sfgts 146 # define OPERATION_ALU_L_SFGTU 0x1c // 000_0000 l.sfgtu , l.sfgtu 147 # define OPERATION_ALU_L_SFLES 0x1d // 000_0000 l.sfles , l.sfles 148 # define OPERATION_ALU_L_SFLEU 0x1e // 000_0000 l.sfleu , l.sfleu 149 # define OPERATION_ALU_L_SFLTS 0x1f // 000_0000 l.sflts , l.sflts 150 # define OPERATION_ALU_L_SFLTU 0x20 // 000_0000 l.sfltu , l.sfltu 151 # define OPERATION_ALU_L_SFEQ 0x21 // 000_0000 l.sfeq , l.sfeqi 152 # define OPERATION_ALU_L_SFNE 0x22 // 000_0000 l.sfne , l.sfnei 153 # define OPERATION_ALU_L_MAC 0x23 // 000_0000 l.mac , l.maci 154 # define OPERATION_ALU_L_MACRC 0x24 // 000_0000 l.macrc 155 # define OPERATION_ALU_L_MSB 0x25 // 000_0000 l.msb 124 # define OPERATION_ALU_L_ADD 0x1 // 000_0000 l.add , l.addi 125 # define OPERATION_ALU_L_ADDC 0x2 // 000_0000 l.addc , l.addic 126 # define OPERATION_ALU_L_SUB 0x4 // 000_0000 l.sub 127 # define OPERATION_ALU_L_AND 0x8 // 000_0000 l.and , l.andi 128 # define OPERATION_ALU_L_OR 0x10 // 000_0000 l.or , l.ori 129 # define OPERATION_ALU_L_XOR 0x20 // 000_0000 l.xor , l.xori 130 131 # define OPERATION_SHIFT_L_SLL 0x1 // 000_0000 l.sll , l.slli 132 # define OPERATION_SHIFT_L_SRA 0x2 // 000_0000 l.sra , l.srai 133 # define OPERATION_SHIFT_L_SRL 0x4 // 000_0000 l.srl , l.srli 134 # define OPERATION_SHIFT_L_ROR 0x8 // 000_0000 l.ror , l.rori 135 136 # define OPERATION_MOVE_L_MOVHI 0x1 // 000_0000 l.movhi 137 # define OPERATION_MOVE_L_CMOV 0x2 // 000_0000 l.cmov 138 139 # define OPERATION_TEST_L_SFGES 0x41 // 000_0000 l.sfges , l.sfges 140 # define OPERATION_TEST_L_SFGEU 0x1 // 000_0000 l.sfgeu , l.sfgeu 141 # define OPERATION_TEST_L_SFGTS 0x42 // 000_0000 L.sfgts , l.sfgts 142 # define OPERATION_TEST_L_SFGTU 0x2 // 000_0000 l.sfgtu , l.sfgtu 143 # define OPERATION_TEST_L_SFLES 0x44 // 000_0000 l.sfles , l.sfles 144 # define OPERATION_TEST_L_SFLEU 0x4 // 000_0000 l.sfleu , l.sfleu 145 # define OPERATION_TEST_L_SFLTS 0x48 // 000_0000 l.sflts , l.sflts 146 # define OPERATION_TEST_L_SFLTU 0x8 // 000_0000 l.sfltu , l.sfltu 147 # define OPERATION_TEST_L_SFEQ 0x10 // 000_0000 l.sfeq , l.sfeqi 148 # define OPERATION_TEST_L_SFNE 0x20 // 000_0000 l.sfne , l.sfnei 149 150 # define OPERATION_MUL_DIV_L_MUL 0x1 // 000_0000 l.mul , l.muli 151 # define OPERATION_MUL_DIV_L_MULU 0x2 // 000_0000 l.mulu 152 # define OPERATION_MUL_DIV_L_DIV 0x4 // 000_0000 l.div 153 # define OPERATION_MUL_DIV_L_DIVU 0x8 // 000_0000 l.divu 154 155 # define OPERATION_EXTEND_L_EXTEND_Z 0x1 // 000_0000 l.extbz , l.exthz, l.extwz 156 # define OPERATION_EXTEND_L_EXTEND_S 0x2 // 000_0000 l.extbs , l.exths, l.extws 157 158 # define OPERATION_FIND_L_FF1 0x1 // 000_0000 l.ff1 159 # define OPERATION_FIND_L_FL1 0x2 // 000_0000 l.fl1 160 161 # define OPERATION_SPECIAL_L_MFSPR 0x1 // 000_0000 l.mfspr 162 # define OPERATION_SPECIAL_L_MTSPR 0x2 // 000_0000 l.mtspr 163 # define OPERATION_SPECIAL_L_MAC 0x4 // 000_0000 l.mac , l.maci 164 # define OPERATION_SPECIAL_L_MACRC 0x8 // 000_0000 l.macrc 165 # define OPERATION_SPECIAL_L_MSB 0x10 // 000_0000 l.msb 166 167 # define OPERATION_BRANCH_L_TEST_NF 0x1 // 000_0000 l.bnf 168 # define OPERATION_BRANCH_L_TEST_F 0x2 // 000_0000 l.bf 169 # define OPERATION_BRANCH_L_JALR 0x4 // 000_0000 l.jal , l.jalr , l.jr 156 170 157 171 //-------------------------------------------------------[ Custom ]-----
Note: See TracChangeset
for help on using the changeset viewer.