Ignore:
Timestamp:
Nov 11, 2014, 4:07:29 PM (9 years ago)
Author:
alain
Message:

Introducing support for multiple TTY terminals (up to 16 channels) in the tsar_generic_iob platform.

File:
1 edited

Legend:

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

    r817 r874  
    1919#  - y_size         : number of clusters in a column
    2020#  - nb_procs       : number of processors per cluster
     21#  - nb_ttys        : number of TTY channels
    2122#  - fbf_width      : frame_buffer width = frame_buffer heigth
    2223#
    2324#  The "hidden" parameters (defined below) are:
    24 #  - nb_ttys        : number of TTY channels
    2525#  - nb_nics        : number of NIC channels
    2626#  - x_io           : cluster_io x coordinate
     
    4848          y_size    = 2,
    4949          nb_procs  = 2,
     50          nb_ttys   = 1,
    5051          fbf_width = 128 ):
    5152
    5253    ### define architecture constants
    5354
    54     nb_ttys         = 1
    5555    nb_nics         = 2
    5656    x_io            = 0
     
    7676             or (y_size == 8) or (y_size == 16) )
    7777
    78     assert( nb_ttys == 1 )
     78    assert( (nb_ttys >= 1) and (nb_ttys <= 16) )
    7979
    8080    assert( ((x_io == 0) and (y_io == 0)) or
    8181            ((x_io == x_size-1) and (y_io == y_size-1)) )
    8282
    83     platform_name  = 'tsar_iob_%d_%d_%d_%d' % ( x_size, y_size, nb_procs, fbf_width )
     83    platform_name  = 'tsar_iob_%d_%d_%d_%d_%d' % (x_size,y_size,nb_procs,nb_ttys,fbf_width)
    8484
    8585    ### define replicated physical segments
     
    116116
    117117    fbf_base  = 0x00B7000000 + offset_io
    118     fbf_size  = fbf_width * fbf_width      # fbf_width * fbf_width bytes
     118    fbf_size  = fbf_width * fbf_width     # fbf_width * fbf_width bytes
    119119
    120120    pic_base  = 0x00B8000000 + offset_io
     
    207207    pic = mapping.addPeriph( 'PIC', base = pic_base, size = pic_size, ptype = 'PIC', channels = 32 )
    208208
    209     mapping.addIrq( pic, index = 0, isrtype = 'ISR_NIC_RX', channel = 0 )
    210     mapping.addIrq( pic, index = 1, isrtype = 'ISR_NIC_RX', channel = 1 )
    211 
    212     mapping.addIrq( pic, index = 2, isrtype = 'ISR_NIC_TX', channel = 0 )
    213     mapping.addIrq( pic, index = 3, isrtype = 'ISR_NIC_TX', channel = 1 )
    214 
    215     mapping.addIrq( pic, index = 4, isrtype = 'ISR_CMA'   , channel = 0 )
    216     mapping.addIrq( pic, index = 5, isrtype = 'ISR_CMA'   , channel = 1 )
    217     mapping.addIrq( pic, index = 6, isrtype = 'ISR_CMA'   , channel = 2 )
    218     mapping.addIrq( pic, index = 7, isrtype = 'ISR_CMA'   , channel = 3 )
    219 
    220     mapping.addIrq( pic, index = 8, isrtype = 'ISR_BDV'   , channel = 0 )
    221 
    222     mapping.addIrq( pic, index = 9, isrtype = 'ISR_TTY_RX', channel = 0 )
     209    mapping.addIrq( pic, index = 0,  isrtype = 'ISR_NIC_RX', channel = 0 )
     210    mapping.addIrq( pic, index = 1,  isrtype = 'ISR_NIC_RX', channel = 1 )
     211
     212    mapping.addIrq( pic, index = 2,  isrtype = 'ISR_NIC_TX', channel = 0 )
     213    mapping.addIrq( pic, index = 3,  isrtype = 'ISR_NIC_TX', channel = 1 )
     214
     215    mapping.addIrq( pic, index = 4,  isrtype = 'ISR_CMA'   , channel = 0 )
     216    mapping.addIrq( pic, index = 5,  isrtype = 'ISR_CMA'   , channel = 1 )
     217    mapping.addIrq( pic, index = 6,  isrtype = 'ISR_CMA'   , channel = 2 )
     218    mapping.addIrq( pic, index = 7,  isrtype = 'ISR_CMA'   , channel = 3 )
     219
     220    mapping.addIrq( pic, index = 8,  isrtype = 'ISR_BDV'   , channel = 0 )
     221
     222    mapping.addIrq( pic, index = 16, isrtype = 'ISR_TTY_RX', channel = 0 )
     223    mapping.addIrq( pic, index = 17, isrtype = 'ISR_TTY_RX', channel = 1 )
     224    mapping.addIrq( pic, index = 18, isrtype = 'ISR_TTY_RX', channel = 2 )
     225    mapping.addIrq( pic, index = 19, isrtype = 'ISR_TTY_RX', channel = 3 )
     226    mapping.addIrq( pic, index = 20, isrtype = 'ISR_TTY_RX', channel = 4 )
     227    mapping.addIrq( pic, index = 21, isrtype = 'ISR_TTY_RX', channel = 5 )
     228    mapping.addIrq( pic, index = 22, isrtype = 'ISR_TTY_RX', channel = 6 )
     229    mapping.addIrq( pic, index = 23, isrtype = 'ISR_TTY_RX', channel = 7 )
     230    mapping.addIrq( pic, index = 24, isrtype = 'ISR_TTY_RX', channel = 8 )
     231    mapping.addIrq( pic, index = 25, isrtype = 'ISR_TTY_RX', channel = 9 )
     232    mapping.addIrq( pic, index = 26, isrtype = 'ISR_TTY_RX', channel = 10 )
     233    mapping.addIrq( pic, index = 27, isrtype = 'ISR_TTY_RX', channel = 11 )
     234    mapping.addIrq( pic, index = 28, isrtype = 'ISR_TTY_RX', channel = 12 )
     235    mapping.addIrq( pic, index = 29, isrtype = 'ISR_TTY_RX', channel = 13 )
     236    mapping.addIrq( pic, index = 30, isrtype = 'ISR_TTY_RX', channel = 14 )
     237    mapping.addIrq( pic, index = 31, isrtype = 'ISR_TTY_RX', channel = 15 )
    223238
    224239    ### hardware components replicated in all clusters
     
    272287                       identity = True , local = False, big = True )
    273288
    274     ### global vsegs kernel_code, kernel_init : local / big page
    275     ### replicated in all clusters with the same name (same vbase)
     289    ### Global vsegs kernel_ptab_x_y : big page
     290    ### one vseg per cluster: name indexed by (x,y)
     291    ### vbase address incremented by (cluster_xy * vseg_increment)
     292    for x in xrange( x_size ):
     293        for y in xrange( y_size ):
     294            offset = ((x << y_width) + y) * ptab_increment
     295            base   = kernel_ptab_vbase + offset
     296            mapping.addGlobal( 'seg_kernel_ptab_%d_%d' %(x,y), base, kernel_ptab_size,
     297                               'CXW_', vtype = 'PTAB', x = x, y = y, pseg = 'RAM',
     298                               local = False , big = True )
     299
     300    ### global vsegs kernel_code, kernel_init : big page
     301    ### replicated in all clusters with the same name & same vbase
    276302    for x in xrange( x_size ):
    277303        for y in xrange( y_size ):
     
    286312                               local = True, big = True )
    287313
    288     ### global vseg kernel_data: non local / big page
     314    ### global vseg kernel_data : big page
    289315    ### Only mapped in cluster[0][0]
    290316    mapping.addGlobal( 'seg_kernel_data', kernel_data_vbase, kernel_data_size,
     
    293319                       local = False, big = True )
    294320
    295     ### global vseg kernel_uncdata: non local / small page
     321    ### global vseg kernel_uncdata : small page
    296322    ### Only mapped in cluster[0][0]
    297323    mapping.addGlobal( 'seg_kernel_uncdata', kernel_uncdata_vbase, kernel_uncdata_size,
     
    300326                       local = False, big = False )
    301327
    302     ### Global vsegs kernel_ptab_x_y: non local / big pages
    303     ### replicated in all clusters with name indexed by (x,y)
    304     ### as vbase address is incremented by (cluster_xy * vseg_increment)
    305     for x in xrange( x_size ):
    306         for y in xrange( y_size ):
    307             offset = ((x << y_width) + y) * ptab_increment
    308             mapping.addGlobal( 'seg_kernel_ptab_%d_%d' %(x,y), kernel_ptab_vbase + offset , kernel_ptab_size,
    309                                'CXW_', vtype = 'PTAB', x = x, y = y, pseg = 'RAM',
    310                                local = False , big = True )
    311 
    312     ### global vsegs kernel_sched : non local / small pages
    313     ### allocated in all clusters with name indexed by (x,y)
     328    ### global vsegs kernel_sched_x_y : small pages
     329    ### one vseg per cluster with name indexed by (x,y)
    314330    ### as vbase address is incremented by (cluster_xy * vseg_increment)
    315331    for x in xrange( x_size ):
Note: See TracChangeset for help on using the changeset viewer.