Ignore:
Timestamp:
Jan 7, 2016, 4:16:03 PM (8 years ago)
Author:
cfuguet
Message:
  • Support the cluster 0 to be the IO cluster.
  • Update the arch.py to allow the execution of new revisions of the Giet-VM.
File:
1 edited

Legend:

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

    r975 r1029  
    6161          nb_ttys   = 1,
    6262          fbf_width = 128,
    63           ioc_type  = 'HBA' ):
     63          ioc_type  = 'HBA',
     64          mwr_type  = 'CPY'):
    6465
    6566    ### define architecture constants
     
    6768    nb_nics         = 1
    6869    nb_cmas         = 2
    69     x_io            = x_size - 1  # LETI constraint
    70     y_io            = y_size - 1  # LETI constraint
     70    x_io            = 0
     71    y_io            = 0
    7172    x_width         = 4
    7273    y_width         = 4
     
    146147
    147148    ### define ramdisk vseg / must be identity mapping in cluster[0][0]
    148     ### occupies 15 BPP after the boot 
    149     ramdisk_vbase        = 0x00200000
     149    ### occupies 16 BPP after the boot 
     150    ramdisk_vbase        = 0x02000000
    150151    ramdisk_size         = 0x02000000      # 32 Mbytes
    151152
     
    157158    kernel_code_size     = 0x00100000      # 1 Mbytes per cluster
    158159
    159     kernel_init_vbase    = 0x80100000
     160    kernel_init_vbase    = 0x88000000
    160161    kernel_init_size     = 0x00100000      # 1 Mbytes per cluster
    161162
     
    217218                                         arg0 = 16, arg1 = 16, arg2 = 16 )
    218219
    219                 mapping.addIrq( xcu, index = 8, src = mmc, isrtype = 'ISR_MMC' )
     220                mapping.addIrq( xcu, index = 8 , src = mmc, isrtype = 'ISR_MMC' )
     221
     222                if ( x==0 ) and ( y==0 ):
     223                    tty = mapping.addPeriph( 'TTY', base = tty_base + offset, size = tty_size,
     224                                             ptype = 'TTY', channels = nb_ttys )
     225
     226                    mapping.addIrq( xcu, index = 10, src = tty,
     227                                    isrtype = 'ISR_TTY_RX', channel = 0 )
    220228
    221229                for p in xrange ( nb_procs ):
    222230                    mapping.addProc( x, y, p )
    223231
    224             ###  external peripherals in cluster_io
    225             if ( (x==x_io) and (y==y_io) ):
     232            ###  peripherals in external cluster_io
     233            if ( x_io!=0 ) and ( y_io!=0 ) and ( x==( x_size-1 ) ) and ( y==( y_size-1 ) ) :
    226234
    227235                if ( ioc_type != 'RDK' ):
     
    261269                                isrtype = 'ISR_CMA', channel = 3 )
    262270
    263                 if   ( ioc_type == 'BDV' ): isr_type = 'ISR_BDV'
    264                 elif ( ioc_type == 'HBA' ): isr_type = 'ISR_HBA'
    265                 elif ( ioc_type == 'SDC' ): isr_type = 'ISR_SDC'
    266 
    267271                if ( ioc_type != 'RDK' ):
     272                    if   ( ioc_type == 'BDV' ): isr_type = 'ISR_BDV'
     273                    elif ( ioc_type == 'HBA' ): isr_type = 'ISR_HBA'
     274                    elif ( ioc_type == 'SDC' ): isr_type = 'ISR_SDC'
     275
    268276                    mapping.addIrq( pic, index = 8, src = ioc,
    269277                                    isrtype = isr_type, channel = 0 )
     
    316324    ### identity mapping / non local / big pages
    317325    if (ioc_type == 'RDK'):
    318 
    319326        mapping.addGlobal( 'seg_ramdisk', ramdisk_vbase, ramdisk_size,
    320327                           'C_W_', vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM',
    321328                           identity = True, local = True, big = True )
    322 
    323     ### global vsegs kernel_code, kernel_init : local / big page
    324     ### replicated in all clusters containing processors
    325     ### same content => same name / same vbase
    326     for x in xrange( x_size ):
    327         for y in xrange( y_size - 1 ):
    328 
    329             mapping.addGlobal( 'seg_kernel_code',
    330                                kernel_code_vbase, kernel_code_size,
    331                                'CXW_', vtype = 'ELF', x = x, y = y, pseg = 'RAM',
    332                                binpath = 'build/kernel/kernel.elf',
    333                                local = True, big = True )
    334 
    335             mapping.addGlobal( 'seg_kernel_init',
    336                                kernel_init_vbase, kernel_init_size,
    337                                'CXW_', vtype = 'ELF', x = x, y = y, pseg = 'RAM',
    338                                binpath = 'build/kernel/kernel.elf',
    339                                local = True, big = True )
    340329
    341330    ### global vseg kernel_data: non local / big page
     
    344333                       kernel_data_vbase, kernel_data_size,
    345334                       'C_W_', vtype = 'ELF', x = 0, y = 0, pseg = 'RAM',
    346                        binpath = 'build/kernel/kernel.elf',
     335                       binpath = 'bin/kernel/kernel.elf',
    347336                       local = False, big = True )
     337
     338    ### global vsegs kernel_code, kernel_init : local / big page
     339    ### replicated in all clusters containing processors
     340    ### same content => same name / same vbase
     341    for x in xrange( x_size ):
     342        for y in xrange( y_size - 1 ):
     343            mapping.addGlobal( 'seg_kernel_code',
     344                               kernel_code_vbase, kernel_code_size,
     345                               'CXW_', vtype = 'ELF', x = x, y = y, pseg = 'RAM',
     346                               binpath = 'bin/kernel/kernel.elf',
     347                               local = True, big = True )
     348
     349            mapping.addGlobal( 'seg_kernel_init',
     350                               kernel_init_vbase, kernel_init_size,
     351                               'CXW_', vtype = 'ELF', x = x, y = y, pseg = 'RAM',
     352                               binpath = 'bin/kernel/kernel.elf',
     353                               local = True, big = True )
    348354
    349355    ### Global vsegs kernel_ptab_x_y: non local / big page
     
    353359        for y in xrange( y_size - 1 ):
    354360            offset = ((x << y_width) + y) * kernel_ptab_size
    355 
    356361            mapping.addGlobal( 'seg_kernel_ptab_%d_%d' %(x,y),
    357362                               kernel_ptab_vbase + offset, kernel_ptab_size,
     
    359364                               local = False, big = True )
    360365
     366    ### global vsegs kernel_sched : non local / small pages
     367    ### allocated in all clusters containing processors
     368    ### different content => name & vbase indexed by (x,y)
     369    for x in xrange( x_size ):
     370        for y in xrange( y_size - 1 ):
     371            offset = ((x << y_width) + y) * kernel_ptab_size
     372            mapping.addGlobal( 'seg_kernel_sched_%d_%d' %(x,y),
     373                               kernel_sched_vbase + offset , kernel_sched_size,
     374                               'C_W_', vtype = 'SCHED', x = x, y = y, pseg = 'RAM',
     375                               local = False, big = False )
     376
    361377    ### global vsegs kernel_heap_x_y : non local / big pages
    362378    ### distributed in all clusters containing processors
     
    365381        for y in xrange( y_size - 1 ):
    366382            offset = ((x << y_width) + y) * kernel_heap_size
    367 
    368383            mapping.addGlobal( 'seg_kernel_heap_%d_%d' %(x,y),
    369384                               kernel_heap_vbase + offset , kernel_heap_size,
     
    373388    ### global vsegs for external peripherals: non local / big page
    374389    ### only mapped in cluster_io
    375     mapping.addGlobal( 'seg_ioc', ioc_base, ioc_size,
    376                        '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'IOC',
    377                        local = False, big = True )
     390    if ioc_type != 'RDK':
     391        mapping.addGlobal( 'seg_ioc', ioc_base, ioc_size,
     392                           '__W_', vtype = 'PERI', x = x_io, y = y_io,
     393                           pseg = 'IOC', local = False, big = True )
    378394
    379395    mapping.addGlobal( 'seg_tty', tty_base, tty_size,
    380                        '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'TTY',
    381                        local = False, big = True )
    382 
    383     mapping.addGlobal( 'seg_nic', nic_base, nic_size,
    384                        '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'NIC',
    385                        local = False, big = True )
    386 
    387     mapping.addGlobal( 'seg_cma', cma_base, cma_size,
    388                        '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'CMA',
    389                        local = False, big = True )
    390 
    391     mapping.addGlobal( 'seg_fbf', fbf_base, fbf_size,
    392                        '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'FBF',
    393                        local = False, big = True )
    394 
    395     mapping.addGlobal( 'seg_pic', pic_base, pic_size,
    396                        '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'PIC',
    397                        local = False, big = True )
     396                       '__W_', vtype = 'PERI', x = x_io, y = y_io,
     397                       pseg = 'TTY', local = False, big = True )
     398
     399    if ( x_io!=0 ) and ( y_io!=0 ) :
     400        mapping.addGlobal( 'seg_nic', nic_base, nic_size,
     401                           '__W_', vtype = 'PERI', x = x_size-1, y = y_size-1,
     402                           pseg = 'NIC', local = False, big = True )
     403
     404        mapping.addGlobal( 'seg_cma', cma_base, cma_size,
     405                           '__W_', vtype = 'PERI', x = x_size-1, y = y_size-1,
     406                           pseg = 'CMA', local = False, big = True )
     407
     408        mapping.addGlobal( 'seg_fbf', fbf_base, fbf_size,
     409                           '__W_', vtype = 'PERI', x = x_size-1, y = y_size-1,
     410                           pseg = 'FBF', local = False, big = True )
     411
     412        mapping.addGlobal( 'seg_pic', pic_base, pic_size,
     413                           '__W_', vtype = 'PERI', x = x_size-1, y = y_size-1,
     414                           pseg = 'PIC', local = False, big = True )
    398415
    399416    ### global vsegs for internal peripherals : non local / small pages
     
    412429                               mmc_base + offset, mmc_size,
    413430                               '__W_', vtype = 'PERI' , x = x , y = y , pseg = 'MMC',
    414                                local = False, big = False )
    415 
    416     ### global vsegs kernel_sched : non local / small pages
    417     ### allocated in all clusters containing processors
    418     ### different content => name & vbase indexed by (x,y)
    419     for x in xrange( x_size ):
    420         for y in xrange( y_size - 1 ):
    421             offset = ((x << y_width) + y) * kernel_ptab_size
    422 
    423             mapping.addGlobal( 'seg_kernel_sched_%d_%d' %(x,y),
    424                                kernel_sched_vbase + offset , kernel_sched_size,
    425                                'C_W_', vtype = 'SCHED', x = x, y = y, pseg = 'RAM',
    426431                               local = False, big = False )
    427432
Note: See TracChangeset for help on using the changeset viewer.