Last change
on this file since 823 was
623,
checked in by alain, 11 years ago
|
Introducing the soft_hello_giet application.
|
File size:
659 bytes
|
Line | |
---|
1 | #include "hard_config.h" |
---|
2 | #include "stdio.h" |
---|
3 | |
---|
4 | void main() |
---|
5 | { |
---|
6 | char c; |
---|
7 | unsigned int proc_id = _procid(); |
---|
8 | unsigned int l = (proc_id % NB_PROCS_MAX); |
---|
9 | unsigned int x = (proc_id / NB_PROCS_MAX) >> Y_WIDTH; |
---|
10 | unsigned int y = (proc_id / NB_PROCS_MAX) & ((1<<Y_WIDTH) - 1); |
---|
11 | while ( 1 ) |
---|
12 | { |
---|
13 | _tty_printf("hello world... from processor [%d,%d,%d]\n",x,y,l); |
---|
14 | |
---|
15 | _tty_getc( &c ); |
---|
16 | } |
---|
17 | } // end main() |
---|
18 | |
---|
19 | // Local Variables: |
---|
20 | // tab-width: 3 |
---|
21 | // c-basic-offset: 3 |
---|
22 | // c-file-offsets:((innamespace . 0)(inline-open . 0)) |
---|
23 | // indent-tabs-mode: nil |
---|
24 | // End: |
---|
25 | |
---|
26 | // vim: filetype=cpp:expandtab:shiftwidth=3:tabstop=3:softtabstop=3 |
---|
27 | |
---|
28 | |
---|
29 | |
---|
Note: See
TracBrowser
for help on using the repository browser.