Changeset 805 for soft/giet_vm/applications/rosenfeld/rosenfeld.py
- Timestamp:
- Mar 15, 2016, 6:35:28 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/rosenfeld/rosenfeld.py
r798 r805 25 25 26 26 ######################### 27 def extend( mapping):27 def extend(mapping): 28 28 29 29 x_size = mapping.x_size … … 59 59 for y in xrange (y_size): 60 60 cluster_id = (x * y_size) + y 61 if ( mapping.clusters[cluster_id].procs):61 if (mapping.clusters[cluster_id].procs): 62 62 63 63 mapping.addVseg( vspace, 'rosen_code_%d_%d' %(x,y), … … 71 71 for y in xrange (y_size): 72 72 cluster_id = (x * y_size) + y 73 if ( mapping.clusters[cluster_id].procs):74 for p in xrange( nprocs):73 if (mapping.clusters[cluster_id].procs): 74 for p in xrange(nprocs): 75 75 proc_id = (((x * y_size) + y) * nprocs) + p 76 76 size = (stack_size / nprocs) & 0xFFFFF000 … … 86 86 for y in xrange (y_size): 87 87 cluster_id = (x * y_size) + y 88 if ( mapping.clusters[cluster_id].procs):89 size 90 base 88 if (mapping.clusters[cluster_id].procs): 89 size = heap_size 90 base = heap_base + (cluster_id * size) 91 91 92 mapping.addVseg( vspace, 'rosen_heap_%d_%d' % (x,y), base, size,93 94 92 mapping.addVseg(vspace, 'rosen_heap_%d_%d' % (x, y), base, size, 93 'C_WU', vtype = 'HEAP', x = x, y = y, pseg = 'RAM', 94 local = False, big = True ) 95 95 96 96 # distributed tasks / one task per processor 97 #for x in xrange (x_size): 98 # for y in xrange (y_size): 99 # cluster_id = (x * y_size) + y 100 # if ( mapping.clusters[cluster_id].procs ): 101 # for p in xrange( nprocs ): 102 # trdid = (((x * y_size) + y) * nprocs) + p 97 for x in xrange (x_size): 98 for y in xrange (y_size): 99 cluster_id = (x * y_size) + y 100 if (mapping.clusters[cluster_id].procs): 101 for p in xrange(nprocs): 102 trdid = (((x * y_size) + y) * nprocs) + p 103 if trdid == 0: 104 startid = 0 105 is_main = 1 106 else: 107 startid = 1 108 is_main = 0 109 #startid = trdid == 0 and 0 or 1 110 #is_main = startid == 0 103 111 104 # mapping.addTask( vspace, 'rosen_%d_%d_%d' % (x,y,p), 105 # trdid, x, y, p, 106 # 'rosen_stack_%d_%d_%d' % (x,y,p), 107 # 'rosen_heap_%d_%d' % (x,y), 0 ) 108 mapping.addThread( vspace, 'main', True, 0, 0, 0, 109 'rosen_stack_0_0_0', 110 'rosen_heap_0_0', 111 0 ) # index in start_vector 112 mapping.addThread(vspace, 'rosen_%d_%d_%d' % (x, y, p), 113 is_main, x, y, p, 114 'rosen_stack_%d_%d_%d' % (x,y,p), 115 'rosen_heap_%d_%d' % (x,y), startid) 112 116 113 117
Note: See TracChangeset
for help on using the changeset viewer.