Changeset 414 for soft/giet_vm


Ignore:
Timestamp:
Sep 29, 2014, 12:03:50 PM (10 years ago)
Author:
alain
Message:

Using BPP (Big physical Page) for stack and heap.

File:
1 edited

Legend:

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

    r383 r414  
    1717#  - x_width   : number of bits coding x coordinate
    1818#  - y_width   : number of bits coding y coordinate
    19 #  - procs_max : number of processors per cluster
     19#  - nprocs    : number of processors per cluster
    2020####################################################################################
    2121
     
    2525    x_size    = mapping.x_size
    2626    y_size    = mapping.y_size
    27     procs_max = mapping.procs_max
     27    nprocs = mapping.nprocs
    2828    x_width   = mapping.x_width
    2929    y_width   = mapping.y_width
     
    3636    data_size  = 0x00010000     # 64 Kbytes (non replicated)
    3737
    38     ptab_base  = 0x30000000
    39     ptab_size  = 0x00040000     # 256 Kbytes (replicated in each cluster)
     38    stack_base = 0x40000000
     39    stack_size = 0x00200000     # 2 Mbytes (per cluster)
    4040
    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)
    4643
    4744    # create vspace
     
    6259                             local = True )
    6360
    64     # ptab vsegs : local (one specific ptab per cluster)
     61    # stacks vsegs: local (one stack per processor => nprocs stacks per cluster)           
    6562    for x in xrange (x_size):
    6663        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
    7867                base    = stack_base + (proc_id * size)
    7968                mapping.addVseg( vspace, 'trsp_stack_%d_%d_%d' % (x,y,p), base, size,
    8069                                 'C_WU', vtype = 'BUFFER', x = x , y = y , pseg = 'RAM',
    81                                  local = True )
     70                                 local = True, big = True )
    8271
    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)
    8473    for x in xrange (x_size):
    8574        for y in xrange (y_size):
    8675            cluster_id = (x * y_size) + y
    87             size  = heap_size / (x_size * y_size)
     76            size  = heap_size
    8877            base  = heap_base + (cluster_id * size)
    8978            mapping.addVseg( vspace, 'trsp_heap_%d_%d' % (x,y), base, size,
    9079                             'C_WU', vtype = 'BUFFER', x = x, y = y, pseg = 'RAM',
    91                              local = False )
     80                             local = False, big = True )
    9281
    9382    # distributed tasks / one task per processor
    9483    for x in xrange (x_size):
    9584        for y in xrange (y_size):
    96             for p in xrange( procs_max ):
    97                 trdid = (((x * y_size) + y) * procs_max) + p
     85            for p in xrange( nprocs ):
     86                trdid = (((x * y_size) + y) * nprocs) + p
    9887                mapping.addTask( vspace, 'trsp_%d_%d_%d' % (x,y,p), trdid, x, y, p,
    9988                                 'trsp_stack_%d_%d_%d' % (x,y,p),
Note: See TracChangeset for help on using the changeset viewer.