Changeset 875


Ignore:
Timestamp:
Nov 11, 2014, 6:53:54 PM (10 years ago)
Author:
cfuguet
Message:

reconf: merge modifications from the trunk/tsar_generic_iob (r874)

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

Location:
branches/reconfiguration/platforms/tsar_generic_iob
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/reconfiguration/platforms/tsar_generic_iob/scripts/arch.py

    r858 r875  
    2424#  - y_size         : number of clusters in a column
    2525#  - nb_procs       : number of processors per cluster
     26#  - nb_ttys        : number of TTY channels
    2627#  - fbf_width      : frame_buffer width = frame_buffer heigth
    2728#
    2829#  The "hidden" parameters (defined below) are:
    29 #  - NB_TTYS        : number of TTY channels
    3030#  - NB_NICS        : number of NIC channels
    3131#  - X_IO           : cluster_io x coordinate
     
    4444# define architecture constants
    4545PADDR_WIDTH = 40
    46 NB_TTYS = 1
    4746NB_NICS = 2
    4847FBF_WIDTH = 128
     
    6968         y_size=2,
    7069         nb_procs=4,
     70         nb_ttys=1,
    7171         fbf_width=FBF_WIDTH):
    7272    """This function describes the tsar_generic_iob platform and defines its
     
    8282            (y_size == 16))
    8383
    84     assert NB_TTYS == 1
     84    assert ((nb_ttys >= 1) and (nb_ttys <= 16))
    8585
    8686    assert (((X_IO == 0) and (Y_IO == 0)) or
     
    160160
    161161    mapping.addPeriph('TTY', base=tty_base, size=tty_size,
    162                       ptype='TTY', channels=NB_TTYS)
     162                      ptype='TTY', channels=nb_ttys)
    163163
    164164    mapping.addPeriph('NIC', base=nic_base, size=nic_size,
     
    186186    mapping.addIrq(pic, index=7, isrtype='ISR_CMA', channel=3)
    187187    mapping.addIrq(pic, index=8, isrtype='ISR_BDV', channel=0)
    188     mapping.addIrq(pic, index=9, isrtype='ISR_TTY_RX', channel=0)
     188
     189    for i in xrange(nb_ttys):
     190        mapping.addIrq(pic, index=16+i, isrtype='ISR_TTY_RX', channel=i)
    189191
    190192    # hardware components replicated in all clusters
  • branches/reconfiguration/platforms/tsar_generic_iob/top.cpp

    r859 r875  
    55// Date : august 2013
    66// This program is released under the GNU public license
     7//
     8// Modified by: Cesar Fuguet
    79///////////////////////////////////////////////////////////////////////////////
    810// This file define a generic TSAR architecture with an IO network emulating
     
    1517// - BDEV : Dlock Device controler (one channel)
    1618// - IOPI : HWI to SWI translator.
     19// - SIMH : Simulation Helper
    1720//
    1821// The internal physical address space is 40 bits, and the cluster index
     
    3740// The external peripherals HWI IRQs are translated to WTI IRQs by the
    3841// external IOPIC component, that must be configured by the OS to route
    39 // these WTI ITQS to one or several internal XICU components.
     42// these WTI IRQS to one or several internal XICU components.
    4043// - IOPIC HWI[1:0]     connected to IRQ_NIC_RX[1:0]
    4144// - IOPIC HWI[3:2]     connected to IRQ_NIC_TX[1:0]
    4245// - IOPIC HWI[7:4]     connected to IRQ_CMA_TX[3:0]]
    4346// - IOPIC HWI[8]       connected to IRQ_BDEV
    44 // - IOPIC HWI[9]       connected to IRQ_TTY_RX[0]
    45 // - IOPIC HWI[31:9]    unused       (grounded)
     47// - IOPIC HWI[31:16]   connected to IRQ_TTY_RX[15:0]
    4648//
    4749// Besides the external peripherals, each cluster contains one XICU component,
     
    7880// - Y_SIZE           : number of clusters in a column
    7981// - 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)
     82// - NB_TTY_CHANNELS  : number of TTY channels in I/O network (up to 16)
    8183// - NB_NIC_CHANNELS  : number of NIC channels in I/O network (up to 2)
    8284// - NB_CMA_CHANNELS  : number of CMA channels in I/O network (up to 4)
     
    241243// All initiators are in the same indexing space (14 bits).
    242244// The SRCID is structured in two fields:
    243 // - The 10 MSB bits define the cluster index (left aligned)
    244 // - The 4 LSB bits define the local index.
     245// - The 8 MSB bits define the cluster index (left aligned)
     246// - The 6 LSB bits define the local index.
    245247// Two different initiators cannot have the same SRCID, but a given
    246248// initiator can have two alias SRCIDs:
     
    467469           "The Y_SIZE parameter cannot be larger than 16" );
    468470
    469    assert( (NB_PROCS_MAX <= 8) and
    470            "The NB_PROCS_MAX parameter cannot be larger than 8" );
     471   assert( (NB_PROCS_MAX <= (1 << P_WIDTH)) and
     472           "NB_PROCS_MAX parameter cannot be larger than 2^P_WIDTH" );
    471473
    472474   assert( (NB_DMA_CHANNELS <= 4) and
    473475           "The NB_DMA_CHANNELS parameter cannot be larger than 4" );
    474476
    475    assert( (NB_TTY_CHANNELS == 1) and
    476            "The NB_TTY_CHANNELS parameter must be 1" );
     477   assert( (NB_TTY_CHANNELS >= 1) and (NB_TTY_CHANNELS <= 16) and
     478           "The NB_TTY_CHANNELS parameter cannot be larger than 16" );
    477479
    478480   assert( (NB_NIC_CHANNELS == 2) and
     
    829831    sc_signal<bool>                   signal_irq_false;
    830832    sc_signal<bool>                   signal_irq_bdev;
    831     sc_signal<bool>                   signal_irq_mtty_rx;
     833    sc_signal<bool>                   signal_irq_mtty_rx[NB_TTY_CHANNELS];
    832834    sc_signal<bool>                   signal_irq_mnic_rx[NB_NIC_CHANNELS];
    833835    sc_signal<bool>                   signal_irq_mnic_tx[NB_NIC_CHANNELS];
     
    11951197    mtty->p_resetn                                       (signal_resetn);
    11961198    mtty->p_vci                                          (signal_vci_tgt_mtty);
    1197     mtty->p_irq[0]                                       (signal_irq_mtty_rx);
    1198 
     1199    for ( size_t i=0 ; i<NB_TTY_CHANNELS ; i++ )
     1200    {
     1201        mtty->p_irq[i]                                   (signal_irq_mtty_rx[i]);
     1202    }
    11991203    std::cout << "  - MTTY connected" << std::endl;
    12001204
     
    12241228       else if(i < 4+NB_CMA_CHANNELS)  iopi->p_hwi[i] (signal_irq_cdma[i-4]);
    12251229       else if(i < 8)                  iopi->p_hwi[i] (signal_irq_false);
    1226        else if(i == 8)                 iopi->p_hwi[i] (signal_irq_bdev);
    1227        else if(i == 9)                 iopi->p_hwi[i] (signal_irq_mtty_rx);
     1230       else if(i < 9)                  iopi->p_hwi[i] (signal_irq_bdev);
     1231       else if(i < 16)                 iopi->p_hwi[i] (signal_irq_false);
     1232       else if(i < 16+NB_TTY_CHANNELS) iopi->p_hwi[i] (signal_irq_mtty_rx[i-16]);
    12281233       else                            iopi->p_hwi[i] (signal_irq_false);
    12291234    }
     
    15881593            // interrupts
    15891594            if (signal_irq_bdev)       std::cout << "### IRQ_BDEV ACTIVE"       << std::endl;
    1590             if (signal_irq_mtty_rx)    std::cout << "### IRQ_MTTY ACTIVE"       << std::endl;
     1595            if (signal_irq_mtty_rx[0]) std::cout << "### IRQ_MTTY ACTIVE"       << std::endl;
    15911596            if (signal_irq_mnic_rx[0]) std::cout << "### IRQ_MNIC_RX[0] ACTIVE" << std::endl;
    15921597            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.