Changeset 708 for soft/giet_vm/applications/transpose/transpose.py
- Timestamp:
- Oct 1, 2015, 4:09:25 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/transpose/transpose.py
r669 r708 10 10 # This file describes the mapping of the multi-threaded "transpose" 11 11 # application on a multi-clusters, multi-processors architecture. 12 # This include both the mapping of virtual segments on the clusters, 13 # and the mapping of tasks on processors. 14 # There is one task per processor. 12 # There is one thread per processor. 15 13 # The mapping of virtual segments is the following: 16 14 # - There is one shared data vseg in cluster[0][0] … … 37 35 # define vsegs base & size 38 36 code_base = 0x10000000 39 code_size = 0x00010000 # 64 Kbytes ( replicated in eachcluster)37 code_size = 0x00010000 # 64 Kbytes (per cluster) 40 38 41 39 data_base = 0x20000000 … … 43 41 44 42 stack_base = 0x40000000 45 stack_size = 0x00 200000 # 2 Mbytes (per cluster)43 stack_size = 0x00010000 # 64 Kbytes (per thread) 46 44 47 45 heap_base = 0x60000000 … … 76 74 for p in xrange( nprocs ): 77 75 proc_id = (((x * y_size) + y) * nprocs) + p 78 size = (stack_size / nprocs) & 0xFFFFF000 79 base = stack_base + (proc_id * size) 76 base = stack_base + (proc_id * stack_size) 80 77 81 78 mapping.addVseg( vspace, 'trsp_stack_%d_%d_%d' % (x,y,p), 82 base, s ize, 'C_WU', vtype = 'BUFFER',79 base, stack_size, 'C_WU', vtype = 'BUFFER', 83 80 x = x , y = y , pseg = 'RAM', 84 81 local = True, big = True ) … … 96 93 local = False, big = True ) 97 94 98 # distribute d tasks / one task per processor95 # distribute one thread per processor / main on P[0,0,0] 99 96 for x in xrange (x_size): 100 97 for y in xrange (y_size): … … 102 99 if ( mapping.clusters[cluster_id].procs ): 103 100 for p in xrange( nprocs ): 104 trdid = (((x * y_size) + y) * nprocs) + p 101 if (x == 0) and (y == 0) and (p == 0) : # main thread 102 startid = 1 103 is_main = True 104 else : # other threads 105 startid = 0 106 is_main = False 105 107 106 mapping.addTask( vspace, 'trsp_%d_%d_%d' % (x,y,p), 107 trdid, x, y, p, 108 'trsp_stack_%d_%d_%d' % (x,y,p), 109 'trsp_heap_%d_%d' % (x,y), 0 ) 108 mapping.addThread( vspace, 109 'trsp_%d_%d_%d' % (x,y,p), 110 is_main, 111 x, y, p, 112 'trsp_stack_%d_%d_%d' % (x,y,p), 113 'trsp_heap_%d_%d' % (x,y), 114 startid ) 110 115 111 116 # extend mapping name
Note: See TracChangeset
for help on using the changeset viewer.