Ignore:
Timestamp:
Jan 19, 2016, 1:19:14 PM (8 years ago)
Author:
alain
Message:

Modify the transpose application to use replace the
giet_fat_read() / giet_fat_write() system calls
by the giet_far_mmap() system call, in order to
avoid one copy of data in user space.

The read/write version is still available as transpose_rw.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/applications/transpose/transpose.py

    r708 r764  
    3535    # define vsegs base & size
    3636    code_base  = 0x10000000
    37     code_size  = 0x00010000     # 64 Kbytes (per cluster)
     37    code_size  = 0x00010000     # 64 Kbytes  (256 Mbytes max)
    3838   
    3939    data_base  = 0x20000000
    40     data_size  = 0x00010000     # 64 Kbytes (non replicated)
     40    data_size  = 0x00010000     # 64 Kbytes  (256 Mbytes max)
     41
     42    mmap_base  = 0x30000000
     43    mmap_size  = 0x10000000     # 256 Mbytes (non mapped)
    4144
    4245    stack_base = 0x40000000
    43     stack_size = 0x00010000     # 64 Kbytes (per thread)
     46    stack_size = 0x00010000     # 64 Kbytes per thread  (64 Mbytes max)
    4447
    4548    heap_base  = 0x60000000
    46     heap_size  = 0x00200000     # 2 Mbytes (per cluster)
     49    heap_size  = 0x00200000     # 2 Mbytes per cluster  (512 Mbytes max)
    4750
    4851    # create vspace
    49     vspace = mapping.addVspace( name = 'transpose', startname = 'trsp_data', active = False )
     52    vspace = mapping.addVspace( name = 'transpose', startname = 'trsp_data', active = True )
    5053   
    5154    # data vseg : shared (only in cluster[0,0])
     
    5457                     binpath = 'bin/transpose/appli.elf',
    5558                     local = False )
     59
     60    # mmap vseg : non mapped in physical memory
     61    mapping.addVseg( vspace, 'trsp_mmap', mmap_base , mmap_size,
     62                     'C_WU', vtype = 'MMAP', local = False )
    5663
    5764    # code vsegs : local (one copy in each cluster)
     
    7582                    proc_id = (((x * y_size) + y) * nprocs) + p
    7683                    base    = stack_base + (proc_id * stack_size)
    77 
     84                    size    = stack_size - 4096
    7885                    mapping.addVseg( vspace, 'trsp_stack_%d_%d_%d' % (x,y,p),
    79                                      base, stack_size, 'C_WU', vtype = 'BUFFER',
     86                                     base , size , 'C_WU', vtype = 'BUFFER',
    8087                                     x = x , y = y , pseg = 'RAM',
    81                                      local = True, big = True )
     88                                     local = True )
    8289
    8390    # heap vsegs: distributed non local (all heap vsegs can be accessed by all tasks)
Note: See TracChangeset for help on using the changeset viewer.