Changeset 320 for soft/giet_vm/giet_drivers/icu_driver.c
- Timestamp:
- Jun 10, 2014, 12:33:23 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/icu_driver.c
r295 r320 15 15 //////////////////////////////////////////////////////////////////////////////// 16 16 // The virtual base address of the segment associated to the component is: 17 // SEG_ICU_BASE + cluster_xy * VSEG_CLUSTER_INCREMENT 17 18 // 18 // seg_icu_base + cluster_xy * vseg_cluster_increment 19 // 20 // The seg_icu_base and vseg_cluster_increment values must be defined 21 // in giet_vsegs.ld file. 19 // SEG_ICU_BASE and VSEG_CLUSTER_INCREMENT must be defined in hard_config.h 22 20 //////////////////////////////////////////////////////////////////////////////// 23 21 … … 47 45 #endif 48 46 49 #if !defined( USE_XICU ) 50 # error: You must define USE_XICU in the hard_config.h file 47 #if !defined( USE_XCU ) 48 # error: You must define USE_XCU in the hard_config.h file 49 #endif 50 51 #if !defined(SEG_ICU_BASE) 52 # error: You must define SEG_ICU_BASE in the hard_config.h file 53 #endif 54 55 #if !defined(VSEG_CLUSTER_INCREMENT) 56 # error: You must define VSEG_CLUSTER_INCREMENT in the hard_config.h file 51 57 #endif 52 58 … … 69 75 if (proc_id >= NB_PROCS_MAX) return 1; 70 76 71 #if USE_X ICU77 #if USE_XCU 72 78 _printf("[GIET ERROR] _icu_set_mask() should not be used if USE_XICU is set\n"); 73 79 return 1; 74 80 #else 75 unsigned int * icu_address = (unsigned int *) ( (unsigned int)&seg_icu_base+76 (cluster_xy * (unsigned int)&vseg_cluster_increment));81 unsigned int * icu_address = (unsigned int *) ( SEG_ICU_BASE + 82 (cluster_xy * VSEG_CLUSTER_INCREMENT) ); 77 83 icu_address[proc_id * ICU_SPAN + ICU_MASK_SET] = value; 78 84 return 0; … … 97 103 if (proc_id >= NB_PROCS_MAX) return 1; 98 104 99 #if USE_X ICU105 #if USE_XCU 100 106 _printf("[GIET ERROR] _icu_set_mask() should not be used if USE_XICU is set\n"); 101 107 return 1; 102 108 #else 103 unsigned int * icu_address = (unsigned int *) ((unsigned int)&seg_icu_base+104 (cluster_xy * (unsigned int)&vseg_cluster_increment));109 unsigned int * icu_address = (unsigned int *) ( SEG_ICU_BASE + 110 (cluster_xy * VSEG_CLUSTER_INCREMENT) ); 105 111 *buffer = icu_address[proc_id * ICU_SPAN + ICU_IT_VECTOR]; 106 112 return 0;
Note: See TracChangeset
for help on using the changeset viewer.