Changeset 1016 for branches/reconfiguration/modules/dspin_router/caba/test
- Timestamp:
- Sep 14, 2015, 9:42:16 AM (9 years ago)
- Location:
- branches/reconfiguration/modules/dspin_router/caba/test
- Files:
-
- 11 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 -
branches/reconfiguration/modules/dspin_router/caba/test/recovery_bcast_evaluation/soclib.conf
r1009 r1016 1 1 # append compilation flags 2 2 cflags = config.default.toolchain.cflags 3 #cflags.extend(['-ggdb']) 3 # cflags.extend(['-ggdb']) 4 # cflags.extend(['-DUNICAST']) 4 5 config.default.toolchain.set("cflags", cflags) 5 6 6 7 7 # append modules' description file paths -
branches/reconfiguration/modules/dspin_router/caba/test/recovery_bcast_evaluation/synthetic_dspin_network/caba/metadata/synthetic_dspin_network.sd
r1009 r1016 18 18 Uses('caba:dspin_broadcast_generator', 19 19 cmd_width=DSPIN_FLIT_WIDTH, 20 rsp_width=DSPIN_FLIT_WIDTH), 21 Uses('caba:dspin_packet_generator', 22 cmd_width=DSPIN_FLIT_WIDTH, 20 23 rsp_width=DSPIN_FLIT_WIDTH) 21 24 ], -
branches/reconfiguration/modules/dspin_router/caba/test/recovery_bcast_evaluation/synthetic_dspin_network/caba/source/include/synthetic_dspin_network.h
r1009 r1016 2 2 * 3 3 * SOCLIB_LGPL_HEADER_BEGIN 4 * 4 * 5 5 * This file is part of SoCLib, GNU LGPLv2.1. 6 * 6 * 7 7 * SoCLib is free software; you can redistribute it and/or modify it 8 8 * under the terms of the GNU Lesser General Public License as published 9 9 * by the Free Software Foundation; version 2.1 of the License. 10 * 10 * 11 11 * SoCLib is distributed in the hope that it will be useful, but 12 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 14 * Lesser General Public License for more details. 15 * 15 * 16 16 * You should have received a copy of the GNU Lesser General Public 17 17 * License along with SoCLib; if not, write to the Free Software 18 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 19 * 02110-1301 USA 20 * 20 * 21 21 * SOCLIB_LGPL_HEADER_END 22 22 * 23 * Authors : Cesar Armando Fuguet Tortolero 23 * Authors : Cesar Armando Fuguet Tortolero 24 24 * Date : jul 2015 25 25 * Copyright: UPMC - LIP6 … … 32 32 #include "caba_base_module.h" 33 33 #include "dspin_router.h" 34 35 #if UNICAST 36 #include "dspin_packet_generator.h" 37 #else 34 38 #include "dspin_broadcast_generator.h" 39 #endif 35 40 36 41 namespace soclib { … … 47 52 static const int DSPIN_GENERATOR_FIFO_DEPTH = 50; 48 53 54 #if UNICAST 55 typedef DspinPacketGenerator<DSPIN_WIDTH, DSPIN_WIDTH> 56 DspinNetworkGenerator; 57 #else 49 58 typedef DspinBroadcastGenerator<DSPIN_WIDTH, DSPIN_WIDTH> 50 59 DspinNetworkGenerator; 60 #endif 61 51 62 typedef DspinRouter<DSPIN_WIDTH> 52 63 DspinNetworkRouter; … … 54 65 DspinNetworkSignal; 55 66 56 67 57 68 public: 58 69 … … 71 82 void print_stats(const size_t x, const size_t y); 72 83 73 84 74 85 private: 75 86 76 87 const size_t m_x_size; 77 88 const size_t m_y_size; 78 89 79 90 DspinNetworkGenerator **dspinGenerator; 80 91 DspinNetworkRouter **dspinRouter; … … 83 94 DspinNetworkSignal ***sH; 84 95 DspinNetworkSignal ***sV; 85 96 86 97 sc_core::sc_signal<uint32_t>** sConfigRouter; 87 98 }; // end class SyntheticDspinNetwork -
branches/reconfiguration/modules/dspin_router/caba/test/recovery_bcast_evaluation/synthetic_dspin_network/caba/source/src/synthetic_dspin_network.cpp
r1009 r1016 2 2 * 3 3 * SOCLIB_LGPL_HEADER_BEGIN 4 * 4 * 5 5 * This file is part of SoCLib, GNU LGPLv2.1. 6 * 6 * 7 7 * SoCLib is free software; you can redistribute it and/or modify it 8 8 * under the terms of the GNU Lesser General Public License as published 9 9 * by the Free Software Foundation; version 2.1 of the License. 10 * 10 * 11 11 * SoCLib is distributed in the hope that it will be useful, but 12 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 14 * Lesser General Public License for more details. 15 * 15 * 16 16 * You should have received a copy of the GNU Lesser General Public 17 17 * License along with SoCLib; if not, write to the Free Software 18 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 19 * 02110-1301 USA 20 * 20 * 21 21 * SOCLIB_LGPL_HEADER_END 22 22 * 23 * Authors : Cesar Armando Fuguet Tortolero 23 * Authors : Cesar Armando Fuguet Tortolero 24 24 * Date : jul 2015 25 25 * Copyright: UPMC - LIP6 … … 34 34 namespace caba { 35 35 using namespace soclib::common; 36 36 37 37 38 38 SyntheticDspinNetwork::SyntheticDspinNetwork(sc_module_name name, … … 58 58 const int SRCID = (x << Y_WIDTH) | y; 59 59 generator_name << "generator[" << x << "][" << y << "]"; 60 #if UNICAST 61 const size_t PACKET_LENGTH = 8; 62 new(&dspinGenerator[x][y]) 63 DspinNetworkGenerator(generator_name.str().c_str(), 64 (size_t)SRCID, 65 PACKET_LENGTH, 66 load, 67 (size_t)DSPIN_GENERATOR_FIFO_DEPTH, 68 0 ); 69 #else 60 70 new(&dspinGenerator[x][y]) 61 71 DspinNetworkGenerator(generator_name.str().c_str(), … … 65 75 load, 66 76 DSPIN_GENERATOR_FIFO_DEPTH); 67 68 } 69 } 70 77 #endif 78 79 } 80 } 81 71 82 // DSPIN router instantiation 72 83 dspinRouter = (DspinNetworkRouter**) … … 74 85 75 86 for (size_t x = 0; x < m_x_size; ++x) { 76 87 dspinRouter[x] = (DspinNetworkRouter*) 77 88 malloc(sizeof(DspinNetworkRouter) * m_y_size); 78 89 … … 102 113 m_x_size, m_y_size); 103 114 104 115 105 116 // netlist 106 117 for (size_t x = 0; x < m_x_size; ++x) { … … 133 144 for (size_t x = 0; x < m_x_size; ++x) { 134 145 for (size_t y = 0; y < m_y_size; ++y) { 146 #if UNICAST 147 dspinGenerator[x][y].~DspinPacketGenerator(); 148 #else 135 149 dspinGenerator[x][y].~DspinBroadcastGenerator(); 150 #endif 136 151 dspinRouter[x][y].~DspinRouter(); 137 152 } … … 151 166 152 167 153 static inline uint32_t configRouter(int bypass_mode,154 int re allocation_dir,168 static inline uint32_t configRouter(int reallocation_dir, 169 int recovery_mode, 155 170 int blackhole_pos) 156 171 { 157 return (bypass_mode << 7) | (reallocation_dir << 4) | blackhole_pos; 172 return ((reallocation_dir & 0x7) << 5) | 173 ((recovery_mode & 0x1) << 4) | 174 (blackhole_pos & 0xF); 158 175 } 159 176 … … 164 181 for (size_t x = 0; x < m_x_size; ++x) { 165 182 for (size_t y = 0; y < m_y_size; ++y) { 166 const uint32_t CONFIG_NONE = configRouter(0, REQ_NOP, BH_NONE);183 const uint32_t CONFIG_NONE = configRouter(0, 0, NORMAL); 167 184 sConfigRouter[x][y].write(CONFIG_NONE); 168 185 } 169 186 } 170 187 171 188 172 189 // initialize mesh's boundary signals … … 184 201 } 185 202 } // end reset() 186 203 187 204 188 205 void SyntheticDspinNetwork::set_faulty_router(const size_t faulty_x, … … 199 216 // reconfigure the faulty router's contour 200 217 if (faulty_y < (m_y_size - 1)) { 201 const uint32_t CONFIG_N = configRouter( 1, REQ_SOUTH, BH_N);218 const uint32_t CONFIG_N = configRouter(REQ_SOUTH, 1, N_OF_X); 202 219 sConfigRouter[faulty_x][faulty_y + 1].write(CONFIG_N); 203 220 204 221 if (faulty_x > 0) { 205 const uint32_t CONFIG_NW = configRouter( 1, REQ_EAST, BH_NW);222 const uint32_t CONFIG_NW = configRouter(REQ_EAST, 1, NW_OF_X); 206 223 sConfigRouter[faulty_x - 1][faulty_y + 1].write(CONFIG_NW); 207 224 } 208 225 if (faulty_x < (m_x_size - 1)) { 209 const uint32_t CONFIG_NE = configRouter( 1, REQ_WEST, BH_NE);226 const uint32_t CONFIG_NE = configRouter(REQ_WEST, 1, NE_OF_X); 210 227 sConfigRouter[faulty_x + 1][faulty_y + 1].write(CONFIG_NE); 211 228 } … … 213 230 214 231 if (faulty_y > 0) { 215 const uint32_t CONFIG_S = configRouter( 1, REQ_NORTH, BH_S);232 const uint32_t CONFIG_S = configRouter(REQ_NORTH, 1, S_OF_X); 216 233 sConfigRouter[faulty_x][faulty_y - 1].write(CONFIG_S); 217 234 218 235 if (faulty_x > 0) { 219 const uint32_t CONFIG_SW = configRouter( 1, REQ_EAST, BH_SW);236 const uint32_t CONFIG_SW = configRouter(REQ_EAST, 1, SW_OF_X); 220 237 sConfigRouter[faulty_x - 1][faulty_y - 1].write(CONFIG_SW); 221 238 } 222 239 if (faulty_x < (m_x_size - 1)) { 223 const uint32_t CONFIG_SE = configRouter( 1, REQ_WEST, BH_SE);240 const uint32_t CONFIG_SE = configRouter(REQ_WEST, 1, SE_OF_X); 224 241 sConfigRouter[faulty_x + 1][faulty_y - 1].write(CONFIG_SE); 225 242 } … … 227 244 228 245 if (faulty_x > 0) { 229 const uint32_t CONFIG_W = configRouter( 1, REQ_EAST, BH_W);246 const uint32_t CONFIG_W = configRouter(REQ_EAST, 1, W_OF_X); 230 247 sConfigRouter[faulty_x - 1][faulty_y].write(CONFIG_W); 231 248 } 232 249 233 250 if (faulty_x < (m_x_size - 1)) { 234 const uint32_t CONFIG_E = configRouter( 1, REQ_WEST, BH_E);251 const uint32_t CONFIG_E = configRouter(REQ_WEST, 1, E_OF_X); 235 252 sConfigRouter[faulty_x + 1][faulty_y].write(CONFIG_E); 236 253 } … … 245 262 dspinGenerator[x][y].print_stats(); 246 263 } 247 264 248 265 249 266 } // end namespace caba … … 256 273 // indent-tabs-mode: nil 257 274 // End: 275 276 // vim: ts=4 : sts=4 : sw=4 : et -
branches/reconfiguration/modules/dspin_router/caba/test/recovery_bcast_evaluation/top.cpp
r1009 r1016 73 73 continue; 74 74 } 75 75 76 76 std::cout << " Arguments are (key, value) couples." << std::endl; 77 77 std::cout << " The order is not important." << std::endl; 78 78 std::cout << " Accepted arguments are :" << std::endl << std::endl; 79 std::cout << " -L dspingenerators' accepted load * 1000" << std::endl;79 std::cout << " -L generators' accepted load * 1000" << std::endl; 80 80 std::cout << " -X number of clusters per row" << std::endl; 81 81 std::cout << " -Y number of clusters per column" << std::endl; 82 82 std::cout << " -N simulation's cycles" << std::endl; 83 83 std::cout << " -F deactivate a router" << std::endl; 84 85 exit(1); 84 86 } 85 87 } // end parse_args() … … 137 139 // deactivate a router in the center of the mesh and create its 138 140 // recovery cycle-free contour 139 syntheticDspinNetwork.set_faulty_router(args.x_size / 2, args.y_size / 2); 141 syntheticDspinNetwork.set_faulty_router(args.x_size / 2, 142 args.y_size / 2); 140 143 } 141 144 … … 154 157 } 155 158 156 159 157 160 return 0; 158 161 } // end sc_main() … … 164 167 // indent-tabs-mode: nil 165 168 // End: 169 170 // vim: ts=4 : sts=4 : sw=4 : et -
branches/reconfiguration/modules/dspin_router/caba/test/simple_segment_recovery_test/Makefile
r934 r1016 70 70 71 71 mkconfig $(SIMULATOR) $(CONF): $(PLATFORM)/scripts/onerun.py 72 ./$< -o $(CONFDIR) -p $(PLATFORM) -x3 -y3 -n1 - c72 ./$< -o $(CONFDIR) -p $(PLATFORM) -x3 -y3 -n1 -f -c 73 73 74 74 $(BUILD_DIR): -
branches/reconfiguration/modules/dspin_router/caba/test/simple_segment_recovery_test/main.c
r947 r1016 25 25 /* configure the routers around the blackhole (1, 1) to define a cycle-free 26 26 * contour */ 27 const int PATH_RECOVERY = 1;27 const int RECOVERY = 1; 28 28 uint32_t val; 29 29 30 30 printf("router(0, 2): configuring as NW\n"); 31 assert(xcu_get_register(0, 2, XICU_CFG_REG, 0) == BH_NONE); 32 val = (PATH_RECOVERY << 7) | (REQ_SOUTH << 4) | BH_NW; 31 val = (REQ_SOUTH << 5) | (RECOVERY << 4) | NW_OF_X; 33 32 xcu_set_register(0, 2, XICU_CFG_REG, 0, val); /* configure NW */ 34 33 35 34 printf("router(0, 1): configuring as W\n"); 36 assert(xcu_get_register(0, 1, XICU_CFG_REG, 0) == BH_NONE); 37 val = (PATH_RECOVERY << 7) | (REQ_LOCAL << 4) | BH_W; 35 val = (REQ_LOCAL << 5) | (RECOVERY << 4) | W_OF_X; 38 36 xcu_set_register(0, 1, XICU_CFG_REG, 0, val); /* configure W */ 39 37 40 38 printf("router(0, 0): configuring as SW\n"); 41 assert(xcu_get_register(0, 0, XICU_CFG_REG, 0) == BH_NONE); 42 val = (PATH_RECOVERY << 7) | (REQ_NORTH << 4) | BH_SW; 39 val = (REQ_NORTH << 5) | (RECOVERY << 4) | SW_OF_X; 43 40 xcu_set_register(0, 0, XICU_CFG_REG, 0, val); /* configure SW */ 44 41 45 42 printf("router(1, 2): configuring as N\n"); 46 assert(xcu_get_register(1, 2, XICU_CFG_REG, 0) == BH_NONE); 47 val = (PATH_RECOVERY << 7) | (REQ_WEST << 4) | BH_N; 43 val = (REQ_WEST << 5) | (RECOVERY << 4) | N_OF_X; 48 44 xcu_set_register(1, 2, XICU_CFG_REG, 0, val); /* configure N */ 49 45 50 46 printf("router(2, 2): configuring as NE\n"); 51 assert(xcu_get_register(2, 2, XICU_CFG_REG, 0) == BH_NONE); 52 val = (PATH_RECOVERY << 7) | (REQ_WEST << 4) | BH_NE; 47 val = (REQ_WEST << 5) | (RECOVERY << 4) | NE_OF_X; 53 48 xcu_set_register(2, 2, XICU_CFG_REG, 0, val); /* configure NE */ 54 49 55 50 printf("router(2, 1): configuring as E\n"); 56 assert(xcu_get_register(2, 1, XICU_CFG_REG, 0) == BH_NONE); 57 val = (PATH_RECOVERY << 7) | (REQ_SOUTH << 4) | BH_E; 51 val = (REQ_SOUTH << 5) | (RECOVERY << 4) | E_OF_X; 58 52 xcu_set_register(2, 1, XICU_CFG_REG, 0, val); /* configure E */ 59 53 60 54 printf("router(2, 0): configuring as SE\n"); 61 assert(xcu_get_register(2, 0, XICU_CFG_REG, 0) == BH_NONE); 62 val = (PATH_RECOVERY << 7) | (REQ_WEST << 4) | BH_SE; 55 val = (REQ_WEST << 5) | (RECOVERY << 4) | SE_OF_X; 63 56 xcu_set_register(2, 0, XICU_CFG_REG, 0, val); /* configure SE */ 64 57 65 58 printf("router(1, 0): configuring as S\n"); 66 assert(xcu_get_register(1, 0, XICU_CFG_REG, 0) == BH_NONE); 67 val = (PATH_RECOVERY << 7) | (REQ_WEST << 4) | BH_S; 59 val = (REQ_WEST << 5) | (RECOVERY << 4) | S_OF_X; 68 60 xcu_set_register(1, 0, XICU_CFG_REG, 0, val); /* configure S */ 69 61 70 assert((xcu_get_register(0, 2, XICU_CFG_REG, 0) & 0xF) == BH_NW);71 assert((xcu_get_register(0, 1, XICU_CFG_REG, 0) & 0xF) == BH_W);72 assert((xcu_get_register(0, 0, XICU_CFG_REG, 0) & 0xF) == BH_SW);73 assert((xcu_get_register(1, 2, XICU_CFG_REG, 0) & 0xF) == BH_N);74 assert((xcu_get_register(2, 2, XICU_CFG_REG, 0) & 0xF) == BH_NE);75 assert((xcu_get_register(2, 1, XICU_CFG_REG, 0) & 0xF) == BH_E);76 assert((xcu_get_register(2, 0, XICU_CFG_REG, 0) & 0xF) == BH_SE);77 assert((xcu_get_register(1, 0, XICU_CFG_REG, 0) & 0xF) == BH_S);62 assert((xcu_get_register(0, 2, XICU_CFG_REG, 0) & 0xF) == NW_OF_X); 63 assert((xcu_get_register(0, 1, XICU_CFG_REG, 0) & 0xF) == W_OF_X); 64 assert((xcu_get_register(0, 0, XICU_CFG_REG, 0) & 0xF) == SW_OF_X); 65 assert((xcu_get_register(1, 2, XICU_CFG_REG, 0) & 0xF) == N_OF_X); 66 assert((xcu_get_register(2, 2, XICU_CFG_REG, 0) & 0xF) == NE_OF_X); 67 assert((xcu_get_register(2, 1, XICU_CFG_REG, 0) & 0xF) == E_OF_X); 68 assert((xcu_get_register(2, 0, XICU_CFG_REG, 0) & 0xF) == SE_OF_X); 69 assert((xcu_get_register(1, 0, XICU_CFG_REG, 0) & 0xF) == S_OF_X); 78 70 79 71 /* Test the recovered segment that has been migrated to the EAST cluster */ -
branches/reconfiguration/modules/dspin_router/caba/test/simple_segment_recovery_test/reset.S
r934 r1016 21 21 #define Y_MASK ((1<<Y_WIDTH)-1) 22 22 23 #define XCU_REG(func, idx) ((((func)<<5)|(idx)) << 2) 24 #define XCU_CFG_REG 17 25 #define XCU_BARRIER 5 26 27 #define MEMC_REG(func,idx) (((func<<7)|idx) << 2) 28 #define MEMC_CONFIG 0 29 #define MEMC_SCRATCHPAD 4 30 23 31 reset: 24 32 .set noreorder … … 33 41 34 42 /* 35 * All processors compute: 36 * cid = (x * Y_SIZE) + y 37 * pid = (cid * NB_PROCS_MAX) + lpid 43 * Get processor ID 38 44 */ 39 45 mfc0 k0, CP0_PROCID 40 andi k0, k0, 0xFFF /* k0 <= proc_xyl */46 andi k0, k0, 0xFFF /* k0 <= proc_xyl */ 41 47 42 /* Only the processor 0 continues the execution */ 48 /* 49 * Release local gateway hardware barrier 50 */ 51 la k1, SEG_XCU_BASE /* k1 <= ICU base address */ 52 li t0, XCU_REG(XCU_CFG_REG, XCU_BARRIER) 53 or k1, k1, t0 /* k1 <= &XICU[CFG_REG][BARRIER] */ 54 li t0, 0xFFFFFFFF 55 sw t0, 0(k1) 56 57 /* 58 * Disable the scratchpad mode on the local memory cache 59 */ 60 la k1, SEG_MMC_BASE /* k1 <= MMC base address */ 61 li t0, MEMC_REG(MEMC_CONFIG, MEMC_SCRATCHPAD) 62 or k1, k1, t0 /* k1 <= &MEMC[CONFIG][SCRATCHPAD] */ 63 sw zero, 0(k1) 64 65 /* Only the processor 0 continues the execution */ 43 66 beqz k0, 1f 44 67 nop … … 47 70 1: /* processor 0 initializes stack pointer (16K) */ 48 71 la sp, _stack 49 addiu sp, sp, (1<<14) /* sp <= _stack + 16K */72 addiu sp, sp, (1<<14) /* sp <= _stack + 16K */ 50 73 51 74 /* jumps to main in kernel mode */ -
branches/reconfiguration/modules/dspin_router/caba/test/simple_segment_recovery_test/test.sh
r942 r1016 13 13 PLATFORM=../../../../../platforms/tsar_generic_iob 14 14 SIMULATOR=$PLATFORM/simul.x 15 $SIMULATOR -DSOFT $SOFT -DISK /dev/null -FAULTY_ROUTER 0 1 1 > output/log 2>&1 15 $SIMULATOR -DSOFT $SOFT \ 16 -DISK /dev/null \ 17 -FAULTY_ROUTER 0 1 1 \ 18 -NCYCLES 20000 > output/log 2>&1 19 # -PROCID 0 \ 20 # -MEMCID 0x1 \ 21 # -DEBUG 3000 \ 22 16 23 soclib-cleanup-terms &> /dev/null 17 24 mv term0 output/term 18 25 grep -q "success" output/term 19 26 if [ $? == 0 ]; 20 21 27 then echo $(basename $PWD) ": Success"; 28 else echo $(basename $PWD) ": Failure"; 22 29 fi; -
branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/top.cpp
r998 r1016 44 44 } 45 45 46 static inline uint32_t configRouter(int bypass_mode,47 int re allocation_dir,46 static inline uint32_t configRouter(int reallocation_dir, 47 int recovery_mode, 48 48 int blackhole_pos) 49 49 { 50 return (bypass_mode << 7) | (reallocation_dir << 4) | blackhole_pos; 50 return ((reallocation_dir & 0x7) << 5) | 51 ((recovery_mode & 0x1) << 4) | 52 (blackhole_pos & 0xF); 51 53 } 52 54 … … 295 297 296 298 /* initialize the configuration signals */ 297 sConfigNONE.write(configRouter(0, REQ_NOP, BH_NONE)); 298 sConfigN.write(configRouter(1, REQ_SOUTH, BH_N)); 299 sConfigNE.write(configRouter(1, REQ_WEST, BH_NE)); 300 sConfigE.write(configRouter(1, REQ_WEST, BH_E)); 301 sConfigSE.write(configRouter(1, REQ_WEST, BH_SE)); 302 sConfigS.write(configRouter(1, REQ_NORTH, BH_S)); 303 sConfigSW.write(configRouter(1, REQ_EAST, BH_SW)); 304 sConfigW.write(configRouter(1, REQ_EAST, BH_W)); 305 sConfigNW.write(configRouter(1, REQ_EAST, BH_NW)); 299 sConfigNONE.write(configRouter(0, 0, NORMAL)); 300 301 // requests to the deactivated segment are dropped 302 sConfigN.write(configRouter(REQ_SOUTH, 1, N_OF_X)); 303 sConfigNE.write(configRouter(REQ_WEST, 1, NE_OF_X)); 304 sConfigE.write(configRouter(REQ_WEST, 1, E_OF_X)); 305 sConfigSE.write(configRouter(REQ_WEST, 1, SE_OF_X)); 306 sConfigS.write(configRouter(REQ_NORTH, 1, S_OF_X)); 307 sConfigSW.write(configRouter(REQ_EAST, 1, SW_OF_X)); 308 sConfigW.write(configRouter(REQ_EAST, 1, W_OF_X)); 309 sConfigNW.write(configRouter(REQ_EAST, 1, NW_OF_X)); 306 310 307 311 /* initialize mesh boundary signals */
Note: See TracChangeset
for help on using the changeset viewer.