Changeset 1001


Ignore:
Timestamp:
Jun 16, 2015, 9:24:36 PM (9 years ago)
Author:
cfuguet
Message:

reconf: introducing a hardware barrier in the global-local interface of
the local interconnects.

  • This barrier is controlled by a port (barrier enable) in the dspin and vci local interconnects.
  • The barrier enable port is connected to a configuration register of the XICU component to allow the software to control this barrier. The barrier is enabled when the barrier enable port value is different of 0xFFFFFFFF. As the configuration register of the XICU component are reset to 0, this barrier is enabled by default.
  • This barrier allows to isolate the cluster from the rest of the architecture and only if it self-diagnoses as functional, it release the barrier to communicate with the others.
  • The same barrier enable signal is connected to the five local interconnects. Therefore, either all are released or all are disabled.
  • If a local initiator or an external initiator sends a packet out or into the cluster respectively, and the barrier is enabled, the packet is dropped.
Location:
branches/reconfiguration
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/reconfiguration/modules/dspin_local_crossbar/caba/source/include/dspin_local_crossbar.h

    r977 r1001  
    7070        DspinOutput<flit_width>*        p_local_out;
    7171
     72        sc_in<uint32_t>                *p_barrier_enable;
     73
    7274        void      print_trace();
    7375
     
    8688                            const bool          is_cmd,
    8789                            const bool          use_routing_table,
    88                             const bool          broadcast_supported );
     90                            const bool          broadcast_supported,
     91                            const bool          hardware_barrier = false );
    8992
    9093        ~DspinLocalCrossbar();
  • branches/reconfiguration/modules/dspin_local_crossbar/caba/source/src/dspin_local_crossbar.cpp

    r977 r1001  
    5252                                const bool           is_cmd,
    5353                                const bool           use_routing_table,
    54                                 const bool           broadcast_supported)
     54                                const bool           broadcast_supported,
     55                                const bool           hardware_barrier )
    5556    : BaseModule(name),
    5657
     
    141142        }
    142143
     144        if ( hardware_barrier )
     145        {
     146            p_barrier_enable = new sc_in<uint32_t>("p_barrier_enable");
     147        }
     148        else
     149        {
     150            p_barrier_enable = NULL;
     151        }
     152
    143153        assert( (flit_width >= x_width + y_width + l_width) and
    144154        "ERROR in DSPIN_LOCAL_CROSSBAR: flit_width < x_width + y_width + l_width");
     
    281291        internal_flit_t     fifo_out_wdata[m_local_outputs+1];
    282292
     293        // local-to-global and global-to-local hardware barrier enable signal
     294        const bool barrier_enable = (p_barrier_enable != NULL) and
     295                                    (p_barrier_enable->read() != 0xFFFFFFFF);
     296
    283297        // reset
    284298        if ( p_resetn.read() == false )
     
    326340        for ( size_t j = 0 ; j <= m_local_outputs ; j++ )
    327341        {
    328             if( r_alloc_out[j].read() and (r_fifo_out[j].wok()) )
     342            bool read = r_fifo_out[j].wok();
     343            if ( j == m_local_outputs )
     344            {
     345                read = read or barrier_enable;
     346            }
     347            if( r_alloc_out[j].read() and read )
    329348            {
    330349                get_out[j] = r_index_out[j].read();
     
    349368                {
    350369                    put_in[i] = false;
    351                     if ( r_fifo_in[i].rok() ) // packet available in input fifo
     370
     371                    bool write = r_fifo_in[i].rok();
     372                    if ( i == m_local_inputs )
     373                    {
     374                        write = write and not barrier_enable;
     375                    }
     376                    if ( write ) // packet available in input fifo
    352377                    {
    353378                        if ( is_broadcast(r_fifo_in[i].read().data ) and
     
    491516            }
    492517        }  // end loop on input ports
     518        fifo_in_read[m_local_inputs] = fifo_in_read[m_local_inputs] or barrier_enable;
    493519
    494520        // loop on the output ports :
     
    499525            if( r_alloc_out[j] )  // output port allocated
    500526            {
    501                 fifo_out_write[j] = put_in[r_index_out[j]];
     527                bool write = put_in[r_index_out[j]];
     528                if (j == m_local_outputs)
     529                {
     530                    write = write and not barrier_enable;
     531                }
     532                fifo_out_write[j] = write;
    502533                fifo_out_wdata[j] = data_in[r_index_out[j]];
     534
    503535            }
    504536        }  // end loop on the output ports
  • branches/reconfiguration/modules/vci_cc_vcache_wrapper/caba/source/src/vci_cc_vcache_wrapper.cpp

    r988 r1001  
    61476147            uint64_t header = p_dspin_m2p.data.read();
    61486148            uint64_t dest = DDP::dspin_get(header, DDP::TEST_M2P_DEST);
    6149             assert((size_t)dest == m_cc_global_id);
     6149
     6150            if ((size_t)dest != m_cc_global_id) {
     6151                std::cout << this->name() << ": ERROR in CC_RECEIVE_TEST_HEADER"
     6152                          << " / cycle: " << std::dec << m_cpt_total_cycles
     6153                          << " / TEST_M2P packet received but its destination (" << dest << ")"
     6154                          << "is not the current processor (" << m_cc_global_id << ")"
     6155                          << std::endl;
     6156                exit(1);
     6157            }
    61506158
    61516159            r_cc_receive_fsm = CC_RECEIVE_TEST_SIGNATURE;
  • branches/reconfiguration/modules/vci_local_crossbar/caba/source/include/vci_local_crossbar.h

    r932 r1001  
    5656    sc_in<bool>                               p_resetn;
    5757
     58    sc_in<uint32_t>                          *p_barrier_enable;
     59
    5860    VciInitiator<vci_param>                  *p_to_target;
    5961    VciTarget<vci_param>                     *p_to_initiator;
     
    9294                                          const size_t                        nb_attached_initiators,
    9395                                          const size_t                        nb_attached_targets,
    94                       const size_t                        default_target_id );
     96                      const size_t                        default_target_id,
     97                      const bool                          hardware_barrier = false );
    9598    ~VciLocalCrossbar();
    9699};
  • branches/reconfiguration/modules/vci_local_crossbar/caba/source/src/vci_local_crossbar.cpp

    r933 r1001  
    7878    const void*                 m_lt;           // locality table if cmd / id_locality table if rsp
    7979    const bool              m_is_cmd;       // cmd crossbar when true
     80    bool                    m_barrier;      // barrier in the global interface is enabled
    8081
    8182    sc_signal<bool>*            r_allocated;    // for each output port: allocation state
     
    9798          m_rt( rt ),
    9899          m_lt( lt ),
    99       m_is_cmd( is_cmd )
     100      m_is_cmd( is_cmd ),
     101      m_barrier( false )
    100102        {
    101103            r_allocated = new sc_signal<bool>[out_size];
     
    104106            r_bc_count  = new sc_signal<size_t>[in_size];
    105107        } // end constructor
     108
     109    //////////////////////////////////
     110    void setBarrier(const bool &value)
     111    {
     112        m_barrier = value;
     113    }
    106114
    107115    ////////////
     
    147155            }
    148156        }
     157        std::cout << " / barrier enable = " << m_barrier;
    149158    } // end print_trace()
    150159
     
    190199        for( size_t in = 0 ; in < m_in_size ; in++ )
    191200        {
    192             if ( input_port[in]->getVal() )
     201            /* drop global-to-local packets when the barrier is enabled */
     202            bool write = input_port[in]->getVal();
     203            if ( in == (m_in_size - 1) )
     204                write = write && !m_barrier;
     205
     206            if ( write )
    193207            {
    194208                if ( r_bc_state[in].read() )    // pending broadcast
     
    237251                {
    238252                    size_t in = (_in + r_origin[out] + 1) % m_in_size;
    239                     if ( input_port[in]->getVal() )
     253
     254                    /* drop global-to-local packets when the barrier is enabled */
     255                    bool write = input_port[in]->getVal();
     256                    if ( in == (m_in_size - 1) )
     257                        write = write && !m_barrier;
     258
     259                    if ( write )
    240260                    {
    241261                        pkt_t tmp;
     
    285305                pkt_t tmp;
    286306                tmp.readFrom(*input_port[in]);
     307
     308                // if the hardware barrier is activated, drop all
     309                // local-to-global packets. This is done by consuming every
     310                // incoming packet (send the acknowledgement to the input port)
     311                // and resetting the cmdval signal to the upper network level.
     312                bool read = output_port[out]->getAck();
     313                if (out == (m_out_size - 1)) {
     314                    read = read || m_barrier;
     315                    tmp.set_val(tmp.val() && !m_barrier);
     316                }
     317
     318                ack[in] = read;
    287319                tmp.writeTo(*output_port[out]);
    288                 ack[in] = output_port[out]->getAck();
     320
    289321                if ( r_bc_state[in].read() )                    // its a broacast
    290322                {
     
    299331            }
    300332        }
     333        // Drop all global-to-local packets when the hardware barrier is enabled
     334        ack[m_in_size - 1] = ack[m_in_size - 1] || m_barrier;
    301335
    302336        // Send acknowledges on input ports
     
    313347    std::cout << "LOCAL_CROSSBAR " << name() << " / ";
    314348    m_cmd_crossbar->print_trace();
    315     m_rsp_crossbar->print_trace();
     349    std::cout << " / ";
     350    m_rsp_crossbar->print_trace();
    316351    std::cout << std::endl;
    317352}
     
    327362    }
    328363
     364    if (p_barrier_enable != NULL)
     365    {
     366        const bool enable = (p_barrier_enable->read() != 0xFFFFFFFF);
     367        m_cmd_crossbar->setBarrier(enable);
     368        m_rsp_crossbar->setBarrier(enable);
     369    }
    329370    m_cmd_crossbar->transition( m_ports_to_initiator, m_ports_to_target );
    330371    m_rsp_crossbar->transition( m_ports_to_target, m_ports_to_initiator );
     
    344385                                  const size_t                       nb_attached_initiators,
    345386                                  const size_t                       nb_attached_targets,
    346                               const size_t                       default_target_id )
     387                              const size_t                       default_target_id,
     388                              const bool                         hardware_barrier )
    347389       : BaseModule(name),
    348390       p_clk("clk"),
     
    409451        m_ports_to_target[i] = &p_to_target[i];
    410452    m_ports_to_target[nb_attached_targets] = &p_initiator_to_up;
     453
     454    if (hardware_barrier)
     455        p_barrier_enable = new sc_in<uint32_t>("p_barrier_enable");
     456    else
     457        p_barrier_enable = NULL;
    411458}
    412459
  • branches/reconfiguration/platforms/tsar_generic_iob/Makefile

    r986 r1001  
    33SOCLIB_CC_ARGS := $(SOCLIB_CC_MODE)
    44SOCLIB_CC_ARGS += -v
     5#SOCLIB_CC_ARGS += -t envsystemc
    56#SOCLIB_CC_ARGS += -bcaba:reconf:vci_xicu
    67#SOCLIB_CC_ARGS += -bcaba:vci_iopic
  • branches/reconfiguration/platforms/tsar_generic_iob/top.cpp

    r1000 r1001  
    852852    sc_signal<bool>                   signal_resetn("resetn");
    853853
    854     sc_signal<bool>                   signal_irq_false;
     854    sc_signal<bool>                   signal_false;
     855
    855856    sc_signal<bool>                   signal_irq_bdev;
    856857    sc_signal<bool>                   signal_irq_mtty_rx[NB_TTY_CHANNELS];
     
    873874    VciSignals<vci_param_ext>         signal_vci_tgt_bdev("signal_vci_tgt_bdev");
    874875    VciSignals<vci_param_ext>         signal_vci_tgt_cdma("signal_vci_tgt_cdma");
    875     VciSignals<vci_param_ext>         signal_vci_tgt_iopi("signal_vci_ini_iopi");
    876     VciSignals<vci_param_ext>         signal_vci_tgt_simh("signal_vci_ini_simh");
    877     VciSignals<vci_param_ext>         signal_vci_tgt_rom("signal_vci_ini_rom");
     876    VciSignals<vci_param_ext>         signal_vci_tgt_iopi("signal_vci_tgt_iopi");
     877    VciSignals<vci_param_ext>         signal_vci_tgt_simh("signal_vci_tgt_simh");
     878    VciSignals<vci_param_ext>         signal_vci_tgt_rom("signal_vci_tgt_rom");
    878879
    879880   // Horizontal inter-clusters INT network DSPIN
     
    12261227    std::cout << std::endl;
    12271228
    1228 //    clusters[0][0]->xicu->set_faulty_wti(3, 0);
     1229    //clusters[0][0]->xicu->set_faulty_wti(4, 0);
    12291230
    12301231    ///////////////////////////////////////////////////////////////////////////////
     
    13231324    {
    13241325       if     (i < NB_NIC_CHANNELS)    iopi->p_hwi[i] (signal_irq_mnic_rx[i]);
    1325        else if(i < 2 )                 iopi->p_hwi[i] (signal_irq_false);
     1326       else if(i < 2 )                 iopi->p_hwi[i] (signal_false);
    13261327       else if(i < 2+NB_NIC_CHANNELS)  iopi->p_hwi[i] (signal_irq_mnic_tx[i-2]);
    1327        else if(i < 4 )                 iopi->p_hwi[i] (signal_irq_false);
     1328       else if(i < 4 )                 iopi->p_hwi[i] (signal_false);
    13281329       else if(i < 4+NB_CMA_CHANNELS)  iopi->p_hwi[i] (signal_irq_cdma[i-4]);
    1329        else if(i < 8)                  iopi->p_hwi[i] (signal_irq_false);
     1330       else if(i < 8)                  iopi->p_hwi[i] (signal_false);
    13301331       else if(i < 9)                  iopi->p_hwi[i] (signal_irq_bdev);
    1331        else if(i < 16)                 iopi->p_hwi[i] (signal_irq_false);
     1332       else if(i < 16)                 iopi->p_hwi[i] (signal_false);
    13321333       else if(i < 16+NB_TTY_CHANNELS) iopi->p_hwi[i] (signal_irq_mtty_rx[i-16]);
    1333        else                            iopi->p_hwi[i] (signal_irq_false);
     1334       else                            iopi->p_hwi[i] (signal_false);
    13341335    }
    13351336
     
    13651366            clusters[x][y]->p_clk     (signal_clk);
    13661367            clusters[x][y]->p_resetn  (signal_resetn);
     1368            clusters[x][y]->p_false   (signal_false);
    13671369        }
    13681370    }
     
    15131515
    15141516   signal_resetn = false;
    1515    signal_irq_false = false;
     1517   signal_false = false;
    15161518
    15171519   // network boundaries signals
     
    16241626               std::cout << "### IRQ_PROC_" << std::dec
    16251627                  << x << "_" << y << "_" << l << " ACTIVE" << std::endl;
     1628
     1629            c->int_xbar_d->print_trace();
    16261630         }
    16271631
  • branches/reconfiguration/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/include/tsar_iob_cluster.h

    r963 r1001  
    5353    sc_in<bool>                                        p_resetn;
    5454
     55    sc_in<bool>                                        p_false;
     56
    5557    // Thes two ports are used to connect IOB to IOX nework in top cell
    5658    soclib::caba::VciInitiator<vci_param_ext>*         p_vci_iob_iox_ini;
     
    6971
    7072    // interrupt signals
    71     sc_signal<bool>                       signal_false;
    7273    sc_signal<bool>                       signal_proc_it[16];
    7374    sc_signal<bool>                       signal_irq_mdma[8];
     
    7576    sc_signal<uint32_t>                   signal_cfg_router_cmd[3];
    7677    sc_signal<uint32_t>                   signal_cfg_router_rsp[2];
     78    sc_signal<uint32_t>                   signal_cfg_xbar_barrier;
    7779
    7880    // INT network DSPIN signals between DSPIN routers and DSPIN local_crossbars
  • branches/reconfiguration/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp

    r1000 r1001  
    9393            soclib::caba::BaseModule(insname),
    9494            p_clk("clk"),
    95             p_resetn("resetn")
     95            p_resetn("resetn"),
     96            p_false("false")
    9697{
    9798
     
    201202                     xcu_nb_wti,                          // number of soft IRQs
    202203                     xcu_nb_out,                          // number of output IRQs
    203                      5);                                  // number of config regs
     204                     6);                                  // number of config regs
    204205
    205206    ////////////  MDMA
     
    236237                     nb_direct_initiators,         // number of local initiators
    237238                     nb_direct_targets,            // number of local targets
    238                      0 );                          // default target
     239                     0,                            // default target
     240                     true );                       // hardware barrier
    239241
    240242    std::ostringstream s_int_dspin_ini_wrapper_gate_d;
     
    269271                     true,                         // pseudo CMD
    270272                     false,                        // no routing table
    271                      true );                       // broacast
     273                     true,                         // broacast
     274                     true );                       // hardware barrier
    272275
    273276    std::ostringstream s_int_xbar_p2m_c;
     
    283286                     false,                        // pseudo RSP
    284287                     false,                        // no routing table
    285                      false );                      // no broacast
     288                     false,                        // no broacast
     289                     true );                       // hardware barrier
    286290
    287291    std::ostringstream s_int_xbar_clack_c;
     
    297301                     true,                         // CMD
    298302                     false,                        // no routing table
    299                      false);                       // broadcast
     303                     false,                        // broadcast
     304                     true );                       // hardware barrier
    300305
    301306    const bool ROUTER_CONFIG_SUPPORTED = true;
     
    470475    int_router_rsp[1]->p_in[4]                   (signal_int_dspin_p2m_l2g_c);
    471476
    472     ///////////////////// CMD DSPIN  local crossbar direct
     477    ///////////////////// CMD & RSP local crossbar
    473478    int_xbar_d->p_clk                                 (this->p_clk);
    474479    int_xbar_d->p_resetn                              (this->p_resetn);
     480    (*int_xbar_d->p_barrier_enable)                   (signal_cfg_xbar_barrier);
    475481    int_xbar_d->p_initiator_to_up                     (signal_int_vci_l2g);
    476482    int_xbar_d->p_target_to_up                        (signal_int_vci_g2l);
     
    505511    int_xbar_m2p_c->p_clk                        (this->p_clk);
    506512    int_xbar_m2p_c->p_resetn                     (this->p_resetn);
     513    (*int_xbar_m2p_c->p_barrier_enable)          (signal_cfg_xbar_barrier);
    507514    int_xbar_m2p_c->p_global_out                 (signal_int_dspin_m2p_l2g_c);
    508515    int_xbar_m2p_c->p_global_in                  (signal_int_dspin_m2p_g2l_c);
     
    514521    int_xbar_p2m_c->p_clk                        (this->p_clk);
    515522    int_xbar_p2m_c->p_resetn                     (this->p_resetn);
     523    (*int_xbar_p2m_c->p_barrier_enable)          (signal_cfg_xbar_barrier);
    516524    int_xbar_p2m_c->p_global_out                 (signal_int_dspin_p2m_l2g_c);
    517525    int_xbar_p2m_c->p_global_in                  (signal_int_dspin_p2m_g2l_c);
     
    523531    int_xbar_clack_c->p_clk                      (this->p_clk);
    524532    int_xbar_clack_c->p_resetn                   (this->p_resetn);
     533    (*int_xbar_clack_c->p_barrier_enable)        (signal_cfg_xbar_barrier);
    525534    int_xbar_clack_c->p_global_out               (signal_int_dspin_clack_l2g_c);
    526535    int_xbar_clack_c->p_global_in                (signal_int_dspin_clack_g2l_c);
     
    547556            else
    548557            {
    549                 proc[p]->p_irq[j]                (signal_false);
     558                proc[p]->p_irq[j]                (this->p_false);
    550559            }
    551560        }
     
    564573        if      ( i == 0 )       xicu->p_hwi[i]  (signal_irq_memc);
    565574        else if ( i <= nb_dmas ) xicu->p_hwi[i]  (signal_irq_mdma[i-1]);
    566         else                     xicu->p_hwi[i]  (signal_false);
     575        else                     xicu->p_hwi[i]  (this->p_false);
    567576    }
    568577    xicu->p_cfg[0]                               (signal_cfg_router_cmd[0]); // CMD
     
    571580    xicu->p_cfg[3]                               (signal_cfg_router_rsp[1]); // P2M
    572581    xicu->p_cfg[4]                               (signal_cfg_router_cmd[2]); // CLACK
     582    xicu->p_cfg[5]                               (signal_cfg_xbar_barrier); // CLACK
    573583
    574584    ///////////////////////////////////// MEMC
Note: See TracChangeset for help on using the changeset viewer.