Ignore:
Timestamp:
Apr 6, 2017, 5:01:31 PM (7 years ago)
Author:
alain
Message:

Introduce the vci_master_nic component in the TSAR IOB architecture.

File:
1 edited

Legend:

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

    r1046 r1050  
    2929#  - nb_ttys        : number of TTY channels (can be from 1 to 8)
    3030#  - nb_nics        : number of NIC channels (from 1 to 2)
    31 #  - nb_cmas        : number of CMA channels (from 1 to 4)
    3231#  - fbf_width      : frame_buffer width = frame_buffer heigth
    3332#  - ioc_type       : can be 'IOC_BDV','IOC_HBA','IOC_SDC', 'IOC_SPI','NONE'
     
    3534#  - io_cxy         : IO cluster identifier
    3635#  - boot_cxy       : boot cluster identifier
     36#  - cache_line     : number of bytes in cache line (in 16,32,64)
    3737#
    3838#  The following parameters are imposed by the "tsar_generic_iob" architecture:
     
    5151          nb_ttys       = 1,
    5252          nb_nics       = 1,
    53           nb_cmas       = 2,
    5453          fbf_width     = 128,
    5554          ioc_type      = 'IOC_BDV',
    5655          mwr_type      = 'MWR_CPY',
    5756          io_cxy        = 0,
    58           boot_cxy      = 0 ):
     57          boot_cxy      = 0,
     58          cache_line    = 64):
    5959
    6060    ### architecture constants
     
    8181    assert( (nb_nics >= 1) and (nb_nics <= 2) )
    8282
    83     assert( (nb_cmas >= 1) and (nb_cmas <= 4) )
    84 
    8583    assert( ioc_type in ['IOC_BDV','IOC_HBA','IOC_SDC','IOC_SPI','IOC_RDK'] )
    8684
     
    9088
    9189    assert( ((boot_cxy >> y_width) < x_size) and ((boot_cxy & ((1<<y_width)-1)) < y_size) )
     90
     91    assert( (cache_line == 16) or (cache_line == 32) or (cache_line == 64)  )
    9292 
    9393    ### define platform name
     
    9898
    9999    ram_base = 0x0000000000
    100     ram_size = 0x4000000                   # 64 Mbytes
     100    ram_size = 0x800000                    # 8 Mbytes
    101101
    102102    xcu_base = 0x00B0000000
     
    119119
    120120    nic_base  = 0x00B5000000
    121     nic_size  = 0x80000                    # 512 kbytes
    122 
    123     cma_base  = 0x00B6000000
    124     cma_size  = 0x1000 * nb_cmas           # 4 kbytes * nb_cmas
     121    nic_size  = 0x4000                     # 16 kbytes
    125122
    126123    fbf_base  = 0x00B7000000
     
    151148                      io_cxy         = io_cxy,         
    152149                      boot_cxy       = boot_cxy,
     150                      cache_line     = cache_line,
    153151                      reset_address  = rom_base,
    154152                      p_width        = p_width )
     
    163161            offset = cxy << (paddr_width - x_width - y_width)
    164162
    165             # build devices
    166             ram = archi.addDevice( ptype    = 'RAM' ,
     163            # define internal devices
     164            ram = archi.addDevice( ptype    = 'RAM_SCL' ,
    167165                                   base     = ram_base + offset,
    168166                                   size     = ram_size )
    169167
    170             xcu = archi.addDevice( ptype    = 'XCU',
     168            xcu = archi.addDevice( ptype    = 'ICU_XCU',
    171169                                   base     = xcu_base + offset,
    172170                                   size     = xcu_size,
    173                                    channels = nb_cores * irqs_per_core,
     171                                   channels = 1,
    174172                                   arg0     = 16,
    175173                                   arg1     = 16,
    176                                    arg2     = 16 )
    177 
    178             mmc = archi.addDevice( ptype    = 'MMC',
     174                                   arg2     = 16,
     175                                   arg3     = 16 )
     176
     177            mmc = archi.addDevice( ptype    = 'MMC_TSR',
    179178                                   base     = mmc_base + offset,
    180179                                   size     = mmc_size )
    181             archi.addIrq( dstdev = xcu, port = 0, srcdev = mmc, isrtype = 'ISR_MMC' )
     180
     181            archi.addIrq( dstdev = xcu, port = 0, srcdev = mmc )
    182182
    183183            if ( mwr_type == 'MWR_GCD' ):
     
    189189                                       arg2  = 1,
    190190                                       arg3  = 0 )
    191                 archi.addIrq( dstdev = xcu, port = 1, srcdev = mwr, isrtype = 'ISR_MWR' )
     191                archi.addIrq( dstdev = xcu, port = 1, srcdev = mwr )
    192192
    193193            if ( mwr_type == 'MWR_DCT' ):
     
    199199                                       arg2  = 1,
    200200                                       arg3  = 0 )
    201                 archi.addIrq( dstdev = xcu, port = 1, srcdev = mwr, isrtype = 'ISR_MWR' )
     201                archi.addIrq( dstdev = xcu, port = 1, srcdev = mwr )
    202202
    203203            if ( mwr_type == 'MWR_CPY' ):
     
    209209                                       arg2  = 1,
    210210                                       arg3  = 0 )
    211                 archi.addIrq( dstdev = xcu, port = 1, srcdev = mwr, isrtype = 'ISR_MWR' )
    212 
     211                archi.addIrq( dstdev = xcu, port = 1, srcdev = mwr )
     212
     213            # define external devices
    213214            if( cxy == io_cxy ):
    214215
    215                 iob = archi.addDevice( ptype    = 'IOB',
     216                iob = archi.addDevice( ptype    = 'IOB_TSR',
    216217                                       base     = iob_base + offset,
    217218                                       size     = iob_size )
     
    221222                                       size     = ioc_size )
    222223
    223                 tty = archi.addDevice( ptype    = 'TTY',
     224                tty = archi.addDevice( ptype    = 'TXT_TTY',
    224225                                       base     = tty_base + offset,
    225226                                       size     = tty_size,
    226227                                       channels = nb_ttys )
    227228
    228                 nic = archi.addDevice( ptype    = 'NIC',
     229                nic = archi.addDevice( ptype    = 'NIC_CBF',
    229230                                       base     = nic_base + offset,
    230231                                       size     = nic_size,
    231232                                       channels = nb_nics )
    232233
    233                 cma = archi.addDevice( ptype    = 'CMA',
    234                                        base     = cma_base + offset,
    235                                        size     = cma_size,
    236                                        channels = nb_cmas )
    237 
    238                 fbf = archi.addDevice( ptype    = 'FBF',
     234                fbf = archi.addDevice( ptype    = 'FBF_SCL',
    239235                                       base     = fbf_base + offset,
    240236                                       size     = fbf_size,
     
    242238                                       arg1     = fbf_width )
    243239
    244                 rom = archi.addDevice( ptype    = 'ROM',
     240                rom = archi.addDevice( ptype    = 'ROM_SCL',
    245241                                       base     = rom_base + offset,
    246242                                       size     = rom_size )
    247243
    248                 pic = archi.addDevice( ptype    ='PIC',
     244                pic = archi.addDevice( ptype    ='PIC_TSR',
    249245                                       base     = pic_base + offset,
    250246                                       size     = pic_size,
    251247                                       arg0     = 32 )
    252248
    253                 if   ( ioc_type == 'IOC_BDV' ): isr_ioc = 'ISR_BDV'
    254                 elif ( ioc_type == 'IOC_HBA' ): isr_ioc = 'ISR_HBA'
    255                 elif ( ioc_type == 'IOC_SDC' ): isr_ioc = 'ISR_SDC'
    256                 elif ( ioc_type == 'IOC_SPI' ): isr_ioc = 'ISR_SPI'
    257                 else                          : isr_ioc = 'ISR_DEFAULT'
    258 
    259                 archi.addIrq( dstdev = pic, port = 0 , srcdev = nic, isrtype = 'ISR_NIC_RX', channel = 0 )
    260                 archi.addIrq( dstdev = pic, port = 1 , srcdev = nic, isrtype = 'ISR_NIC_RX', channel = 1 )
    261                 archi.addIrq( dstdev = pic, port = 2 , srcdev = nic, isrtype = 'ISR_NIC_TX', channel = 0 )
    262                 archi.addIrq( dstdev = pic, port = 3 , srcdev = nic, isrtype = 'ISR_NIC_TX', channel = 1 )
    263                 archi.addIrq( dstdev = pic, port = 4 , srcdev = cma, isrtype = 'ISR_CMA'   , channel = 0 )
    264                 archi.addIrq( dstdev = pic, port = 5 , srcdev = cma, isrtype = 'ISR_CMA'   , channel = 1 )
    265                 archi.addIrq( dstdev = pic, port = 6 , srcdev = cma, isrtype = 'ISR_CMA'   , channel = 2 )
    266                 archi.addIrq( dstdev = pic, port = 7 , srcdev = cma, isrtype = 'ISR_CMA'   , channel = 3 )
    267                 archi.addIrq( dstdev = pic, port = 8 , srcdev = ioc, isrtype = isr_ioc     , channel = 0 )
    268                 archi.addIrq( dstdev = pic, port = 16, srcdev = tty, isrtype = 'ISR_TTY_RX', channel = 0 )
    269                 archi.addIrq( dstdev = pic, port = 17, srcdev = tty, isrtype = 'ISR_TTY_RX', channel = 1 )
    270                 archi.addIrq( dstdev = pic, port = 18, srcdev = tty, isrtype = 'ISR_TTY_RX', channel = 2 )
    271                 archi.addIrq( dstdev = pic, port = 19, srcdev = tty, isrtype = 'ISR_TTY_RX', channel = 3 )
    272                 archi.addIrq( dstdev = pic, port = 20, srcdev = tty, isrtype = 'ISR_TTY_RX', channel = 4 )
    273                 archi.addIrq( dstdev = pic, port = 21, srcdev = tty, isrtype = 'ISR_TTY_RX', channel = 5 )
    274                 archi.addIrq( dstdev = pic, port = 22, srcdev = tty, isrtype = 'ISR_TTY_RX', channel = 6 )
    275                 archi.addIrq( dstdev = pic, port = 23, srcdev = tty, isrtype = 'ISR_TTY_RX', channel = 7 )
    276 
    277             # build cores
     249                archi.addIrq( dstdev = pic, port = 0 , srcdev = nic, channel = 0 , is_rx = True )
     250                archi.addIrq( dstdev = pic, port = 1 , srcdev = nic, channel = 1 , is_rx = True )
     251                archi.addIrq( dstdev = pic, port = 2 , srcdev = nic, channel = 2 , is_rx = True )
     252                archi.addIrq( dstdev = pic, port = 3 , srcdev = nic, channel = 3 , is_rx = True )
     253
     254                archi.addIrq( dstdev = pic, port = 4 , srcdev = nic, channel = 0 , is_rx = False )
     255                archi.addIrq( dstdev = pic, port = 5 , srcdev = nic, channel = 1 , is_rx = False )
     256                archi.addIrq( dstdev = pic, port = 6 , srcdev = nic, channel = 2 , is_rx = False )
     257                archi.addIrq( dstdev = pic, port = 7 , srcdev = nic, channel = 3 , is_rx = False )
     258
     259                archi.addIrq( dstdev = pic, port = 12, srcdev = ioc )
     260
     261                archi.addIrq( dstdev = pic, port = 16, srcdev = tty, channel = 0 , is_rx = True )
     262                archi.addIrq( dstdev = pic, port = 17, srcdev = tty, channel = 1 , is_rx = True )
     263                archi.addIrq( dstdev = pic, port = 18, srcdev = tty, channel = 2 , is_rx = True )
     264                archi.addIrq( dstdev = pic, port = 19, srcdev = tty, channel = 3 , is_rx = True )
     265                archi.addIrq( dstdev = pic, port = 20, srcdev = tty, channel = 4 , is_rx = True )
     266                archi.addIrq( dstdev = pic, port = 21, srcdev = tty, channel = 5 , is_rx = True )
     267                archi.addIrq( dstdev = pic, port = 22, srcdev = tty, channel = 6 , is_rx = True )
     268                archi.addIrq( dstdev = pic, port = 23, srcdev = tty, channel = 7 , is_rx = True )
     269
     270            # define cores
    278271            for p in xrange ( nb_cores ):
    279                 core = archi.addCore( (x<<(y_width+p_width)) + (y<<p_width) + p,  # hardware identifier
    280                                       (x<<y_width) + y,                           # cluster identifier
     272                core = archi.addCore( (x<<(y_width+p_width)) + (y<<p_width) + p,  # hardware id
     273                                      (x<<y_width) + y,                           # cluster
    281274                                       p )                                        # local index
    282275
Note: See TracChangeset for help on using the changeset viewer.