Changeset 422 for soft/giet_vm
- Timestamp:
- Sep 30, 2014, 5:30:47 PM (10 years ago)
- Location:
- soft/giet_vm/sort
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/sort/main.c
r381 r422 30 30 #include "barrier.h" 31 31 32 #define ARRAY_LENGTH 51232 #define ARRAY_LENGTH 4096 33 33 #define IPT (ARRAY_LENGTH / *nb_thread) // ITEMS PER THREAD 34 34 -
soft/giet_vm/sort/sort.py
r416 r422 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 = 0x00200000 # 2 Mbytes (non replicated) 39 39 40 args_base = 0x20 01000041 args_size = 0x0000 0004 # 4bytes (non replicated)40 args_base = 0x20200000 41 args_size = 0x00001000 # 4 Kbytes (non replicated) 42 42 43 43 stack_base = 0x40000000 … … 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 59 mapping.addVseg( vspace, 'sort_args', args_base , args_size, 60 60 'C_WU', vtype = 'CONST', x = 0, y = 0, pseg = 'RAM', 61 init = ntasks, 62 local = False ) 61 init = ntasks, local = False, big = False ) 63 62 64 63 # code vsegs : local (one copy per cluster) … … 66 65 for y in xrange (y_size): 67 66 mapping.addVseg( vspace, 'sort_code', code_base , code_size, 68 'CXWU', vtype = 'ELF', x = 0, y = 0, pseg = 'RAM',67 'CXWU', vtype = 'ELF', x = x, y = y, pseg = 'RAM', 69 68 binpath = 'build/sort/sort.elf', 70 local = True )69 local = True, big = True ) 71 70 72 71 # stacks vsegs : local (one stack per task) 73 72 for x in xrange (x_size): 74 73 for y in xrange (y_size): 75 for p in xrange (nprocs) 74 for p in xrange (nprocs): 76 75 proc_id = (((x * y_size) + y) * nprocs) + p 77 76 size = stack_size / nprocs 78 77 base = stack_base + (proc_id * size) 79 mapping.addVseg( vspace, 'sort_stack_%d_%d_%d' % (x,y,p), base, size 78 mapping.addVseg( vspace, 'sort_stack_%d_%d_%d' % (x,y,p), base, size, 80 79 'C_WU', vtype = 'BUFFER', x = x, y = y, pseg = 'RAM', 81 80 local = True, big = True ) … … 97 96 trdid = (((x * y_size) + y) * nprocs) + p 98 97 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 )98 'sort_stack_%d_%d_%d' % (x,y,p), 99 'sort_heap_%d_%d' % (x,y), 0 ) 101 100 102 101 # extend mapping name
Note: See TracChangeset
for help on using the changeset viewer.