Changeset 434 for soft/giet_vm
- Timestamp:
- Oct 12, 2014, 6:53:54 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/sort/sort.py
r432 r434 33 33 # define vsegs base & size 34 34 code_base = 0x10000000 35 code_size = 0x00 010000 # 64 Kbytes (replicated in each cluster)35 code_size = 0x00200000 # 2 Mbytes (replicated in each cluster) 36 36 37 37 data_base = 0x20000000 38 data_size = 0x00 010000 # 64 Kbytes(non replicated)38 data_size = 0x00100000 # 1 Mbyte (non replicated) 39 39 40 args_base = 0x20 01000040 args_base = 0x20100000 41 41 args_size = 0x00000004 # 4 bytes (non replicated) 42 42 … … 54 54 'C_WU', vtype = 'ELF', x = 0, y = 0, pseg = 'RAM', 55 55 binpath = 'build/sort/sort.elf', 56 local = False )56 local = False, big = True ) 57 57 58 58 # args vseg : non local (only in cluster[0,0]) 59 mapping.addVseg( vspace, 'sort_args', args_base , args_size, 60 'C_WU', vtype = 'CONST', x = 0, y = 0, pseg = 'RAM', 59 mapping.addVseg( vspace, 'sort_args', args_base , args_size, 60 'C_WU', vtype = 'CONST', x = 0, y = 0, pseg = 'RAM', 61 61 init = ntasks, 62 local = False )62 local = False, big = True ) 63 63 64 64 # code vsegs : local (one copy per cluster) 65 65 for x in xrange (x_size): 66 66 for y in xrange (y_size): 67 mapping.addVseg( vspace, 'sort_code', code_base , code_size, 68 'CXWU', vtype = 'ELF', x = 0, y = 0, pseg = 'RAM',67 mapping.addVseg( vspace, 'sort_code', code_base , code_size, 68 'CXWU', vtype = 'ELF', x = x, y = y, pseg = 'RAM', 69 69 binpath = 'build/sort/sort.elf', 70 local = True )70 local = True, big = True ) 71 71 72 72 # stacks vsegs : local (one stack per task) 73 73 for x in xrange (x_size): 74 74 for y in xrange (y_size): 75 for p in xrange (nprocs) 75 for p in xrange (nprocs): 76 76 proc_id = (((x * y_size) + y) * nprocs) + p 77 77 size = stack_size / nprocs 78 78 base = stack_base + (proc_id * size) 79 mapping.addVseg( vspace, 'sort_stack_%d_%d_%d' % (x,y,p), base, size 79 mapping.addVseg( vspace, 'sort_stack_%d_%d_%d' % (x,y,p), base, size, 80 80 'C_WU', vtype = 'BUFFER', x = x, y = y, pseg = 'RAM', 81 81 local = True, big = True ) 82 82 83 # heap vsegs : distributed but non local (all tasks can access all heap vsegs) 84 for x in xrange (x_size): 85 for y in xrange (y_size): 83 # heap vsegs : distributed but non local (all tasks can access all heap vsegs) 86 84 cluster_id = (x * y_size) + y 87 85 size = heap_size … … 97 95 trdid = (((x * y_size) + y) * nprocs) + p 98 96 mapping.addTask( vspace, 'sort_%d_%d_%d' % (x,y,p), trdid, x, y, p, 99 ' trsp_stack_%d_%d_%d' % (x,y,p),100 ' trsp_heap_%d_%d' % (x,y), 0 )97 'sort_stack_%d_%d_%d' % (x,y,p), 98 'sort_heap_%d_%d' % (x,y), 0 ) 101 99 102 100 # extend mapping name
Note: See TracChangeset
for help on using the changeset viewer.