Ignore:
Timestamp:
Apr 11, 2017, 11:50:57 PM (7 years ago)
Author:
alain
Message:

Replace the vci_mwmr_dma hardware component by the vci_multi_dma component.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/platforms/tsar_generic_iob/top.cpp

    r1050 r1051  
    5050// - One L2 cache controller
    5151// - One XICU component,
    52 // - One - optional - single channel DMA controler,
    53 // - One - optional - hardware coprocessor
     52// - One multi channels DMA controler (number of channels is defined by nprocs)
    5453// The XICU component is mainly used to handle WTI IRQs, as at most
    55 // 2 HWI IRQs are connected to XICU in each cluster:
     54// (nprocs + 1) HWI IRQs are connected to XICU in each cluster:
    5655// - IRQ_IN[0]            : MMC
    57 // - IRQ_IN[1]            : MWR
     56// - IRQ_IN[1 to nprocs]  : DMA
    5857//
    5958// All clusters are identical, but cluster(0,0) and cluster(XMAX-1,YMAX-1)
     
    151150
    152151//////////////////////////////////////////////////////////////////
    153 //    Coprocessor type (must be replicated in tsar_iob_cluster)
    154 //////////////////////////////////////////////////////////////////
    155 
    156 #define MWR_COPROC_CPY  0
    157 #define MWR_COPROC_DCT  1
    158 #define MWR_COPROC_GCD  2
    159 
    160 //////////////////////////////////////////////////////////////////
    161152//      Virtual disk selection => OS selection
    162153//////////////////////////////////////////////////////////////////
     
    271262// Two different initiators cannot have the same SRCID, but a given
    272263// initiator can have two alias SRCIDs:
    273 // - Internal initiators (procs, mwmr) are replicated in all clusters,
     264// - Internal initiators (procs, mdma) are replicated in all clusters,
    274265//   and each initiator has one single SRCID.
    275266// - External initiators (disk, cdma) are not replicated, but can be
     
    285276
    286277#define PROC_LOCAL_SRCID             0x0    // from 0 to 7
    287 #define MWMR_LOCAL_SRCID             0x8
     278#define MDMA_LOCAL_SRCID             0x8
    288279#define IOBX_LOCAL_SRCID             0x9
    289280#define MEMC_LOCAL_SRCID             0xA
     
    299290#define INT_MEMC_TGT_ID              0
    300291#define INT_XICU_TGT_ID              1
    301 #define INT_MWMR_TGT_ID              2
     292#define INT_MDMA_TGT_ID              2
    302293#define INT_IOBX_TGT_ID              3
    303294
    304295#define INT_PROC_INI_ID              0   // from 0 to (NB_PROCS_MAX-1)
    305 #define INT_MWMR_INI_ID              (NB_PROCS_MAX)
     296#define INT_MDMA_INI_ID              (NB_PROCS_MAX)
    306297#define INT_IOBX_INI_ID              (NB_PROCS_MAX+1)
    307298
     
    478469   "Error in tsar_generic_iob : You must have X_WIDTH == Y_WIDTH == 4");
    479470
    480    assert(  ((USE_MWR_CPY + USE_MWR_GCD + USE_MWR_DCT) == 1) and
    481    "Error in tsar_generic_iob : No MWR coprocessor found in hard_config.h");
    482 
    483471   assert(  ((USE_IOC_HBA + USE_IOC_BDV + USE_IOC_SDC) == 1) and
    484472   "Error in tsar_generic_iob : NoIOC controller found in hard_config.h");
     
    536524   // - two levels address decoding for commands
    537525   // - two levels srcid decoding for responses
    538    // - NB_PROCS_MAX + 2 (MWMR, IOBX) local initiators per cluster
    539    // - 4 local targets (MEMC, XICU, MWMR, IOBX) per cluster
     526   // - NB_PROCS_MAX + 2 (MDMA, IOBX) local initiators per cluster
     527   // - 4 local targets (MEMC, XICU, MDMA, IOBX) per cluster
    540528   /////////////////////////////////////////////////////////////////////
    541529   MappingTable maptab_int( vci_address_width,
     
    570558                     IntTab(cluster(x,y), INT_XICU_TGT_ID), not cacheable));
    571559
    572          std::ostringstream    smwmr;
    573          smwmr << "int_seg_mwmr_" << x << "_" << y;
    574          maptab_int.add(Segment(smwmr.str(), SEG_MWR_BASE+offset, SEG_MWR_SIZE,
    575                      IntTab(cluster(x,y), INT_MWMR_TGT_ID), not cacheable));
     560         std::ostringstream    smdma;
     561         smdma << "int_seg_mdma_" << x << "_" << y;
     562         maptab_int.add(Segment(smdma.str(), SEG_DMA_BASE+offset, SEG_DMA_SIZE,
     563                     IntTab(cluster(x,y), INT_MDMA_TGT_ID), not cacheable));
    576564
    577565         // the following segments are only defined in cluster_iob0 or in cluster_iob1
     
    618606         // and the port index on the local interconnect.
    619607
    620          maptab_int.srcid_map( IntTab( cluster(x,y), MWMR_LOCAL_SRCID ),
    621                                IntTab( cluster(x,y), INT_MWMR_INI_ID ) );
     608         maptab_int.srcid_map( IntTab( cluster(x,y), MDMA_LOCAL_SRCID ),
     609                               IntTab( cluster(x,y), INT_MDMA_INI_ID ) );
    622610
    623611         maptab_int.srcid_map( IntTab( cluster(x,y), IOBX_LOCAL_SRCID ),
     
    11141102                   dspin_ram_rsp_width>* clusters[XMAX][YMAX];
    11151103
    1116     unsigned int coproc_type;
    1117     if ( USE_MWR_CPY ) coproc_type = MWR_COPROC_CPY;
    1118     if ( USE_MWR_DCT ) coproc_type = MWR_COPROC_DCT;
    1119     if ( USE_MWR_GCD ) coproc_type = MWR_COPROC_GCD;
     1104    unsigned int coproc_type = 0;
    11201105
    11211106#if USE_OPENMP
     
    11761161                INT_MEMC_TGT_ID,
    11771162                INT_XICU_TGT_ID,
    1178                 INT_MWMR_TGT_ID,
     1163                INT_MDMA_TGT_ID,
    11791164                INT_IOBX_TGT_ID,
    11801165
    11811166                INT_PROC_INI_ID,
    1182                 INT_MWMR_INI_ID,
     1167                INT_MDMA_INI_ID,
    11831168                INT_IOBX_INI_ID,
    11841169
     
    16921677                clusters[x][y]->signal_int_vci_ini_proc[l].print_trace(proc_signame.str());
    16931678
     1679                // XICU
    16941680                clusters[x][y]->xicu->print_trace(1);
    16951681                std::ostringstream xicu_signame;
     
    16971683                clusters[x][y]->signal_int_vci_tgt_xicu.print_trace(xicu_signame.str());
    16981684
    1699                 // coprocessor in cluster(x,y)
    1700 //              clusters[x][y]->mwmr->print_trace();
    1701 //              std::ostringstream mwmr_tgt_signame;
    1702 //              mwmr_tgt_signame << "[SIG]MWMR_TGT_" << x << "_" << y;
    1703 //              clusters[x][y]->signal_int_vci_tgt_mwmr.print_trace(mwmr_tgt_signame.str());
    1704 //              std::ostringstream mwmr_ini_signame;
    1705 //              mwmr_ini_signame << "[SIG]MWMR_INI_" << x << "_" << y;
    1706 //              clusters[x][y]->signal_int_vci_ini_mwmr.print_trace(mwmr_ini_signame.str());
    1707 //              if ( USE_MWR_CPY ) clusters[x][y]->cpy->print_trace();
    1708 //              if ( USE_MWR_DCT ) clusters[x][y]->dct->print_trace();
    1709 //              if ( USE_MWR_GCD ) clusters[x][y]->gcd->print_trace();
     1685                // MDMA
     1686//              clusters[x][y]->mdma->print_trace();
     1687//              std::ostringstream mdma_tgt_signame;
     1688//              mdma_tgt_signame << "[SIG]MDMA_TGT_" << x << "_" << y;
     1689//              clusters[x][y]->signal_int_vci_tgt_mdma.print_trace(mdma_tgt_signame.str());
     1690//              std::ostringstream mdma_ini_signame;
     1691//              mdma_ini_signame << "[SIG]MDMA_INI_" << x << "_" << y;
     1692//              clusters[x][y]->signal_int_vci_ini_mdma.print_trace(mdma_ini_signame.str());
    17101693
    17111694                // local interrupts in cluster(x,y)
     
    17141697                          << " ACTIVE" << std::endl;
    17151698
    1716                 if( clusters[x][y]->signal_irq_mwmr.read() )
    1717                 std::cout << "### IRQ_MWR_" << std::dec << x << "_" << y
    1718                           << " ACTIVE" << std::endl;
    1719 
    1720                 for ( size_t c = 0 ; c < NB_PROCS_MAX ; c++ )
     1699                for( size_t i = 0 ; i < NB_PROCS_MAX ; i++ )
    17211700                {
    1722                     if( clusters[x][y]->signal_proc_it[c<<2].read() )
    1723                     std::cout << "### IRQ_PROC_" << std::dec << x << "_" << y << "_" << c
     1701                    if( clusters[x][y]->signal_irq_mdma[i].read() )
     1702                    std::cout << "### IRQ_DMA_" << std::dec << x << "_" << y << "_" << i
     1703                              << " ACTIVE" << std::endl;
     1704
     1705                    if( clusters[x][y]->signal_proc_it[i<<2].read() )
     1706                    std::cout << "### IRQ_PROC_" << std::dec << x << "_" << y << "_" << i
    17241707                              << " ACTIVE" << std::endl;
    17251708                }
Note: See TracChangeset for help on using the changeset viewer.