Changeset 295 for soft/giet_vm/hello/main.c
- Timestamp:
- Mar 26, 2014, 6:44:44 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/hello/main.c
r254 r295 1 1 #include "stdio.h" 2 #include "hard_config.h" 2 3 3 4 __attribute__((constructor)) void main() … … 6 7 unsigned int proc = giet_procid(); 7 8 8 giet_tty_printf("Starting task HELLO on processor %d at cycle %d\n", 9 giet_procid(), giet_proctime() ); 10 9 unsigned int procid = giet_procid(); 10 unsigned int cluster_xy = procid/NB_PROCS_MAX; 11 unsigned int lpid = procid%NB_PROCS_MAX; 12 unsigned int x = cluster_xy >> Y_WIDTH; 13 unsigned int y = cluster_xy & ((1<<Y_WIDTH)-1); 14 15 giet_tty_printf( "*** Starting task hello on processor[%d,%d,%d] at cycle %d\n\n", 16 x, y, lpid, giet_proctime() ); 17 11 18 while (1) 12 19 { 13 giet_tty_printf(" hello from processor %d\n", proc);20 giet_tty_printf(" hello world\n"); 14 21 giet_tty_getc((void*)&byte); 15 22 if ( byte == 'q' ) giet_exit();
Note: See TracChangeset
for help on using the changeset viewer.