Changeset 1016 for branches/reconfiguration/modules/dspin_router/caba/test/recovery_bcast_evaluation/dspin_broadcast_generator/caba/source/src/dspin_broadcast_generator.cpp
- Timestamp:
- Sep 14, 2015, 9:42:16 AM (9 years ago)
- 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 1 1 /* -*- c++ -*- 2 2 * SOCLIB_LGPL_HEADER_BEGIN 3 * 3 * 4 4 * This file is part of SoCLib, GNU LGPLv2.1. 5 * 5 * 6 6 * SoCLib is free software; you can redistribute it and/or modify it 7 7 * under the terms of the GNU Lesser General Public License as published 8 8 * by the Free Software Foundation; version 2.1 of the License. 9 * 9 * 10 10 * SoCLib is distributed in the hope that it will be useful, but 11 11 * WITHOUT ANY WARRANTY; without even the implied warranty of 12 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 13 * Lesser General Public License for more details. 14 * 14 * 15 15 * You should have received a copy of the GNU Lesser General Public 16 16 * License along with SoCLib; if not, write to the Free Software 17 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 18 18 * 02110-1301 USA 19 * 19 * 20 20 * SOCLIB_LGPL_HEADER_END 21 21 * 22 * Authors : alain.greiner@lip6.fr 22 * Authors : alain.greiner@lip6.fr 23 23 * Date : july 2010 24 24 * Copyright: UPMC - LIP6 … … 44 44 const size_t x_size, 45 45 const size_t y_size, 46 const size_t srcid, // srcid for random 46 const size_t srcid, // srcid for random 47 47 const size_t load, // requested load * 1000 48 48 const size_t fifo_depth) // Fifo depth 49 49 : BaseModule(name), 50 50 51 51 p_clk( "clk" ), 52 52 p_resetn( "resetn" ), … … 58 58 59 59 r_send_fsm( "r_send_fsm" ), 60 r_send_length( "r_send_length" ), 60 r_send_length( "r_send_length" ), 61 61 r_send_dest( "r_send_dest" ), 62 62 r_send_date( "r_send_date" ), … … 69 69 70 70 r_max_fill_status( "r_max_fill_status" ), 71 71 72 72 r_date_fifo( "r_date_fifo", fifo_depth ), 73 73 … … 127 127 128 128 /////////////////////////// CMD FSM 129 switch( r_send_fsm.read() ) 129 switch( r_send_fsm.read() ) 130 130 { 131 131 case SEND_IDLE: … … 141 141 break; 142 142 case SEND_BROADCAST: 143 if( p_out.read.read() ) 143 if( p_out.read.read() ) 144 144 { 145 145 r_send_length = r_send_length.read() - 1; … … 164 164 if (latency > r_receive_bc_max_latency.read()) 165 165 r_receive_bc_max_latency = latency; 166 166 167 167 r_receive_fsm = RECEIVE_IDLE; 168 168 } … … 178 178 if (r_date_fifo.filled_status() > r_max_fill_status.read()) 179 179 r_max_fill_status.write(r_date_fifo.filled_status()); 180 180 181 181 } // end transition 182 182 … … 210 210 p_out.eop = eop; 211 211 p_out.write = write; 212 212 213 213 p_in.read = true; 214 214 … … 221 221 const char* rsp_str[] = { "IDLE", "RECEIVE_BROADCAST" }; 222 222 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()] 226 226 << " / fifo_content = " << r_date_fifo.filled_status() << std::endl; 227 227 } // end print_trace … … 253 253 // indent-tabs-mode: nil 254 254 // End: 255 256 // vim: ts=4 : sts=4 : sw=4 : et
Note: See TracChangeset
for help on using the changeset viewer.