Changeset 345 for soft/giet_vm/router/main.c
- Timestamp:
- Jun 25, 2014, 2:19:37 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/router/main.c
r295 r345 3 3 #include "mapping_info.h" 4 4 #include "hard_config.h" 5 6 #if NB_TTY_CHANNELS == 1 7 # define printf(...) giet_shr_printf(__VA_ARGS__) 8 #else 9 # define printf(...) giet_tty_printf(__VA_ARGS__) 10 #endif 5 11 6 12 #define NMAX 50 … … 20 26 unsigned int y = cluster_xy & ((1<<Y_WIDTH)-1); 21 27 22 giet_tty_printf( "*** Starting task producer on processor[%d,%d,%d] at cycle %d\n\n",23 28 printf( "*** Starting task producer on processor[%d,%d,%d] at cycle %d\n\n", 29 x, y, lpid, giet_proctime() ); 24 30 25 31 giet_vobj_get_vbase( "router" , … … 32 38 buf = n; 33 39 mwmr_write( mwmr, &buf , 1 ); 34 giet_tty_printf( "transmitted value : %d\n", buf);40 printf( "transmitted value : %d\n", buf); 35 41 } 36 42 … … 52 58 unsigned int y = cluster_xy & ((1<<Y_WIDTH)-1); 53 59 54 giet_tty_printf( "*** Starting task consumer on processor[%d,%d,%d] at cycle %d\n\n",55 60 printf( "*** Starting task consumer on processor[%d,%d,%d] at cycle %d\n\n", 61 x, y, lpid, giet_proctime() ); 56 62 57 63 giet_vobj_get_vbase( "router" , … … 63 69 { 64 70 mwmr_read( mwmr, &buf , 1 ); 65 giet_tty_printf( "received token %d / value = %d\n", n , buf);71 printf( "received token %d / value = %d\n", n , buf); 66 72 } 67 73 … … 85 91 unsigned int y = cluster_xy & ((1<<Y_WIDTH)-1); 86 92 87 giet_tty_printf( "*** Starting task router on processor[%d,%d,%d] at cycle %d\n\n",88 93 printf( "*** Starting task router on processor[%d,%d,%d] at cycle %d\n\n", 94 x, y, lpid, giet_proctime() ); 89 95 90 96 giet_vobj_get_vbase( "router" , … … 101 107 tempo = giet_rand() >> 6; 102 108 for ( n = 0 ; n < tempo ; n++ ) asm volatile (""); 103 giet_tty_printf( "token value : %d / temporisation = %d\n", buf, tempo);109 printf( "token value : %d / temporisation = %d\n", buf, tempo); 104 110 mwmr_write( mwmr_out, &buf , 1 ); 105 111 }
Note: See TracChangeset
for help on using the changeset viewer.