- Timestamp:
- Feb 12, 2015, 2:59:20 PM (10 years ago)
- Location:
- branches/reconfiguration
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/modules/dspin_router/caba/test/common.mk
r887 r942 17 17 -fomit-frame-pointer \ 18 18 -march=mips32 \ 19 -O s\19 -Og \ 20 20 -ggdb \ 21 21 # -msoft-float \ -
branches/reconfiguration/modules/dspin_router/caba/test/simple_recovery_routing_test/main.c
r887 r942 30 30 */ 31 31 printf("router(0, 2): configuring as NW\n"); 32 assert(xcu_get_ config(0, 2, 0) == BH_NONE);33 xcu_set_ config(0, 2, 0, BH_NW); /* configure NW */32 assert(xcu_get_register(0, 2, XICU_CFG_REG, 0) == BH_NONE); 33 xcu_set_register(0, 2, XICU_CFG_REG, 0, BH_NW); /* configure NW */ 34 34 35 35 printf("router(0, 1): configuring as W\n"); 36 assert(xcu_get_ config(0, 1, 0) == BH_NONE);37 xcu_set_ config(0, 1, 0, BH_W); /* configure W */36 assert(xcu_get_register(0, 1, XICU_CFG_REG, 0) == BH_NONE); 37 xcu_set_register(0, 1, XICU_CFG_REG, 0, BH_W); /* configure W */ 38 38 39 39 printf("router(0, 0): configuring as SW\n"); 40 assert(xcu_get_ config(0, 0, 0) == BH_NONE);41 xcu_set_ config(0, 0, 0, BH_SW); /* configure SW */40 assert(xcu_get_register(0, 0, XICU_CFG_REG, 0) == BH_NONE); 41 xcu_set_register(0, 0, XICU_CFG_REG, 0, BH_SW); /* configure SW */ 42 42 43 43 printf("router(1, 2): configuring as N\n"); 44 assert(xcu_get_ config(1, 2, 0) == BH_NONE);45 xcu_set_ config(1, 2, 0, BH_N); /* configure N */44 assert(xcu_get_register(1, 2, XICU_CFG_REG, 0) == BH_NONE); 45 xcu_set_register(1, 2, XICU_CFG_REG, 0, BH_N); /* configure N */ 46 46 47 47 printf("router(2, 2): configuring as NE\n"); 48 assert(xcu_get_ config(2, 2, 0) == BH_NONE);49 xcu_set_ config(2, 2, 0, BH_NE); /* configure NE */48 assert(xcu_get_register(2, 2, XICU_CFG_REG, 0) == BH_NONE); 49 xcu_set_register(2, 2, XICU_CFG_REG, 0, BH_NE); /* configure NE */ 50 50 51 51 printf("router(2, 1): configuring as E\n"); 52 assert(xcu_get_ config(2, 1, 0) == BH_NONE);53 xcu_set_ config(2, 1, 0, BH_E); /* configure E */52 assert(xcu_get_register(2, 1, XICU_CFG_REG, 0) == BH_NONE); 53 xcu_set_register(2, 1, XICU_CFG_REG, 0, BH_E); /* configure E */ 54 54 55 55 printf("router(2, 0): configuring as SE\n"); 56 assert(xcu_get_ config(2, 0, 0) == BH_NONE);57 xcu_set_ config(2, 0, 0, BH_SE); /* configure SE */56 assert(xcu_get_register(2, 0, XICU_CFG_REG, 0) == BH_NONE); 57 xcu_set_register(2, 0, XICU_CFG_REG, 0, BH_SE); /* configure SE */ 58 58 59 59 printf("router(1, 0): configuring as S\n"); 60 assert(xcu_get_ config(1, 0, 0) == BH_NONE);61 xcu_set_ config(1, 0, 0, BH_S); /* configure S */60 assert(xcu_get_register(1, 0, XICU_CFG_REG, 0) == BH_NONE); 61 xcu_set_register(1, 0, XICU_CFG_REG, 0, BH_S); /* configure S */ 62 62 63 assert(xcu_get_ config(0, 2, 0) == BH_NW);64 assert(xcu_get_ config(0, 1, 0) == BH_W);65 assert(xcu_get_ config(0, 0, 0) == BH_SW);66 assert(xcu_get_ config(1, 2, 0) == BH_N);67 assert(xcu_get_ config(2, 2, 0) == BH_NE);68 assert(xcu_get_ config(2, 1, 0) == BH_E);69 assert(xcu_get_ config(2, 0, 0) == BH_SE);70 assert(xcu_get_ config(1, 0, 0) == BH_S);63 assert(xcu_get_register(0, 2, XICU_CFG_REG, 0) == BH_NW); 64 assert(xcu_get_register(0, 1, XICU_CFG_REG, 0) == BH_W); 65 assert(xcu_get_register(0, 0, XICU_CFG_REG, 0) == BH_SW); 66 assert(xcu_get_register(1, 2, XICU_CFG_REG, 0) == BH_N); 67 assert(xcu_get_register(2, 2, XICU_CFG_REG, 0) == BH_NE); 68 assert(xcu_get_register(2, 1, XICU_CFG_REG, 0) == BH_E); 69 assert(xcu_get_register(2, 0, XICU_CFG_REG, 0) == BH_SE); 70 assert(xcu_get_register(1, 0, XICU_CFG_REG, 0) == BH_S); 71 71 72 72 #if 0 … … 78 78 * between them. 79 79 */ 80 assert(xcu_get_ config(1, 1, 0) == BH_NONE);80 assert(xcu_get_register(1, 1, XICU_CFG_REG, 0) == BH_NONE); 81 81 #endif 82 82 -
branches/reconfiguration/modules/dspin_router/caba/test/simple_recovery_routing_test/test.sh
r934 r942 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 2> /dev/null >> output/log15 $SIMULATOR -DSOFT $SOFT -DISK /dev/null -FAULTY_ROUTER 0 1 1 > output/log 2>&1 16 16 soclib-cleanup-terms &> /dev/null 17 17 mv term0 output/term -
branches/reconfiguration/modules/dspin_router/caba/test/simple_segment_recovery_test/main.c
r934 r942 25 25 /* configure the routers around the blackhole (1, 1) to define a cycle-free 26 26 * contour */ 27 uint32_t val; 28 27 29 printf("router(0, 2): configuring as NW\n"); 28 assert(xcu_get_config(0, 2, 0) == BH_NONE); 29 xcu_set_config(0, 2, 0, (REQ_SOUTH << 4) | BH_NW); /* configure NW */ 30 assert(xcu_get_register(0, 2, XICU_CFG_REG, 0) == BH_NONE); 31 val = (REQ_SOUTH << 4) | BH_NW; 32 xcu_set_register(0, 2, XICU_CFG_REG, 0, val); /* configure NW */ 30 33 31 34 printf("router(0, 1): configuring as W\n"); 32 assert(xcu_get_config(0, 1, 0) == BH_NONE); 33 xcu_set_config(0, 1, 0, (REQ_LOCAL << 4) | BH_W); /* configure W */ 35 assert(xcu_get_register(0, 1, XICU_CFG_REG, 0) == BH_NONE); 36 val = (REQ_LOCAL << 4) | BH_W; 37 xcu_set_register(0, 1, XICU_CFG_REG, 0, val); /* configure W */ 34 38 35 39 printf("router(0, 0): configuring as SW\n"); 36 assert(xcu_get_config(0, 0, 0) == BH_NONE); 37 xcu_set_config(0, 0, 0, (REQ_NORTH << 4) | BH_SW); /* configure SW */ 40 assert(xcu_get_register(0, 0, XICU_CFG_REG, 0) == BH_NONE); 41 val = (REQ_NORTH << 4) | BH_SW; 42 xcu_set_register(0, 0, XICU_CFG_REG, 0, val); /* configure SW */ 38 43 39 44 printf("router(1, 2): configuring as N\n"); 40 assert(xcu_get_config(1, 2, 0) == BH_NONE); 41 xcu_set_config(1, 2, 0, (REQ_WEST << 4) | BH_N); /* configure N */ 45 assert(xcu_get_register(1, 2, XICU_CFG_REG, 0) == BH_NONE); 46 val = (REQ_WEST << 4) | BH_N; 47 xcu_set_register(1, 2, XICU_CFG_REG, 0, val); /* configure N */ 42 48 43 49 printf("router(2, 2): configuring as NE\n"); 44 assert(xcu_get_config(2, 2, 0) == BH_NONE); 45 xcu_set_config(2, 2, 0, (REQ_WEST << 4) | BH_NE); /* configure NE */ 50 assert(xcu_get_register(2, 2, XICU_CFG_REG, 0) == BH_NONE); 51 val = (REQ_WEST << 4) | BH_NE; 52 xcu_set_register(2, 2, XICU_CFG_REG, 0, val); /* configure NE */ 46 53 47 54 printf("router(2, 1): configuring as E\n"); 48 assert(xcu_get_config(2, 1, 0) == BH_NONE); 49 xcu_set_config(2, 1, 0, (REQ_SOUTH << 4) | BH_E); /* configure E */ 55 assert(xcu_get_register(2, 1, XICU_CFG_REG, 0) == BH_NONE); 56 val = (REQ_SOUTH << 4) | BH_E; 57 xcu_set_register(2, 1, XICU_CFG_REG, 0, val); /* configure E */ 50 58 51 59 printf("router(2, 0): configuring as SE\n"); 52 assert(xcu_get_config(2, 0, 0) == BH_NONE); 53 xcu_set_config(2, 0, 0, (REQ_WEST << 4) | BH_SE); /* configure SE */ 60 assert(xcu_get_register(2, 0, XICU_CFG_REG, 0) == BH_NONE); 61 val = (REQ_WEST << 4) | BH_SE; 62 xcu_set_register(2, 0, XICU_CFG_REG, 0, val); /* configure SE */ 54 63 55 64 printf("router(1, 0): configuring as S\n"); 56 assert(xcu_get_config(1, 0, 0) == BH_NONE); 57 xcu_set_config(1, 0, 0, (REQ_WEST << 4) | BH_S); /* configure S */ 65 assert(xcu_get_register(1, 0, XICU_CFG_REG, 0) == BH_NONE); 66 val = (REQ_WEST << 4) | BH_S; 67 xcu_set_register(1, 0, XICU_CFG_REG, 0, val); /* configure S */ 58 68 59 assert((xcu_get_ config(0, 2, 0) & 0xF) == BH_NW);60 assert((xcu_get_ config(0, 1, 0) & 0xF) == BH_W);61 assert((xcu_get_ config(0, 0, 0) & 0xF) == BH_SW);62 assert((xcu_get_ config(1, 2, 0) & 0xF) == BH_N);63 assert((xcu_get_ config(2, 2, 0) & 0xF) == BH_NE);64 assert((xcu_get_ config(2, 1, 0) & 0xF) == BH_E);65 assert((xcu_get_ config(2, 0, 0) & 0xF) == BH_SE);66 assert((xcu_get_ config(1, 0, 0) & 0xF) == BH_S);69 assert((xcu_get_register(0, 2, XICU_CFG_REG, 0) & 0xF) == BH_NW); 70 assert((xcu_get_register(0, 1, XICU_CFG_REG, 0) & 0xF) == BH_W); 71 assert((xcu_get_register(0, 0, XICU_CFG_REG, 0) & 0xF) == BH_SW); 72 assert((xcu_get_register(1, 2, XICU_CFG_REG, 0) & 0xF) == BH_N); 73 assert((xcu_get_register(2, 2, XICU_CFG_REG, 0) & 0xF) == BH_NE); 74 assert((xcu_get_register(2, 1, XICU_CFG_REG, 0) & 0xF) == BH_E); 75 assert((xcu_get_register(2, 0, XICU_CFG_REG, 0) & 0xF) == BH_SE); 76 assert((xcu_get_register(1, 0, XICU_CFG_REG, 0) & 0xF) == BH_S); 67 77 68 78 /* Test the recovered segment that has been migrated to the EAST cluster */ -
branches/reconfiguration/modules/dspin_router/caba/test/simple_segment_recovery_test/test.sh
r934 r942 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 2> /dev/null >> output/log15 $SIMULATOR -DSOFT $SOFT -DISK /dev/null -FAULTY_ROUTER 0 1 1 > output/log 2>&1 16 16 soclib-cleanup-terms &> /dev/null 17 17 mv term0 output/term -
branches/reconfiguration/softs/drivers/xcu.c
r887 r942 5 5 */ 6 6 #include <xcu.h> 7 #include <soclib/xicu.h>8 7 #include <io.h> 9 8 #include <hard_config.h> … … 12 11 #define XCUREG(func,idx) (SEG_XCU_BASE + (XICU_REG((func),(idx)) << 2)) 13 12 14 void xcu_set_ config(int x, int y, int idx, uint32_t val)13 void xcu_set_register(int x, int y, int func, int idx, uint32_t val) 15 14 { 16 iowrite32(CLUSTER_BASE(x,y) | XCUREG( XICU_CFG_REG, idx), val);15 iowrite32(CLUSTER_BASE(x,y) | XCUREG(func, idx), val); 17 16 } 18 17 19 uint32_t xcu_get_ config(int x, int y, int idx)18 uint32_t xcu_get_register(int x, int y, int func, int idx) 20 19 { 21 return ioread32(CLUSTER_BASE(x,y) | XCUREG( XICU_CFG_REG, idx));20 return ioread32(CLUSTER_BASE(x,y) | XCUREG(func, idx)); 22 21 } 23 22 -
branches/reconfiguration/softs/drivers/xcu.h
r887 r942 7 7 #define XCU_H 8 8 9 #include <soclib/xicu.h> 9 10 #include <stdint.h> 10 11 11 void xcu_set_ config(int x, int y, int idx, uint32_t val);12 uint32_t xcu_get_ config(int x, int y, int idx);12 void xcu_set_register(int x, int y, int func, int idx, uint32_t val); 13 uint32_t xcu_get_register(int x, int y, int func, int idx); 13 14 14 15 #endif
Note: See TracChangeset
for help on using the changeset viewer.