Changeset 913 for trunk/platforms


Ignore:
Timestamp:
Jan 2, 2015, 2:10:58 PM (10 years ago)
Author:
alain
Message:

Update arch.py for tsar_generic_iob.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/platforms/tsar_generic_iob/arch.py

    r874 r913  
    5353    ### define architecture constants
    5454
    55     nb_nics         = 2
     55    nb_nics         = 1
     56    nb_cmas         = 2
    5657    x_io            = 0
    5758    y_io            = 0
     
    6364    use_ramdisk     = False
    6465    peri_increment  = 0x10000    # distributed peripherals vbase address increment
    65     sched_increment = 0x10000    # distributed schedulers vbase address increment
    66     ptab_increment  = 0x200000   # distributed page tables vbase address increment
    6766
    6867    ### parameters checking
     
    8786
    8887    ram_base = 0x0000000000
    89     ram_size = 0x4000000                   # 64 Mbytes
     88    ram_size = 0x1000000                   # 16 Mbytes
    9089
    9190    xcu_base = 0x00B0000000
     
    129128    ### define  bootloader vsegs base addresses and sizes
    130129    ### We want to pack these 4 vsegs in the same big page
    131     ### => boot cost is one BPP in cluster[0][0]
    132 
    133     boot_mapping_vbase   = 0x00000000      # ident
    134     boot_mapping_size    = 0x00080000      # 512 Kbytes
    135 
    136     boot_code_vbase      = 0x00080000      # ident
    137     boot_code_size       = 0x00040000      # 256 Kbytes
    138 
    139     boot_data_vbase      = 0x000C0000      # ident
    140     boot_data_size       = 0x00080000      # 512 Kbytes
    141 
    142     boot_stack_vbase     = 0x00140000      # ident
    143     boot_stack_size      = 0x00050000      # 320 Kbytes
     130    ### => boot cost is one BIG page in cluster[0][0]
     131
     132    boot_mapping_vbase   = 0x00000000           # ident
     133    boot_mapping_size    = 0x00080000           # 512 Kbytes
     134
     135    boot_code_vbase      = 0x00080000           # ident
     136    boot_code_size       = 0x00040000           # 256 Kbytes
     137
     138    boot_data_vbase      = 0x000C0000           # ident
     139    boot_data_size       = 0x000C0000           # 768 Kbytes
     140
     141    boot_stack_vbase     = 0x00180000           # ident
     142    boot_stack_size      = 0x00080000           # 512 Kbytes
    144143
    145144    ### define kernel vsegs base addresses and sizes
    146     ### code, init, ptab & sched vsegs are replicated in all clusters.
     145    ### code, init, ptab, heap & sched vsegs are replicated in all clusters.
    147146    ### data & uncdata vsegs are only mapped in cluster[0][0].
    148     ### - We pack code, init, data vsegs in the same BIG page.
    149     ### - We use another BIG page for the ptab vseg.
    150     ### - We use 2*nb_procs SMALL pages for the sched vseg.
    151     ### - we use one SMALL page for uncdata
    152     ### => kernel cost is 2 BPPs and (2*n + 1) SPPs per cluster.
     147    ### - We use one BIG page for code vsegs in each cluster.
     148    ### - We use one BIG page for ptab vsegs in each cluster.
     149    ### - we use one BIG page for heap vsegs in each cluster.
     150    ### - We use 2*procs SMALL pages for sched vsegs in each cluster.
     151    ### - We use one BIG page for data vseg in cluster[0,0].
     152    ### - we use one SMALL page for uncdata in cluster[0,0].
    153153
    154154    kernel_code_vbase    = 0x80000000
    155     kernel_code_size     = 0x00080000      # 512 Kbytes per cluster
    156 
    157     kernel_init_vbase    = 0x80080000
    158     kernel_init_size     = 0x00080000      # 512 Kbytes per cluster
    159 
    160     kernel_data_vbase    = 0x80100000
    161     kernel_data_size     = 0x00100000      # 1 Mbytes in cluster[0][0]
     155    kernel_code_size     = 0x00100000           # 1 Mbytes per cluster
     156
     157    kernel_init_vbase    = 0x80100000
     158    kernel_init_size     = 0x00100000           # 1 Mbytes per cluster
     159
     160    kernel_data_vbase    = 0x90000000
     161    kernel_data_size     = 0x00200000           # 2 Mbytes in cluster[0,0]
     162
     163    kernel_uncdata_vbase = 0x90200000
     164    kernel_uncdata_size  = 0x00001000           # 4 Kbytes in cluster[0,0]
    162165
    163166    kernel_ptab_vbase    = 0xE0000000
    164     kernel_ptab_size     = 0x00200000      # 2 Mbytes per cluster
    165 
    166     kernel_uncdata_vbase = 0x90000000
    167     kernel_uncdata_size  = 0x00001000      # 4 Kbytes
     167    kernel_ptab_size     = 0x00200000           # 2 Mbytes per cluster
     168
     169    kernel_heap_vbase    = 0xD0000000
     170    kernel_heap_size     = 0x00200000           # 2 Mbytes per cluster
    168171
    169172    kernel_sched_vbase   = 0xA0000000   
     
    199202    nic = mapping.addPeriph( 'NIC', base = nic_base, size = nic_size, ptype = 'NIC', channels = nb_nics )
    200203
    201     cma = mapping.addPeriph( 'CMA', base = cma_base, size = cma_size, ptype = 'CMA', channels = 2*nb_nics )
     204    cma = mapping.addPeriph( 'CMA', base = cma_base, size = cma_size, ptype = 'CMA', channels = nb_cmas )
    202205
    203206    fbf = mapping.addPeriph( 'FBF', base = fbf_base, size = fbf_size, ptype = 'FBF', arg = fbf_width )
     
    253256
    254257            xcu = mapping.addPeriph( 'XCU', base = xcu_base + offset, size = xcu_size,
    255                                      ptype = 'XCU', channels = nb_procs * irq_per_proc, arg = 16 )
     258                                     ptype = 'XCU', channels = nb_procs * irq_per_proc, arg = 32 )
    256259
    257260            # MMC IRQ replicated in all clusters
     
    287290                       identity = True , local = False, big = True )
    288291
    289     ### Global vsegs kernel_ptab_x_y : big page
     292    ### Global vsegs kernel_ptab_x_y : big / non local
    290293    ### one vseg per cluster: name indexed by (x,y)
    291     ### vbase address incremented by (cluster_xy * vseg_increment)
    292     for x in xrange( x_size ):
    293         for y in xrange( y_size ):
    294             offset = ((x << y_width) + y) * ptab_increment
     294    for x in xrange( x_size ):
     295        for y in xrange( y_size ):
     296            offset = ((x << y_width) + y) * kernel_ptab_size
    295297            base   = kernel_ptab_vbase + offset
    296298            mapping.addGlobal( 'seg_kernel_ptab_%d_%d' %(x,y), base, kernel_ptab_size,
     
    298300                               local = False , big = True )
    299301
    300     ### global vsegs kernel_code, kernel_init : big page
     302    ### global vsegs kernel_code, kernel_init : big / local
    301303    ### replicated in all clusters with the same name & same vbase
    302304    for x in xrange( x_size ):
     
    312314                               local = True, big = True )
    313315
    314     ### global vseg kernel_data : big page
     316    ### global vseg kernel_data : big / non local
    315317    ### Only mapped in cluster[0][0]
    316318    mapping.addGlobal( 'seg_kernel_data', kernel_data_vbase, kernel_data_size,
     
    319321                       local = False, big = True )
    320322
    321     ### global vseg kernel_uncdata : small page
     323    ### global vseg kernel_uncdata : small / non local
    322324    ### Only mapped in cluster[0][0]
    323325    mapping.addGlobal( 'seg_kernel_uncdata', kernel_uncdata_vbase, kernel_uncdata_size,
     
    326328                       local = False, big = False )
    327329
    328     ### global vsegs kernel_sched_x_y : small pages
     330    ### global vsegs kernel_sched_x_y : small / non local
    329331    ### one vseg per cluster with name indexed by (x,y)
    330     ### as vbase address is incremented by (cluster_xy * vseg_increment)
    331     for x in xrange( x_size ):
    332         for y in xrange( y_size ):
    333             offset = ((x << y_width) + y) * sched_increment
     332    for x in xrange( x_size ):
     333        for y in xrange( y_size ):
     334            offset = ((x << y_width) + y) * kernel_sched_size
    334335            mapping.addGlobal( 'seg_kernel_sched_%d_%d' %(x,y), kernel_sched_vbase + offset , kernel_sched_size,
    335336                               'C_W_', vtype = 'SCHED', x = x , y = y , pseg = 'RAM',
    336337                               local = False, big = False )
     338
     339    ### global vsegs kernel_heap_x_y : big / non local
     340    ### one vseg per cluster with name indexed by (x,y)
     341    for x in xrange( x_size ):
     342        for y in xrange( y_size ):
     343            offset = ((x << y_width) + y) * kernel_heap_size
     344            mapping.addGlobal( 'seg_kernel_heap_%d_%d' %(x,y), kernel_heap_vbase + offset , kernel_heap_size,
     345                               'C_W_', vtype = 'HEAP', x = x , y = y , pseg = 'RAM',
     346                               local = False, big = True )
    337347
    338348    ### global vsegs for external peripherals : non local / big page
Note: See TracChangeset for help on using the changeset viewer.