Ignore:
Timestamp:
Apr 5, 2015, 12:42:04 AM (9 years ago)
Author:
alain
Message:

Introduce a new parameter in the tsar_generic_iob SystemC architecture:
The top cell use now the hard_config.h file to select the block_device type:
If USE_IOC_HBA is set, it use the vci_multi_ahci controller.
Else, it use the vci_block_device_tsar component.

File:
1 edited

Legend:

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

    r959 r965  
    1616#  This platform includes 6 external peripherals, accessible through an IOB
    1717#  components located in cluster [0,0] or in cluster [x_size-1, y_size-1].
    18 #  Available peripherals are: TTY, BDV, FBF, ROM, NIC, CMA, PIC.
     18#  Available peripherals are: TTY, HBA, FBF, ROM, NIC, CMA, PIC.
    1919#
    2020#  All clusters contain (nb_procs) processors, one L2 cache, one XCU, and
     
    2727#  - nb_ttys        : number of TTY channels
    2828#  - fbf_width      : frame_buffer width = frame_buffer heigth
     29#  - ioc_type       : can be 'BDV' , 'HBA' , 'SDC' , 'NONE'
    2930#
    3031#  The other hardware parameters are:
     
    5758          nb_procs  = 2,
    5859          nb_ttys   = 1,
    59           fbf_width = 128 ):
     60          fbf_width = 128,
     61          ioc_type  = 'BDV' ):
    6062
    6163    ### define architecture constants
     
    7072    paddr_width     = 40
    7173    irq_per_proc    = 4
    72     use_ramdisk     = False
    7374    peri_increment  = 0x10000    # distributed peripherals vbase address increment
    7475
     
    8889            ((x_io == x_size-1) and (y_io == y_size-1)) )
    8990
    90     ### define type and name
    91 
    92     platform_type  = 'tsar_iob'
    93     platform_name  = '%s_%d_%d_%d' % ( platform_type, x_size, y_size , nb_procs )
     91    assert( ioc_type in IOCSUBTYPES )
     92 
     93    ### define platform name
     94
     95    platform_name = 'tsar_iob_%d_%d_%d' % ( x_size, y_size , nb_procs )
     96    platform_name += '_%d_%d_%s' % ( fbf_width , nb_ttys , ioc_type )
    9497
    9598    ### define physical segments replicated in all clusters
     
    110113    ## These segments are only defined in cluster_io
    111114
    112     bdv_base  = 0x00B3000000
    113     bdv_size  = 0x1000                     # 4kbytes
     115    ioc_base  = 0x00B3000000
     116    ioc_size  = 0x1000                     # 4 Kbytes
    114117
    115118    tty_base  = 0x00B4000000
     
    186189                       coherence      = True,         
    187190                       irq_per_proc   = irq_per_proc, 
    188                        use_ramdisk    = use_ramdisk, 
     191                       use_ramdisk    = (ioc_type == 'RDK'),
    189192                       x_io           = x_io,         
    190193                       y_io           = y_io,
     
    234237                                         ptype = 'IOB' )
    235238
    236                 bdv = mapping.addPeriph( 'BDV', base = bdv_base + offset, size = bdv_size,
    237                                          ptype = 'IOC', subtype = 'BDV' )
     239                ioc = mapping.addPeriph( 'IOC', base = ioc_base + offset, size = ioc_size,
     240                                         ptype = 'IOC', subtype = ioc_type )
    238241
    239242                tty = mapping.addPeriph( 'TTY', base = tty_base + offset, size = tty_size,
     
    266269                mapping.addIrq( pic, index = 7,  isrtype = 'ISR_CMA'   , channel = 3 )
    267270
    268                 mapping.addIrq( pic, index = 8,  isrtype = 'ISR_BDV'   , channel = 0 )
     271                if ( ioc_type == 'BDV' ): isr_ioc = 'ISR_BDV'
     272                if ( ioc_type == 'HBA' ): isr_ioc = 'ISR_HBA'
     273                if ( ioc_type == 'SDC' ): isr_ioc = 'ISR_SDC'
     274
     275                mapping.addIrq( pic, index = 8,  isrtype = isr_ioc     , channel = 0 )
    269276
    270277                mapping.addIrq( pic, index = 16, isrtype = 'ISR_TTY_RX', channel = 0 )
     
    310317
    311318    ### global vsegs kernel_code, kernel_init : big / local
    312     ### replicated in all clusters with the same name & same vbase
    313     for x in xrange( x_size ):
    314         for y in xrange( y_size ):
    315             mapping.addGlobal( 'seg_kernel_code', kernel_code_vbase, kernel_code_size,
     319    ### replicated in all clusters with indexed name & same vbase
     320    for x in xrange( x_size ):
     321        for y in xrange( y_size ):
     322            mapping.addGlobal( 'seg_kernel_code_%d_%d' %(x,y),
     323                               kernel_code_vbase, kernel_code_size,
    316324                               'CXW_', vtype = 'ELF', x = x , y = y , pseg = 'RAM',
    317325                               binpath = 'build/kernel/kernel.elf',
    318326                               local = True, big = True )
    319327
    320             mapping.addGlobal( 'seg_kernel_init', kernel_init_vbase, kernel_init_size,
     328            mapping.addGlobal( 'seg_kernel_init_%d_%d' %(x,y),
     329                               kernel_init_vbase, kernel_init_size,
    321330                               'CXW_', vtype = 'ELF', x = x , y = y , pseg = 'RAM',
    322331                               binpath = 'build/kernel/kernel.elf',
     
    358367                       local = False, big = True )
    359368
    360     mapping.addGlobal( 'seg_bdv', bdv_base, bdv_size, '__W_',
    361                        vtype = 'PERI', x = 0, y = 0, pseg = 'BDV',
     369    mapping.addGlobal( 'seg_ioc', ioc_base, ioc_size, '__W_',
     370                       vtype = 'PERI', x = 0, y = 0, pseg = 'IOC',
    362371                       local = False, big = True )
    363372
Note: See TracChangeset for help on using the changeset viewer.