Changeset 414
- Timestamp:
- Sep 29, 2014, 12:03:50 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/transpose/transpose.py
r383 r414 17 17 # - x_width : number of bits coding x coordinate 18 18 # - y_width : number of bits coding y coordinate 19 # - procs_max: number of processors per cluster19 # - nprocs : number of processors per cluster 20 20 #################################################################################### 21 21 … … 25 25 x_size = mapping.x_size 26 26 y_size = mapping.y_size 27 procs_max = mapping.procs_max27 nprocs = mapping.nprocs 28 28 x_width = mapping.x_width 29 29 y_width = mapping.y_width … … 36 36 data_size = 0x00010000 # 64 Kbytes (non replicated) 37 37 38 ptab_base = 0x3000000039 ptab_size = 0x00040000 # 256 Kbytes (replicated in eachcluster)38 stack_base = 0x40000000 39 stack_size = 0x00200000 # 2 Mbytes (per cluster) 40 40 41 stack_base = 0x40000000 42 stack_size = 0x00100000 # 1 Mbytes (to be divided between all tasks) 43 44 heap_base = 0x50000000 45 heap_size = 0x00010000 # 64 Kbytes (to be shared by all tasks) 41 heap_base = 0x60000000 42 heap_size = 0x00200000 # 2 Mbytes (per cluster) 46 43 47 44 # create vspace … … 62 59 local = True ) 63 60 64 # ptab vsegs : local (one specific ptab per cluster)61 # stacks vsegs: local (one stack per processor => nprocs stacks per cluster) 65 62 for x in xrange (x_size): 66 63 for y in xrange (y_size): 67 mapping.addVseg( vspace, 'trsp_ptab_%d_%d' %(x,y), ptab_base , ptab_size, 68 'C_WU', vtype = 'PTAB', x = x, y = y, pseg = 'RAM', 69 align = 13, 70 local = True ) 71 72 # stacks vsegs: local (one stack per processor, procs_max stacks per cluster) 73 for x in xrange (x_size): 74 for y in xrange (y_size): 75 for p in xrange( procs_max ): 76 proc_id = (((x * y_size) + y) * procs_max) + p 77 size = stack_size / (x_size * y_size * procs_max) 64 for p in xrange( nprocs ): 65 proc_id = (((x * y_size) + y) * nprocs) + p 66 size = stack_size / nprocs 78 67 base = stack_base + (proc_id * size) 79 68 mapping.addVseg( vspace, 'trsp_stack_%d_%d_%d' % (x,y,p), base, size, 80 69 'C_WU', vtype = 'BUFFER', x = x , y = y , pseg = 'RAM', 81 local = True )70 local = True, big = True ) 82 71 83 # heap vsegs: shared (all heap segments can be accessed by all tasks)72 # heap vsegs: distributed but non local (all heap vsegs can be accessed by all tasks) 84 73 for x in xrange (x_size): 85 74 for y in xrange (y_size): 86 75 cluster_id = (x * y_size) + y 87 size = heap_size / (x_size * y_size)76 size = heap_size 88 77 base = heap_base + (cluster_id * size) 89 78 mapping.addVseg( vspace, 'trsp_heap_%d_%d' % (x,y), base, size, 90 79 'C_WU', vtype = 'BUFFER', x = x, y = y, pseg = 'RAM', 91 local = False )80 local = False, big = True ) 92 81 93 82 # distributed tasks / one task per processor 94 83 for x in xrange (x_size): 95 84 for y in xrange (y_size): 96 for p in xrange( procs_max):97 trdid = (((x * y_size) + y) * procs_max) + p85 for p in xrange( nprocs ): 86 trdid = (((x * y_size) + y) * nprocs) + p 98 87 mapping.addTask( vspace, 'trsp_%d_%d_%d' % (x,y,p), trdid, x, y, p, 99 88 'trsp_stack_%d_%d_%d' % (x,y,p),
Note: See TracChangeset
for help on using the changeset viewer.