Ignore:
Timestamp:
Sep 14, 2015, 9:42:16 AM (9 years ago)
Author:
cfuguet
Message:

reconf: dspin_router

  • improve the code readability of the dspin_router model.
  • update the unitary tests of the dspin_router to support the local gateway hardware barrier, and the memory cache scratchpad mode.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/reconfiguration/modules/dspin_router/caba/test/recovery_bcast_evaluation/dspin_broadcast_generator/caba/source/src/dspin_broadcast_generator.cpp

    r1009 r1016  
    11/* -*- c++ -*-
    22 * SOCLIB_LGPL_HEADER_BEGIN
    3  * 
     3 *
    44 * This file is part of SoCLib, GNU LGPLv2.1.
    5  * 
     5 *
    66 * SoCLib is free software; you can redistribute it and/or modify it
    77 * under the terms of the GNU Lesser General Public License as published
    88 * by the Free Software Foundation; version 2.1 of the License.
    9  * 
     9 *
    1010 * SoCLib is distributed in the hope that it will be useful, but
    1111 * WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1313 * Lesser General Public License for more details.
    14  * 
     14 *
    1515 * You should have received a copy of the GNU Lesser General Public
    1616 * License along with SoCLib; if not, write to the Free Software
    1717 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    1818 * 02110-1301 USA
    19  * 
     19 *
    2020 * SOCLIB_LGPL_HEADER_END
    2121 *
    22  * Authors  : alain.greiner@lip6.fr 
     22 * Authors  : alain.greiner@lip6.fr
    2323 * Date     : july 2010
    2424 * Copyright: UPMC - LIP6
     
    4444                                     const size_t   x_size,
    4545                                     const size_t   y_size,
    46                                      const size_t   srcid,      // srcid for random 
     46                                     const size_t   srcid,      // srcid for random
    4747                                     const size_t   load,       // requested load * 1000
    4848                                     const size_t   fifo_depth) // Fifo depth
    4949           : BaseModule(name),
    50            
     50
    5151           p_clk( "clk" ),
    5252           p_resetn( "resetn" ),
     
    5858
    5959           r_send_fsm( "r_send_fsm" ),
    60            r_send_length( "r_send_length" ), 
     60           r_send_length( "r_send_length" ),
    6161           r_send_dest( "r_send_dest" ),
    6262           r_send_date( "r_send_date" ),
     
    6969
    7070           r_max_fill_status( "r_max_fill_status" ),
    71            
     71
    7272           r_date_fifo( "r_date_fifo", fifo_depth ),
    7373
     
    127127
    128128    /////////////////////////// CMD FSM
    129     switch( r_send_fsm.read() ) 
     129    switch( r_send_fsm.read() )
    130130    {
    131131        case SEND_IDLE:
     
    141141        break;
    142142        case SEND_BROADCAST:
    143             if( p_out.read.read() ) 
     143            if( p_out.read.read() )
    144144            {
    145145                r_send_length = r_send_length.read() - 1;
     
    164164            if (latency > r_receive_bc_max_latency.read())
    165165                r_receive_bc_max_latency = latency;
    166            
     166
    167167            r_receive_fsm = RECEIVE_IDLE;
    168168        }
     
    178178    if (r_date_fifo.filled_status() > r_max_fill_status.read())
    179179        r_max_fill_status.write(r_date_fifo.filled_status());
    180    
     180
    181181} // end transition
    182182
     
    210210    p_out.eop   = eop;
    211211    p_out.write = write;
    212    
     212
    213213    p_in.read = true;
    214214
     
    221221    const char* rsp_str[] = { "IDLE", "RECEIVE_BROADCAST" };
    222222
    223     std::cout << "DSPIN_GENERATOR " << name() 
    224               << " : send_fsm = " << cmd_str[r_send_fsm.read()] 
    225               << " / recv_fsm = " << rsp_str[r_receive_fsm.read()] 
     223    std::cout << "DSPIN_GENERATOR " << name()
     224              << " : send_fsm = " << cmd_str[r_send_fsm.read()]
     225              << " / recv_fsm = " << rsp_str[r_receive_fsm.read()]
    226226              << " / fifo_content = " << r_date_fifo.filled_status() << std::endl;
    227227} // end print_trace
     
    253253// indent-tabs-mode: nil
    254254// End:
     255
     256// vim: ts=4 : sts=4 : sw=4 : et
Note: See TracChangeset for help on using the changeset viewer.