Changeset 529 for soft/giet_vm/giet_drivers/xcu_driver.c
- Timestamp:
- Mar 27, 2015, 11:51:33 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/xcu_driver.c
r496 r529 87 87 unsigned int irq_type ) 88 88 { 89 #if USE_XCU90 89 // parameters checking 91 90 unsigned int x = cluster_xy >> Y_WIDTH; … … 106 105 107 106 _xcu_set_register(cluster_xy, func, channel, value); 108 109 #else110 _printf("[GIET ERROR] _xcu_set_mask() should not be used if USE_XCU not set\n");111 _exit();112 #endif113 107 } 114 108 … … 119 113 unsigned int * irq_type ) 120 114 { 121 #if USE_XCU122 115 // parameters checking 123 116 unsigned int x = cluster_xy >> Y_WIDTH; … … 153 146 *index = 32; 154 147 } 155 156 #else157 _printf("[GIET ERROR] _xcu_get_index should not be used if USE_XCU is not set\n");158 _exit();159 #endif160 148 } 161 149 … … 165 153 unsigned int wdata ) 166 154 { 167 #if USE_XCU168 155 // parameters checking 169 156 unsigned int x = cluster_xy >> Y_WIDTH; … … 174 161 175 162 _xcu_set_register(cluster_xy, XCU_WTI_REG, wti_index, wdata); 176 177 #else178 _printf("[GIET ERROR] _xcu_send_wti() should not be used if USE_XCU is not set\n");179 _exit();180 #endif181 163 } 182 164 … … 186 168 unsigned int wdata ) 187 169 { 188 #if USE_XCU189 170 // parameters checking 190 171 unsigned int x = cluster_xy >> Y_WIDTH; … … 199 180 200 181 _physical_write(paddr, wdata); 201 202 #else 203 _puts("[GIET ERROR] _xcu_send_wti() should not be used if USE_XCU is not set\n"); 204 _exit(); 205 #endif 206 } 182 } 183 207 184 /////////////////////////////////////////////////// 208 185 void _xcu_get_wti_value( unsigned int cluster_xy, … … 210 187 unsigned int * value ) 211 188 { 212 #if USE_XCU213 189 // parameters checking 214 190 unsigned int x = cluster_xy >> Y_WIDTH; … … 219 195 220 196 *value = _xcu_get_register(cluster_xy, XCU_WTI_REG, wti_index); 221 222 #else223 _printf("[GIET ERROR] in _xcu_get_wti_value() USE_XCU is not set\n");224 _exit();225 #endif226 197 } 227 198 … … 230 201 unsigned int * address ) 231 202 { 232 #if USE_XCU 233 if (wti_index >= 32) _exit(); 203 if (wti_index >= 32) _exit(); 234 204 235 205 *address = SEG_XCU_BASE + (XCU_REG(XCU_WTI_REG, wti_index)<<2); 236 237 #else238 _printf("[GIET ERROR] in _xcu_get_wti_address() USE_XCU is not set\n");239 _exit();240 #endif241 206 } 242 207 … … 246 211 unsigned int period ) 247 212 { 248 #if USE_XCU249 213 // parameters checking 250 214 unsigned int x = cluster_xy >> Y_WIDTH; … … 254 218 255 219 _xcu_set_register(cluster_xy, XCU_PTI_PER, pti_index, period); 256 257 #else258 _printf("[GIET ERROR] in _xcu_timer_start() USE_XCU is not set\n");259 _exit();260 #endif261 220 } 262 221 … … 265 224 unsigned int pti_index) 266 225 { 267 #if USE_XCU268 226 // parameters checking 269 227 unsigned int x = cluster_xy >> Y_WIDTH; … … 273 231 274 232 _xcu_set_register(cluster_xy, XCU_PTI_PER, pti_index, 0); 275 276 #else277 _printf("[GIET ERROR] in _xcu_timer_stop() USE_XCU is not set\n");278 _exit();279 #endif280 233 } 281 234 282 235 /////////////////////////////////////////////////////////// 283 unsigned int _xcu_timer_reset_irq( unsigned int cluster_xy, 284 unsigned int pti_index ) 285 { 286 #if USE_XCU 236 void _xcu_timer_reset_irq( unsigned int cluster_xy, 237 unsigned int pti_index ) 238 { 287 239 // parameters checking 288 240 unsigned int x = cluster_xy >> Y_WIDTH; … … 292 244 293 245 // This return value is not used / avoid a compilation warning. 294 return _xcu_get_register(cluster_xy, XCU_PTI_ACK, pti_index); 295 296 #else 297 _puts("[GIET ERROR] in _xcu_timer_reset_irq() USE_XCU is not set\n"); 298 _exit(); 299 return 0; 300 #endif 246 x = _xcu_get_register(cluster_xy, XCU_PTI_ACK, pti_index); 301 247 } 302 248 … … 305 251 unsigned int pti_index ) 306 252 { 307 #if USE_XCU308 253 // parameters checking 309 254 unsigned int x = cluster_xy >> Y_WIDTH; … … 318 263 _xcu_set_register(cluster_xy, XCU_PTI_PER, pti_index, 0); 319 264 _xcu_set_register(cluster_xy, XCU_PTI_PER, pti_index, per); 320 321 #else322 _puts("[GIET ERROR] in _xcu_timer_reset_cpt() USE_XCU is not set\n");323 _exit();324 #endif325 265 } 326 266
Note: See TracChangeset
for help on using the changeset viewer.