Ignore:
Timestamp:
Apr 6, 2015, 12:39:32 AM (9 years ago)
Author:
alain
Message:

Introduce the new parametre ioc_type in the tsar_generic_leti platform.

File:
1 edited

Legend:

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

    r960 r967  
    1414#  and kernel objects (global vsegs).
    1515#
    16 #  The x_size & y_size parameters define the total number of clusters.
     16#  This platform includes 6 external peripherals controllers located
     17#  in cluster[x_size-1][y_size-1]: TTY, IOC, FBF, NIC, CMA, PIC.
     18#  It does not use the IOB component.
     19#  It does not use an external ROM, as the preloader code is (pre)loaded
     20#  at address 0x0, in the physical memory of cluster[0][0].
     21#  It can use an - optional - RAMDISK located in cluster[0][0].
    1722#  The upper row (y = y_size-1) does not contain processors or memory.
    1823#
    19 #  It does not use the IOB component:
    20 #  The external peripherals are located in cluster[x_size-1][y_size-1].
     24#  The "constructor" parameters (defined in Makefile) are:
     25#  - x_size         : number of clusters in a row
     26#  - y_size         : number of clusters in a column
     27#  - nb_procs       : number of processors per cluster
     28#  - nb_ttys        : number of TTY channels
     29#  - fbf_width      : frame_buffer width = frame_buffer heigth
     30#  - ioc_type       : can be 'BDV','HBA','SDC','RDK'
    2131#
    22 #  It does not use an external ROM, as the preloader code is (pre)loaded
    23 #  at address 0x0, in the physical memory of cluster[0][0].
    24 #
    25 #  It can use an - optional - RAMDISK located in cluster[0][0].
    26 #
    27 #  The others hardware parameters are:
    28 #  - fbf_width      : frame_buffer width = frame_buffer heigth
    29 #  - nb_ttys        : number of TTY channels
     32#  The others hardware parameters (defined below) are:
    3033#  - nb_nics        : number of NIC channels
    3134#  - nb_cmas        : number of CMA channels
     35#  - x_io           : cluster_io x coordinate
     36#  - y_io           : cluster_io y coordinate
     37#  - x_width        : number of bits for x coordinate
     38#  - y_width        : number of bits for y coordinate
     39#  - paddr_width    : number of bits for physical address
    3240#  - irq_per_proc   : number of input IRQs per processor
    3341#  - use_ramdisk    : use a RAMDISK when True
    34 #  - peri_increment : address increment for replicated peripherals
     42#  - peri_increment : address increment for replicated vsegs
    3543#
    3644#  Regarding the boot and kernel vsegs mapping :
     
    5260          nb_procs  = 4,
    5361          nb_ttys   = 1,
    54           fbf_width = 128 ):
     62          fbf_width = 128,
     63          ioc_type  = 'HBA' ):
    5564
    5665    ### define architecture constants
     
    5867    nb_nics         = 1
    5968    nb_cmas         = 2
    60     x_io            = x_size - 1
    61     y_io            = y_size - 1
     69    x_io            = x_size - 1  # LETI constraint
     70    y_io            = y_size - 1  # LETI constraint
    6271    x_width         = 4
    6372    y_width         = 4
    64     p_width         = 2
     73    p_width         = 2           # LETI constraint
    6574    paddr_width     = 40
    66     irq_per_proc    = 4
    67     use_ramdisk     = False
    68     peri_increment  = 0x10000     # distributed peripherals vbase increment
    69     reset_address   = 0x00000000  # wired preloader pbase address
     75    irq_per_proc    = 4           # NetBSD constraint
     76    peri_increment  = 0x10000
     77    reset_address   = 0x00000000  # LETI constraint
    7078
    7179    ### parameters checking
     
    7583    assert( x_size <= (1 << x_width) )
    7684
    77     assert( y_size <= (1 << y_width) )
    78 
     85    assert( (y_size > 1) and (y_size <= (1 << y_width)) )
     86
     87    assert( ioc_type in [ 'BDV' , 'HBA' , 'SDC' , 'RDK' ] )
     88 
    7989    ### define type and name
    8090
    81     platform_type  = 'tsar_leti'
    82     platform_name  = '%s_%d_%d_%d' % (platform_type, x_size, y_size, nb_procs )
     91    platform_name  = 'tsar_leti_%d_%d_%d' % ( x_size, y_size, nb_procs )
     92    platform_name  += '_%d_%d_%s' % ( fbf_width , nb_ttys , ioc_type )
    8393
    8494    ### define physical segments replicated in all clusters
     
    97107    ## These segments are only defined in cluster_io
    98108
    99     bdv_base  = 0xF2000000
    100     bdv_size  = 0x1000                     # 4kbytes
     109    ioc_base  = 0xF2000000
     110    ioc_size  = 0x1000                     # 4kbytes
    101111
    102112    tty_base  = 0xF4000000
     
    120130    ### => boot cost is one BPP in cluster[0][0]
    121131
    122     preloader_vbase      = 0x00000000      # ident
     132    preloader_vbase      = reset_address   # ident
    123133    preloader_size       = 0x00010000      # 64 Kbytes
    124134
     
    176186                       coherence      = True,
    177187                       irq_per_proc   = irq_per_proc,
    178                        use_ramdisk    = use_ramdisk,
     188                       use_ramdisk    = (ioc_type == 'RDK'),
    179189                       x_io           = x_io,
    180190                       y_io           = y_io,
     
    215225            if ( (x==x_io) and (y==y_io) ):
    216226
    217                 bdv = mapping.addPeriph( 'BDV', base = bdv_base + offset, size = bdv_size,
    218                                          ptype = 'IOC', subtype = 'BDV' )
     227                if ( ioc_type != 'RDK' ):
     228                    ioc = mapping.addPeriph( 'IOC', base = ioc_base + offset, size = ioc_size,
     229                                             ptype = 'IOC', subtype = ioc_type )
    219230
    220231                tty = mapping.addPeriph( 'TTY', base = tty_base + offset, size = tty_size,
     
    244255                mapping.addIrq( pic, index = 7 , isrtype = 'ISR_CMA'   , channel = 3 )
    245256
    246                 mapping.addIrq( pic, index = 8 , isrtype = 'ISR_BDV'   , channel = 0 )
     257                if ( ioc_type == 'BDV' ):
     258                    mapping.addIrq( pic, index = 8 , isrtype = 'ISR_BDV'   , channel = 0 )
     259                if ( ioc_type == 'HBA' ):
     260                    mapping.addIrq( pic, index = 8 , isrtype = 'ISR_HBA'   , channel = 0 )
     261                if ( ioc_type == 'SDC' ):
     262                    mapping.addIrq( pic, index = 8 , isrtype = 'ISR_SDC'   , channel = 0 )
    247263
    248264                mapping.addIrq( pic, index = 16, isrtype = 'ISR_TTY_RX', channel = 0 )
     
    284300    ### global vseg for RAM-DISK in cluster[0][0]
    285301    ### identity mapping / non local / big pages
    286     if use_ramdisk:
     302    if (ioc_type == 'RDK'):
    287303
    288304        mapping.addGlobal( 'seg_ramdisk', ramdisk_vbase, ramdisk_size,
     
    342358    ### global vsegs for external peripherals: non local / big page
    343359    ### only mapped in cluster_io
    344     mapping.addGlobal( 'seg_bdv', bdv_base, bdv_size,
    345                        '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'BDV',
     360    mapping.addGlobal( 'seg_ioc', ioc_base, ioc_size,
     361                       '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'IOC',
    346362                       local = False, big = True )
    347363
Note: See TracChangeset for help on using the changeset viewer.