Changeset 874 for trunk/platforms


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

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

Location:
trunk/platforms/tsar_generic_iob
Files:
2 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 ):
  • trunk/platforms/tsar_generic_iob/top.cpp

    r818 r874  
    3838// The external peripherals HWI IRQs are translated to WTI IRQs by the
    3939// external IOPIC component, that must be configured by the OS to route
    40 // these WTI ITQS to one or several internal XICU components.
     40// these WTI IRQS to one or several internal XICU components.
    4141// - IOPIC HWI[1:0]     connected to IRQ_NIC_RX[1:0]
    4242// - IOPIC HWI[3:2]     connected to IRQ_NIC_TX[1:0]
    4343// - IOPIC HWI[7:4]     connected to IRQ_CMA_TX[3:0]]
    4444// - IOPIC HWI[8]       connected to IRQ_BDEV
    45 // - IOPIC HWI[9]       connected to IRQ_TTY_RX[0]
     45// - IOPIC HWI[31:16]   connected to IRQ_TTY_RX[15:0]
    4646//
    4747// Besides the external peripherals, each cluster contains one XICU component,
     
    7878// - Y_SIZE           : number of clusters in a column
    7979// - NB_PROCS_MAX     : number of processors per cluster (power of 2)
    80 // - NB_TTY_CHANNELS  : number of TTY channels in I/O network (must be 1)
     80// - NB_TTY_CHANNELS  : number of TTY channels in I/O network (up to 16)
    8181// - NB_NIC_CHANNELS  : number of NIC channels in I/O network (up to 2)
    8282// - NB_CMA_CHANNELS  : number of CMA channels in I/O network (up to 4)
     
    454454           "The NB_DMA_CHANNELS parameter cannot be larger than 4" );
    455455
    456    assert( (NB_TTY_CHANNELS == 1) and
    457            "The NB_TTY_CHANNELS parameter must be 1" );
     456   assert( (NB_TTY_CHANNELS >= 1) and (NB_TTY_CHANNELS <= 16) and
     457           "The NB_TTY_CHANNELS parameter cannot be larger than 16" );
    458458
    459459   assert( (NB_NIC_CHANNELS == 2) and
     
    801801    sc_signal<bool>                   signal_irq_false;
    802802    sc_signal<bool>                   signal_irq_bdev;
    803     sc_signal<bool>                   signal_irq_mtty_rx;
     803    sc_signal<bool>                   signal_irq_mtty_rx[NB_TTY_CHANNELS];
    804804    sc_signal<bool>                   signal_irq_mnic_rx[NB_NIC_CHANNELS];
    805805    sc_signal<bool>                   signal_irq_mnic_tx[NB_NIC_CHANNELS];
     
    11561156    mtty->p_resetn                                       (signal_resetn);
    11571157    mtty->p_vci                                          (signal_vci_tgt_mtty);
    1158     mtty->p_irq[0]                                       (signal_irq_mtty_rx);
    1159 
     1158    for ( size_t i=0 ; i<NB_TTY_CHANNELS ; i++ )
     1159    {
     1160        mtty->p_irq[i]                                   (signal_irq_mtty_rx[i]);
     1161    }
    11601162    std::cout << "  - MTTY connected" << std::endl;
    11611163
     
    11851187       else if(i < 4+NB_CMA_CHANNELS)  iopi->p_hwi[i] (signal_irq_cdma[i-4]);
    11861188       else if(i < 8)                  iopi->p_hwi[i] (signal_irq_false);
    1187        else if(i == 8)                 iopi->p_hwi[i] (signal_irq_bdev);
    1188        else if(i == 9)                 iopi->p_hwi[i] (signal_irq_mtty_rx);
     1189       else if(i < 9)                  iopi->p_hwi[i] (signal_irq_bdev);
     1190       else if(i < 16)                 iopi->p_hwi[i] (signal_irq_false);
     1191       else if(i < 16+NB_TTY_CHANNELS) iopi->p_hwi[i] (signal_irq_mtty_rx[i-16]);
    11891192       else                            iopi->p_hwi[i] (signal_irq_false);
    11901193    }
     
    15231526            {
    15241527                clusters[0][0]->iob->print_trace();
    1525                 clusters[XMAX-1][YMAX-1]->iob->print_trace();
    15261528//              clusters[0][0]->signal_int_vci_tgt_iobx.print_trace( "[SIG]IOB0_INT_TGT");
    15271529//              clusters[0][0]->signal_int_vci_ini_iobx.print_trace( "[SIG]IOB0_INT_INI");
     
    15311533//              signal_vci_tgt_iob0.print_trace("[SIG]IOB0_IOX_TGT");
    15321534
    1533 //              cdma->print_trace();
    1534 //              signal_vci_tgt_cdma.print_trace("[SIG]IOX_CDMA_TGT");
    1535 //              signal_vci_ini_cdma.print_trace("[SIG]IOX_CDMA_INI");
     1535                cdma->print_trace();
     1536                signal_vci_tgt_cdma.print_trace("[SIG]IOX_CDMA_TGT");
     1537                signal_vci_ini_cdma.print_trace("[SIG]IOX_CDMA_INI");
    15361538
    15371539//              brom->print_trace();
     
    15411543//              signal_vci_tgt_mtty.print_trace("[SIG]IOX_MTTY_TGT");
    15421544
    1543                 bdev->print_trace();
    1544                 signal_vci_tgt_bdev.print_trace("[SIG]BDEV_TGT");
    1545                 signal_vci_ini_bdev.print_trace("[SIG]BDEV_INI");
     1545//              bdev->print_trace();
     1546//              signal_vci_tgt_bdev.print_trace("[SIG]BDEV_TGT");
     1547//              signal_vci_ini_bdev.print_trace("[SIG]BDEV_INI");
    15461548
    15471549//              mnic->print_trace();
     
    15511553//              signal_vci_tgt_fbuf.print_trace("[SIG]FBUF");
    15521554
    1553                 iopi->print_trace();
    1554                 signal_vci_ini_iopi.print_trace("[SIG]IOPI_INI");
    1555                 signal_vci_tgt_iopi.print_trace("[SIG]IOPI_TGT");
    1556                 iox_network->print_trace();
     1555//              iopi->print_trace();
     1556//              signal_vci_ini_iopi.print_trace("[SIG]IOPI_INI");
     1557//              signal_vci_tgt_iopi.print_trace("[SIG]IOPI_TGT");
     1558//              iox_network->print_trace();
    15571559
    15581560                // interrupts
    15591561                if (signal_irq_bdev)       std::cout << "### IRQ_BDEV ACTIVE"       << std::endl;
    1560                 if (signal_irq_mtty_rx)    std::cout << "### IRQ_MTTY ACTIVE"      << std::endl;
     1562                if (signal_irq_mtty_rx[0]) std::cout << "### IRQ_MTTY_RX[0] ACTIVE" << std::endl;
    15611563                if (signal_irq_mnic_rx[0]) std::cout << "### IRQ_MNIC_RX[0] ACTIVE" << std::endl;
    15621564                if (signal_irq_mnic_rx[1]) std::cout << "### IRQ_MNIC_RX[1] ACTIVE" << std::endl;
Note: See TracChangeset for help on using the changeset viewer.