Changeset 1016 for branches/reconfiguration/modules/dspin_router/caba/test/simple_segment_recovery_test
- Timestamp:
- Sep 14, 2015, 9:42:16 AM (9 years ago)
- Location:
- branches/reconfiguration/modules/dspin_router/caba/test/simple_segment_recovery_test
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note: See TracChangeset
for help on using the changeset viewer.