Ignore:
Timestamp:
Jul 1, 2013, 9:51:00 AM (11 years ago)
Author:
cfuguet
Message:

Modification in tsar_generic_xbar:

  • Adapting the platform metadata files to new vci_mem_cache parameters
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp

    r396 r428  
    11//////////////////////////////////////////////////////////////////////////////
    22// File: tsar_xbar_cluster.cpp
    3 // Author: Alain Greiner 
     3// Author: Alain Greiner
    44// Copyright: UPMC/LIP6
    55// Date : march 2011
     
    77//////////////////////////////////////////////////////////////////////////////
    88// This file define a TSAR cluster architecture with virtual memory:
    9 // - It uses two virtual_dspin_router as distributed global interconnect 
    10 // - It uses four dspin_local_crossbar as local interconnect 
     9// - It uses two virtual_dspin_router as distributed global interconnect
     10// - It uses four dspin_local_crossbar as local interconnect
    1111// - It uses the vci_cc_vcache_wrapper
    1212// - It uses the vci_mem_cache
     
    1616// - It uses the vci_xicu interrupt controller
    1717// - The peripherals MTTY, BDEV, FBUF, MNIC and BROM are in cluster (0,0)
    18 // - The Multi-TTY component controls up to 15 terminals. 
     18// - The Multi-TTY component controls up to 15 terminals.
    1919// - Each Multi-DMA component controls up to 8 DMA channels.
    2020// - The DMA IRQs are connected to IRQ_IN[8]...IRQ_IN[15]
    2121// - The TTY IRQs are connected to IRQ_IN[16]...IRQ_IN[30]
    2222// - The BDEV IRQ is connected to IRQ_IN[31]
    23 ////////////////////////////////////////////////////////////////////////////////// 
     23//////////////////////////////////////////////////////////////////////////////////
    2424
    2525#include "../include/tsar_xbar_cluster.h"
     
    3030
    3131////////////////////////////////////////////////////////////////////////////////////
    32 template<size_t dspin_cmd_width, 
     32template<size_t dspin_cmd_width,
    3333         size_t dspin_rsp_width,
    3434         typename vci_param_int,
     
    4646         size_t                             cluster_id,
    4747         const soclib::common::MappingTable &mtd,
    48          const soclib::common::MappingTable &mtx, 
     48         const soclib::common::MappingTable &mtx,
    4949         size_t                             x_width,
    5050         size_t                             y_width,
     
    9191
    9292    /////////////////////////////////////////////////////////////////////////////
    93     // Components definition 
     93    // Components definition
    9494    /////////////////////////////////////////////////////////////////////////////
    9595    std::cout << "  - building proc_" << x_id << "_" << y_id << "-*" << std::endl;
    9696
    9797    for (size_t p = 0; p < nb_procs; p++)
    98     { 
     98    {
    9999        std::ostringstream sproc;
    100100        sproc << "proc_" << x_id << "_" << y_id << "_" << p;
    101101        proc[p] = new VciCcVCacheWrapper<vci_param_int,
    102102                                         dspin_cmd_width,
    103                                          dspin_rsp_width, 
     103                                         dspin_rsp_width,
    104104                                         GdbServer<Mips32ElIss> >(
    105105                      sproc.str().c_str(),
    106106                      cluster_id*nb_procs + p,        // GLOBAL PROC_ID
    107                       mtd,                            // Mapping Table 
     107                      mtd,                            // Mapping Table
    108108                      IntTab(cluster_id,p),           // SRCID
    109109                      (cluster_id << l_width) + p,    // CC_GLOBAL_ID
     
    234234                     x_width, y_width, l_width,
    235235                     nb_direct_initiators,         // number of local of sources
    236                      nb_direct_targets,            // number of local dests 
    237                      2, 2,                         // fifo depths 
    238                      true,                         // use local routing table 
     236                     nb_direct_targets,            // number of local dests
     237                     2, 2,                         // fifo depths
     238                     true,                         // use local routing table
    239239                     false );                      // no broacast
    240240
     
    247247                     x_id, y_id,                   // cluster coordinates
    248248                     x_width, y_width, l_width,
    249                      nb_direct_targets,            // number of local sources     
     249                     nb_direct_targets,            // number of local sources
    250250                     nb_direct_initiators,         // number of local dests
    251                      2, 2,                         // fifo depths 
    252                      false,                        // don't use local routing table 
     251                     2, 2,                         // fifo depths
     252                     false,                        // don't use local routing table
    253253                     false );                      // no broacast
    254254
     
    262262                     x_width, y_width, l_width,
    263263                     1,                            // number of local sources
    264                      nb_procs,                     // number of local targets 
    265                      2, 2,                         // fifo depths 
     264                     nb_procs,                     // number of local targets
     265                     2, 2,                         // fifo depths
    266266                     false,                        // don't use local routing table
    267267                     true );                       // broacast
     
    277277                     nb_procs,                     // number of local sources
    278278                     1,                            // number of local dests
    279                      2, 2,                         // fifo depths 
     279                     2, 2,                         // fifo depths
    280280                     false,                        // don't use local routing table
    281                      false );                      // no broacast 
     281                     false );                      // no broacast
    282282
    283283    /////////////////////////////////////////////////////////////////////////////
     
    324324                     IntTab(cluster_id, tgtid_fbuf),
    325325                     mtd,
    326                      xfb, yfb); 
     326                     xfb, yfb);
    327327
    328328        wt_fbuf = new VciDspinTargetWrapper<vci_param_int,
     
    388388                     "mtty",
    389389                     IntTab(cluster_id, tgtid_mtty),
    390                      mtd, 
     390                     mtd,
    391391                     vect_names);
    392392
     
    494494    xbar_m2p_c->p_global_in                      (signal_dspin_m2p_g2l_c);
    495495    xbar_m2p_c->p_local_in[0]                    (signal_dspin_m2p_memc);
    496     for (size_t p = 0; p < nb_procs; p++) 
     496    for (size_t p = 0; p < nb_procs; p++)
    497497        xbar_m2p_c->p_local_out[p]               (signal_dspin_m2p_proc[p]);
    498498
     
    505505    xbar_p2m_c->p_global_in                      (signal_dspin_p2m_g2l_c);
    506506    xbar_p2m_c->p_local_out[0]                   (signal_dspin_p2m_memc);
    507     for (size_t p = 0; p < nb_procs; p++) 
     507    for (size_t p = 0; p < nb_procs; p++)
    508508        xbar_p2m_c->p_local_in[p]                (signal_dspin_p2m_proc[p]);
    509509
     
    535535
    536536    ///////////////////////////////////// XICU
    537     xicu->p_clk                         (this->p_clk);
    538     xicu->p_resetn                      (this->p_resetn);
    539     xicu->p_vci                         (signal_vci_tgt_xicu);
     537    xicu->p_clk                        (this->p_clk);
     538    xicu->p_resetn                     (this->p_resetn);
     539    xicu->p_vci                        (signal_vci_tgt_xicu);
    540540    for ( size_t p=0 ; p<nb_procs ; p++)
    541541    {
    542         xicu->p_irq[p]                  (signal_proc_it[p]);
     542        xicu->p_irq[p]                 (signal_proc_it[p]);
    543543    }
    544544    for ( size_t i=0 ; i<32 ; i++)
     
    547547        {
    548548            if      (i < 8)                  xicu->p_hwi[i] (signal_false);
    549             else if (i < (8 + nb_dmas))      xicu->p_hwi[i]     (signal_irq_mdma[i-8]);
     549            else if (i < (8 + nb_dmas))      xicu->p_hwi[i] (signal_irq_mdma[i-8]);
    550550            else if (i < 16)                 xicu->p_hwi[i] (signal_false);
    551551            else if (i < (16 + nb_ttys))     xicu->p_hwi[i] (signal_irq_mtty[i-16]);
    552             else if (i < 31)                 xicu->p_hwi[i]     (signal_false);
     552            else if (i < 31)                 xicu->p_hwi[i] (signal_false);
    553553            else                             xicu->p_hwi[i] (signal_irq_bdev);
    554554        }
     
    556556        {
    557557            if      (i < 8)                  xicu->p_hwi[i] (signal_false);
    558             else if (i < (8 + nb_dmas))      xicu->p_hwi[i]     (signal_irq_mdma[i-8]);
    559             else                             xicu->p_hwi[i]     (signal_false);
     558            else if (i < (8 + nb_dmas))      xicu->p_hwi[i] (signal_irq_mdma[i-8]);
     559            else                             xicu->p_hwi[i] (signal_false);
    560560        }
    561561    }
     
    571571
    572572    //////////////////////////////////////////////// MEMC
    573     memc->p_clk                         (this->p_clk);
    574     memc->p_resetn                      (this->p_resetn);
    575     memc->p_vci_ixr                     (signal_vci_xram);
    576     memc->p_vci_tgt                     (signal_vci_tgt_memc);
     573    memc->p_clk                        (this->p_clk);
     574    memc->p_resetn                     (this->p_resetn);
     575    memc->p_vci_ixr                    (signal_vci_xram);
     576    memc->p_vci_tgt                    (signal_vci_tgt_memc);
    577577    memc->p_dspin_in                   (signal_dspin_p2m_memc);
    578     memc->p_dspin_out                 (signal_dspin_m2p_memc);
     578    memc->p_dspin_out                  (signal_dspin_m2p_memc);
    579579
    580580    // wrapper MEMC
     
    588588
    589589    /////////////////////////////////////////////// XRAM
    590     xram->p_clk                         (this->p_clk);
    591     xram->p_resetn                      (this->p_resetn);
    592     xram->p_vci                               (signal_vci_xram);
     590    xram->p_clk                        (this->p_clk);
     591    xram->p_resetn                     (this->p_resetn);
     592    xram->p_vci                        (signal_vci_xram);
    593593
    594594    std::cout << "  - XRAM connected" << std::endl;
    595595
    596596    ////////////////////////////////////////////// MDMA
    597     mdma->p_clk                         (this->p_clk);
    598     mdma->p_resetn                      (this->p_resetn);
    599     mdma->p_vci_target                  (signal_vci_tgt_mdma);
    600     mdma->p_vci_initiator               (signal_vci_ini_mdma);
     597    mdma->p_clk                        (this->p_clk);
     598    mdma->p_resetn                     (this->p_resetn);
     599    mdma->p_vci_target                 (signal_vci_tgt_mdma);
     600    mdma->p_vci_initiator              (signal_vci_ini_mdma);
    601601    for (size_t i=0 ; i<nb_dmas ; i++)
    602602        mdma->p_irq[i]                 (signal_irq_mdma[i]);
     
    618618    std::cout << "  - MDMA connected" << std::endl;
    619619
    620         /////////////////////////////// Components in I/O cluster
    621 
    622         if ( io )
    623         {
    624         // BDEV           
    625              bdev->p_clk                    (this->p_clk);
     620    /////////////////////////////// Components in I/O cluster
     621
     622    if ( io )
     623    {
     624        // BDEV
     625        bdev->p_clk                    (this->p_clk);
    626626        bdev->p_resetn                 (this->p_resetn);
    627627        bdev->p_irq                    (signal_irq_bdev);
     
    698698        for ( size_t i=0 ; i<nb_ttys ; i++ )
    699699        {
    700             mtty->p_irq[i]              (signal_irq_mtty[i]);
     700            mtty->p_irq[i]             (signal_irq_mtty[i]);
    701701        }
    702702
Note: See TracChangeset for help on using the changeset viewer.