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/modules/vci_local_crossbar/caba/source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.