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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.