Ignore:
Timestamp:
Apr 11, 2015, 8:26:46 PM (9 years ago)
Author:
alain
Message:

Modify the tsar_generic_iob platform:
The vci_multi_dma component replicated in all cluster is replaced by a vci_mwmr_dma component.
This new component supports all hardware coprocessors respection the "coproc" interface.
Amongst the available coprocessors (defined in the SocLib? "coprocessor_components" directory)
the MWR_CPY coprocessor provide an improved memory copy service throughput x 2).

File:
1 edited

Legend:

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

    r966 r972  
    1919#
    2020#  All clusters contain (nb_procs) processors, one L2 cache, one XCU, and
    21 #  one DMA controller.
     21#  one optional hardware coprocessor connected to a MWMR_DMA controller.
    2222#
    2323#  The "constructor" parameters (defined in Makefile) are:
     
    2727#  - nb_ttys        : number of TTY channels
    2828#  - fbf_width      : frame_buffer width = frame_buffer heigth
    29 #  - ioc_type       : can be 'BDV','HBA','SDC', but not 'RDK'
    30 #
    31 #  The other hardware parameters (defined below) are:
     29#  - ioc_type       : can be 'BDV','HBA','SDC', but not 'RDK'
     30#   
     31#
     32#  The other hardware parameters (defined in this script) are:
    3233#  - nb_nics        : number of NIC channels
    3334#  - nb_cmas        : number of CMA channels
     
    4041#  - use_ramdisk    : use a ramdisk when True
    4142#  - vseg_increment : address increment for replicated vsegs
     43#  - mwr_type       : coprocessor type / can be 'GCD','DCT','NOPE'
     44#  - use_dma        : one single channel DMA per cluster if non zero
    4245#
    4346#  Regarding the boot and kernel vsegs mapping :
     
    5962          nb_ttys   = 1,
    6063          fbf_width = 128,
    61           ioc_type  = 'BDV' ):
     64          ioc_type  = 'HBA' ):
    6265
    6366    ### define architecture constants
     
    7174    p_width         = 4
    7275    paddr_width     = 40
    73     irq_per_proc    = 4          # NetBSD constraint
     76    irq_per_proc    = 4         
    7477    peri_increment  = 0x10000 
    75 
    76     ### parameters checking
     78    mwr_type        = 'CPY'
     79
     80    ### constructor parameters checking
    7781
    7882    assert( nb_procs <= (1 << p_width) )
     
    9094
    9195    assert( ioc_type in [ 'BDV' , 'HBA' , 'SDC' ] )
     96
     97    assert( mwr_type in [ 'GCD' , 'DCT' , 'CPY' , 'NONE' ] )
    9298 
    9399    ### define platform name
     
    104110    xcu_size = 0x1000                      # 4 Kbytes
    105111
    106     dma_base = 0x00B1000000
    107     dma_size = 0x1000                      # 4 Kbytes
     112    mwr_base = 0x00B1000000
     113    mwr_size = 0x1000                      # 4 Kbytes
    108114
    109115    mmc_base = 0x00B2000000
     
    207213
    208214            ### components replicated in all clusters
    209             ram = mapping.addRam( 'RAM', base = ram_base + offset,
     215            mapping.addRam( 'RAM', base = ram_base + offset,
    210216                                  size = ram_size )
    211 
    212             mmc = mapping.addPeriph( 'MMC', base = mmc_base + offset,
    213                                      size = mmc_size, ptype = 'MMC' )
    214 
    215             dma = mapping.addPeriph( 'DMA', base = dma_base + offset,
    216                                      size = dma_size, ptype = 'DMA',
    217                                      channels = nb_procs )
    218217
    219218            xcu = mapping.addPeriph( 'XCU', base = xcu_base + offset,
     
    223222
    224223            mapping.addIrq( xcu, index = 0, isrtype = 'ISR_MMC' )
    225 
    226             for i in xrange ( dma.channels ):
    227                 mapping.addIrq( xcu, index = 1+i, isrtype = 'ISR_DMA',
    228                                 channel = i )
     224            mapping.addIrq( xcu, index = 1, isrtype = 'ISR_MWR' )
     225
     226            mapping.addPeriph( 'MMC', base = mmc_base + offset,
     227                                     size = mmc_size, ptype = 'MMC' )
     228
     229            if ( mwr_type == 'GCD' ):
     230                mapping.addPeriph( 'MWR', base = mwr_base + offset,
     231                                   size = mwr_size, ptype = 'MWR', subtype = 'GCD',
     232                                   arg0 = 2, arg1 = 1, arg2 = 1, arg3 = 0 ) 
     233
     234            if ( mwr_type == 'DCT' ):
     235                mapping.addPeriph( 'MWR', base = mwr_base + offset,
     236                                   size = mwr_size, ptype = 'MWR', subtype = 'DCT',
     237                                   arg0 = 1, arg1 = 1, arg2 = 1, arg3 = 0 ) 
     238
     239            if ( mwr_type == 'CPY' ):
     240                mapping.addPeriph( 'MWR', base = mwr_base + offset,
     241                                   size = mwr_size, ptype = 'MWR', subtype = 'CPY',
     242                                   arg0 = 1, arg1 = 1, arg2 = 1, arg3 = 0 ) 
    229243
    230244            for p in xrange ( nb_procs ):
    231                 mapping.addProc( x, y, p )
     245                mapping.addProc( x , y , p )
    232246
    233247            ### external peripherals in cluster_io
     
    406420                               local = False, big = False )
    407421
    408             mapping.addGlobal( 'seg_dma_%d_%d' %(x,y), dma_base + offset, dma_size,
    409                                '__W_', vtype = 'PERI' , x = x , y = y , pseg = 'DMA',
    410                                local = False, big = False )
    411 
    412422            mapping.addGlobal( 'seg_mmc_%d_%d' %(x,y), mmc_base + offset, mmc_size,
    413423                               '__W_', vtype = 'PERI' , x = x , y = y , pseg = 'MMC',
    414424                               local = False, big = False )
     425
     426            if ( mwr_type != 'NONE' ):
     427                mapping.addGlobal( 'seg_mwr_%d_%d' %(x,y), mwr_base + offset, mwr_size,
     428                                   '__W_', vtype = 'PERI' , x = x , y = y , pseg = 'MWR',
     429                                   local = False, big = False )
    415430
    416431    return mapping
Note: See TracChangeset for help on using the changeset viewer.