Changeset 799 for soft/giet_vm/applications/ocean
- Timestamp:
- Mar 14, 2016, 3:11:45 PM (9 years ago)
- Location:
- soft/giet_vm/applications/ocean
- Files:
-
- 10 added
- 20 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/ocean/ocean.ld
r581 r799 37 37 *(.scommon) 38 38 } 39 . = seg_ldata_base;40 seg_ldata :41 {42 . = ALIGN(0x40);43 *(seg_ldata)44 }45 39 } 46 40 -
soft/giet_vm/applications/ocean/ocean.py
r610 r799 42 42 data_size = 0x00020000 # 128 Kbytes (non replicated) 43 43 44 ldata_base = 0x20200000 # 16 Ko (per cluster)45 ldata_size = 0x0000400046 47 44 stack_base = 0x40000000 48 stack_size = 0x00 200000 # 2 Mbytes (per cluster)45 stack_size = 0x00010000 # 64 Kbytes (per thread) 49 46 50 47 heap_base = 0x60000000 51 heap_size = 0x0 8000000 # 128Mbytes (per cluster)48 heap_size = 0x02000000 # 32 Mbytes (per cluster) 52 49 53 50 # create vspace 54 vspace = mapping.addVspace( name = 'ocean', startname = 'ocean_data' )51 vspace = mapping.addVspace( name = 'ocean', startname = 'ocean_data' , active = True ) 55 52 56 53 # data vseg : shared (only in cluster[0,0]) … … 79 76 for p in xrange( nprocs ): 80 77 proc_id = (((x * y_size) + y) * nprocs) + p 81 size = (stack_size / nprocs) & 0xFFFFF00082 base = stack_base + (proc_id * s ize)78 size = stack_size - 4096 79 base = stack_base + (proc_id * stack_size) 83 80 84 81 mapping.addVseg( vspace, 'ocean_stack_%d_%d_%d' % (x,y,p), 85 82 base, size, 'C_WU', vtype = 'BUFFER', 86 83 x = x , y = y , pseg = 'RAM', 87 local = True , big = True)84 local = True ) 88 85 89 86 # heap vsegs: distributed non local (all heap vsegs can be accessed by all tasks) … … 99 96 local = False, big = True ) 100 97 101 # Local data vsegs: local (one copy in each cluster) 102 for x in xrange (x_size): 103 for y in xrange (y_size): 104 cluster_id = (x * y_size) + y 105 if ( mapping.clusters[cluster_id].procs ): 106 107 mapping.addVseg( vspace, 'ocean_ldata_%d_%d' % (x,y), ldata_base, ldata_size, 108 'C_WU', vtype = 'BUFFER', x = x, y = y, pseg = 'RAM', 109 local = True ) 110 111 # distributed tasks / one task per processor 98 # distribute one thread per processor / main on P[0,0,0] 112 99 for x in xrange (x_size): 113 100 for y in xrange (y_size): … … 115 102 if ( mapping.clusters[cluster_id].procs ): 116 103 for p in xrange( nprocs ): 117 trdid = (((x * y_size) + y) * nprocs) + p 118 if x == 0 and y == 0 and p == 0 : 119 startid=0 120 else : 104 if x == 0 and y == 0 and p == 0 : # main 121 105 startid = 1 106 is_main = True 107 else : # slaves 108 startid = 0 109 is_main = False 122 110 123 mapping.addTask( vspace, 'ocean_%d_%d_%d' % (x,y,p), 124 trdid, x, y, p, 125 'ocean_stack_%d_%d_%d' % (x,y,p), 126 'ocean_heap_%d_%d' % (x,y), startid ) 111 mapping.addThread( vspace, 112 'ocean_%d_%d_%d' % (x,y,p), 113 is_main, 114 x, y, p, 115 'ocean_stack_%d_%d_%d' % (x,y,p), 116 'ocean_heap_%d_%d' % (x,y), 117 startid ) 127 118 128 119 # extend mapping name
Note: See TracChangeset
for help on using the changeset viewer.