Changeset 584 for trunk/platforms


Ignore:
Timestamp:
Dec 4, 2013, 7:49:03 PM (10 years ago)
Author:
alain
Message:

cosmetic.

Location:
trunk/platforms/tsar_generic_iob
Files:
2 edited

Legend:

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

    r569 r584  
    3636// peripherals (MTTY, MNIC, CDMA) is limited by the number of IRQ ports...
    3737//
    38 // In all clusters, the IRQs are connected to XICU as follow:
    39 // - IRQ_IN[0]  to IRQ_IN[3] not connected (reserved  for context switch)
    40 // - IRQ_IN[4]  to IRQ_IN[7] are connected to 4 MDMA channels
    41 //
    42 // In external peripheral IRQs are connected in cluster(0,0) only:
     38// In cluster(0,0), the XICU HWI input ports are connected as follow:
     39// - IRQ_IN[0]  to IRQ_IN[7]  grounded (reserved for PTI or SWI)
    4340// - IRQ_IN[8]  to IRQ_IN[9]  are connected to 2 NIC_RX channels.
    4441// - IRQ_IN[10] to IRQ_IN[11] are connected to 2 NIC_TX channels.
     
    4643// - IRQ_IN[16] to IRQ_IN[30] are connected to 15 TTY channels
    4744// - IRQ_IN[31]               is connected to BDEV
     45// In other clusters, the XICU HWI input ports are grounded.
    4846//
    4947// All clusters are identical, but cluster(0,0) and cluster(XMAX-1,YMAX-1)
     
    178176//////////////////////i/////////////////////////////////////
    179177
    180 #include "giet_vm/hard_config.h"
     178#include "/Users/alain/soc/giet_vm/hard_config.h"
    181179
    182180////////////////////////////////////////////////////////////
     
    231229/////////////////////////////////////////////////////////
    232230
    233 // Non replicated peripherals
     231// Non replicated peripherals (must be in cluster 0)
    234232
    235233#define BROM_BASE             0x00BFC00000     
     
    254252#define FBUF_SIZE             FBUF_X_SIZE * FBUF_Y_SIZE
    255253
    256 // replicated segments : address is incremented by a cluster offset
     254// Replicated peripherals : address is incremented by a cluster offset
    257255//     offset  = cluster(x,y) << (address_width-x_width-y_width);
    258256
     
    266264#define MDMA_SIZE             0x0000001000 * NB_DMA_CHANNELS // 4 Kbytes per channel 
    267265
     266// Replicated memory segments (XRAM) : address is incremented by a cluster offset
     267//     offset  = cluster(x,y) << (address_width-x_width-y_width);
     268
    268269#define MEMC_BASE             0x00B2000000     
    269270#define MEMC_SIZE             0x0000001000   // 4 Kbytes
    270 
    271271
    272272////////////////////////////////////////////////////////////////////////
     
    429429            std::cout << "     -MEMCID index_memc_to_be_traced" << std::endl;
    430430            std::cout << "     -PROCID index_proc_to_be_traced" << std::endl;
    431             std::cout << "     -IOBID  index_iob_to_be_traced" << std::endl;
     431            std::cout << "     -IOB    non_zero_value" << std::endl;
    432432            exit(0);
    433433         }
     
    782782    sc_signal<bool>                   signal_resetn("resetn");
    783783
    784     sc_signal<bool>                   signal_unused_irq[32];
     784    sc_signal<bool>                   signal_irq_false;
    785785    sc_signal<bool>                   signal_irq_bdev;
    786786    sc_signal<bool>                   signal_irq_mnic_rx[NB_NIC_CHANNELS];
     
    10541054
    10551055    // IOX network connexion
    1056     iox_network->p_clk                                       (signal_clk);
    1057     iox_network->p_resetn                                    (signal_resetn);
    1058     iox_network->p_to_ini[IOX_IOB0_INI_ID]                   (signal_vci_ini_iob0);
    1059     iox_network->p_to_ini[IOX_IOB1_INI_ID]                   (signal_vci_ini_iob1);
    1060     iox_network->p_to_ini[IOX_BDEV_INI_ID]                   (signal_vci_ini_bdev);
    1061     iox_network->p_to_ini[IOX_CDMA_INI_ID]                   (signal_vci_ini_cdma);
    1062     iox_network->p_to_tgt[IOX_IOB0_TGT_ID]                   (signal_vci_tgt_iob0);
    1063     iox_network->p_to_tgt[IOX_IOB1_TGT_ID]                   (signal_vci_tgt_iob1);
    1064     iox_network->p_to_tgt[IOX_MTTY_TGT_ID]                   (signal_vci_tgt_mtty);
    1065     iox_network->p_to_tgt[IOX_FBUF_TGT_ID]                   (signal_vci_tgt_fbuf);
    1066     iox_network->p_to_tgt[IOX_MNIC_TGT_ID]                   (signal_vci_tgt_mnic);
    1067     iox_network->p_to_tgt[IOX_BROM_TGT_ID]                   (signal_vci_tgt_brom);
    1068     iox_network->p_to_tgt[IOX_BDEV_TGT_ID]                   (signal_vci_tgt_bdev);
    1069     iox_network->p_to_tgt[IOX_CDMA_TGT_ID]                   (signal_vci_tgt_cdma);
     1056    iox_network->p_clk                                   (signal_clk);
     1057    iox_network->p_resetn                                (signal_resetn);
     1058    iox_network->p_to_ini[IOX_IOB0_INI_ID]               (signal_vci_ini_iob0);
     1059    iox_network->p_to_ini[IOX_IOB1_INI_ID]               (signal_vci_ini_iob1);
     1060    iox_network->p_to_ini[IOX_BDEV_INI_ID]               (signal_vci_ini_bdev);
     1061    iox_network->p_to_ini[IOX_CDMA_INI_ID]               (signal_vci_ini_cdma);
     1062    iox_network->p_to_tgt[IOX_IOB0_TGT_ID]               (signal_vci_tgt_iob0);
     1063    iox_network->p_to_tgt[IOX_IOB1_TGT_ID]               (signal_vci_tgt_iob1);
     1064    iox_network->p_to_tgt[IOX_MTTY_TGT_ID]               (signal_vci_tgt_mtty);
     1065    iox_network->p_to_tgt[IOX_FBUF_TGT_ID]               (signal_vci_tgt_fbuf);
     1066    iox_network->p_to_tgt[IOX_MNIC_TGT_ID]               (signal_vci_tgt_mnic);
     1067    iox_network->p_to_tgt[IOX_BROM_TGT_ID]               (signal_vci_tgt_brom);
     1068    iox_network->p_to_tgt[IOX_BDEV_TGT_ID]               (signal_vci_tgt_bdev);
     1069    iox_network->p_to_tgt[IOX_CDMA_TGT_ID]               (signal_vci_tgt_cdma);
    10701070
    10711071    // BDEV connexion
     
    10731073    bdev->p_resetn                                       (signal_resetn);
    10741074    bdev->p_irq                                          (signal_irq_bdev);
     1075
    10751076    // For AHCI
    10761077    // bdev->p_channel_irq[0]                               (signal_irq_bdev);
     1078
    10771079    bdev->p_vci_target                                   (signal_vci_tgt_bdev);
    10781080    bdev->p_vci_initiator                                (signal_vci_ini_bdev);
     
    11291131    std::cout << "  - CDMA connected" << std::endl;
    11301132
    1131     // IRQ connexions (for cluster_iob0 only)
     1133    // IRQ connexions from external peripherals (cluster_iob0 only)
    11321134    // IRQ_MNIC_RX  -> IRQ[08] to IRQ[09]
    11331135    // IRQ_MNIC_TX  -> IRQ[10] to IRQ[11]
     
    11391141    for ( size_t n=0 ; n<32 ; n++ )
    11401142    {
    1141         if      ( n < 8  ) (*clusters[0][0]->p_irq[n])       (signal_unused_irq[n]);
    1142         else if ( n < 10 ) (*clusters[0][0]->p_irq[n])       (signal_irq_mnic_rx[n-8]);
    1143         else if ( n < 12 ) (*clusters[0][0]->p_irq[n])       (signal_irq_mnic_tx[n-10]);
    1144         else if ( n < 16 ) (*clusters[0][0]->p_irq[n])       (signal_irq_cdma[n-12]);
     1143        if      ( n < 8  ) (*clusters[0][0]->p_irq[n])       (signal_irq_false);
     1144
     1145        else if ( n < 10 ) (*clusters[0][0]->p_irq[n])       (signal_irq_false);
     1146//      else if ( n < 10 ) (*clusters[0][0]->p_irq[n])       (signal_irq_mnic_rx[n-8]);
     1147
     1148        else if ( n < 12 ) (*clusters[0][0]->p_irq[n])       (signal_irq_false);
     1149//      else if ( n < 12 ) (*clusters[0][0]->p_irq[n])       (signal_irq_mnic_tx[n-10]);
     1150
     1151        else if ( n < 16 ) (*clusters[0][0]->p_irq[n])       (signal_irq_false);
     1152//      else if ( n < 16 ) (*clusters[0][0]->p_irq[n])       (signal_irq_cdma[n-12]);
     1153
    11451154        else if ( n < mx ) (*clusters[0][0]->p_irq[n])       (signal_irq_mtty[n-16]);
    1146         else if ( n < 31 ) (*clusters[0][0]->p_irq[n])       (signal_unused_irq[n]);
     1155        else if ( n < 31 ) (*clusters[0][0]->p_irq[n])       (signal_irq_false);
     1156
    11471157        else               (*clusters[0][0]->p_irq[n])       (signal_irq_bdev);
    11481158    }
     
    13381348
    13391349   sc_start(sc_core::sc_time(0, SC_NS));
     1350
    13401351   signal_resetn = false;
     1352
     1353   signal_irq_false = false;
    13411354
    13421355   // network boundaries signals
     
    13811394    for (size_t n = 1; n < ncycles; n++)
    13821395    {
    1383         // Monitor a specific address for L1 & L2 caches
    1384         // clusters[1][1]->proc[0]->cache_monitor(0x8ba4ULL);
    1385         // clusters[0][0]->memc->cache_monitor(   0x12180ULL);
     1396        // Monitor a specific address for L1 and/or L2 caches
     1397        // clusters[1][1]->proc[0]->cache_monitor(0x50090ULL);
     1398        // clusters[0][0]->memc->cache_monitor(   0x50090ULL);
    13861399
    13871400        if (debug_ok and (n > debug_from) and (n % debug_period == 0))
     
    13901403            std::cout << " ************************************************" << std::endl;
    13911404
    1392             // trace proc[debug_proc_id]
     1405         
     1406            // trace proc[debug_proc_id] ... or several procs
     1407//          for( debug_proc_id = 0 ; debug_proc_id < 2 ; debug_proc_id++ )
     1408
    13931409            if ( debug_proc_id < XMAX*YMAX*NB_PROCS_MAX )
    13941410            {
    1395 
    13961411                size_t l = debug_proc_id % NB_PROCS_MAX ;
    13971412                size_t y = (debug_proc_id / NB_PROCS_MAX) % YMAX ;
    13981413                size_t x = debug_proc_id / (YMAX * NB_PROCS_MAX) ;
    13991414
    1400                 clusters[x][y]->proc[l]->print_trace(0);
     1415                clusters[x][y]->proc[l]->print_trace(1);
    14011416
    14021417                std::ostringstream proc_signame;
     
    14041419                clusters[x][y]->signal_int_vci_ini_proc[l].print_trace(proc_signame.str());
    14051420
     1421                clusters[x][y]->xicu->print_trace(l);
     1422
     1423                std::ostringstream xicu_signame;
     1424                xicu_signame << "[SIG]XICU_" << x << "_" << y;
     1425                clusters[x][y]->signal_int_vci_tgt_xicu.print_trace(xicu_signame.str());
     1426
     1427                if( clusters[x][y]->signal_proc_it[0].read() )
     1428                    std::cout << "### IRQ_PROC_" << std::dec
     1429                              << x << "_" << y << " ACTIVE" << std::endl;
     1430               
    14061431//              std::ostringstream p2m_signame;
    14071432//              p2m_signame << "[SIG]PROC_" << x << "_" << y << "_" << l << " P2M" ;
     
    14191444//              p_rsp_signame << "[SIG]PROC_" << x << "_" << y << "_" << l << " RSP" ;
    14201445//              clusters[x][y]->signal_int_dspin_rsp_proc_i[l].print_trace(p_rsp_signame.str());
     1446
    14211447            }   
    14221448
     
    14591485            }
    14601486
    1461             // trace RAM network
    1462             for( size_t cluster = 0 ; cluster < XMAX*YMAX ; cluster++ )
    1463             {
    1464                 size_t x = cluster / YMAX;
    1465                 size_t y = cluster % YMAX;
    1466                 clusters[x][y]->ram_router_cmd->print_trace();
    1467                 clusters[x][y]->ram_router_rsp->print_trace();
    1468             }
     1487            // trace RAM network routers
     1488//          for( size_t cluster = 0 ; cluster < XMAX*YMAX ; cluster++ )
     1489//          {
     1490//              size_t x = cluster / YMAX;
     1491//              size_t y = cluster % YMAX;
     1492//              clusters[x][y]->ram_router_cmd->print_trace();
     1493//              clusters[x][y]->ram_router_rsp->print_trace();
     1494//          }
    14691495       
    14701496            // trace iob, iox and external peripherals 
     
    14791505                signal_vci_tgt_iob0.print_trace("[SIG]IOB0_IOX_TGT");
    14801506
    1481                 signal_dspin_cmd_iob0_loopback.print_trace("[SIG]IOB0_CMD_LOOPBACK");
    1482                 signal_dspin_rsp_iob0_loopback.print_trace("[SIG]IOB0_RSP_LOOPBACK");
     1507//              signal_dspin_cmd_iob0_loopback.print_trace("[SIG]IOB0_CMD_LOOPBACK");
     1508//              signal_dspin_rsp_iob0_loopback.print_trace("[SIG]IOB0_RSP_LOOPBACK");
    14831509
    14841510//              cdma->print_trace();
     
    14861512//              signal_vci_ini_cdma.print_trace("[SIG]IOX_CDMA_INI");
    14871513
    1488 //              brom->print_trace();
    1489 //              signal_vci_tgt_brom.print_trace("[SIG]IOX_BROM_TGT");
     1514                brom->print_trace();
     1515                signal_vci_tgt_brom.print_trace("[SIG]IOX_BROM_TGT");
    14901516
    14911517//              mtty->print_trace();
  • trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp

    r550 r584  
    206206                     mt_int,                            // mapping table INT network
    207207                     IntTab(cluster_id,xicu_int_tgtid), // TGTID direct space
    208                      nb_procs,                          // number of timer IRQs
     208                     32,                                // number of timer IRQs
    209209                     32,                                // number of hard IRQs
    210210                     32,                                // number of soft IRQs
     
    366366    std::ostringstream s_ram_router_cmd;
    367367    s_ram_router_cmd << "ram_router_cmd_" << x_id << "_" << y_id;
     368    size_t is_iob0 = (x_id == 0) and (y_id == 0);
     369    size_t is_iob1 = (x_id == (xmax-1)) and (y_id == (ymax-1));
    368370    ram_router_cmd = new DspinRouterTsar<dspin_ram_cmd_width>(
    369371                     s_ram_router_cmd.str().c_str(),
    370                      x_id, y_id,                  // router coordinates in mesh
    371                      x_width,                     // x field width in first flit
    372                      x_width,                     // y field width in first flit
    373                      4, 4,                        // input & output fifo depths
    374                      cluster_iob0,                // cluster containing IOB0
    375                      cluster_iob1,                // cluster containing IOB1
    376                      l_width,                     // local field width in first flit
    377                      iobx_ram_srcid );            // IOB local index
     372                     x_id, y_id,                     // router coordinates in mesh
     373                     x_width,                        // x field width in first flit
     374                     y_width,                        // y field width in first flit
     375                     4, 4,                           // input & output fifo depths
     376                     is_iob0,                        // cluster contains IOB0
     377                     is_iob1,                        // cluster contains IOB1
     378                     false,                          // not a response router
     379                     l_width);                       // local field width in first flit
    378380
    379381    std::ostringstream s_ram_router_rsp;
     
    381383    ram_router_rsp = new DspinRouterTsar<dspin_ram_rsp_width>(
    382384                     s_ram_router_rsp.str().c_str(),
    383                      x_id, y_id,                  // coordinates in mesh
    384                      x_width,                     // x field width in first flit
    385                      y_width,                     // y field width in first flit
    386                      4, 4,                        // input & output fifo depths
    387                      cluster_iob0,                // cluster containing IOB0
    388                      cluster_iob1,                // cluster containing IOB1
    389                      l_width,                     // local field width in first flit
    390                      iobx_ram_srcid );            // IOB local index
     385                     x_id, y_id,                     // coordinates in mesh
     386                     x_width,                        // x field width in first flit
     387                     y_width,                        // y field width in first flit
     388                     4, 4,                           // input & output fifo depths
     389                     is_iob0,                        // cluster contains IOB0
     390                     is_iob1,                        // cluster contains IOB1
     391                     true,                           // response router
     392                     l_width);                       // local field width in first flit
    391393
    392394
     
    460462    // on coherence network : local srcid[proc] in [0...nb_procs-1]
    461463    //                      : local srcid[memc] = nb_procs
    462 
     464    // In cluster_iob0, 32 HWI interrupts from external peripherals
     465    // are connected to the XICU ports p_hwi[0:31]
     466    // In other clusters, no HWI interrupts are connected to XICU
     467 
    463468    //////////////////////// internal CMD & RSP routers
    464469    int_router_cmd->p_clk                        (this->p_clk);
     
    594599        xicu->p_irq[p]                           (signal_proc_it[p]);
    595600    }
    596     for ( size_t i=0 ; i<4 ; i++)
    597     {
    598         xicu->p_hwi[i]                           (signal_irq_mdma[i]);
    599     }
    600     for ( size_t i=4 ; i<32 ; i++)
     601    for ( size_t i=0 ; i<32 ; i++)
    601602    {
    602603        if (cluster_id == cluster_iob0)
    603         xicu->p_hwi[i]                           (*(this->p_irq[i]));
     604            xicu->p_hwi[i]                       (*(this->p_irq[i]));
    604605        else 
    605         xicu->p_hwi[i]                           (signal_false);
     606            xicu->p_hwi[i]                       (signal_false);
    606607    }                     
    607608
Note: See TracChangeset for help on using the changeset viewer.