|
Last change
on this file since 137 was
136,
checked in by rosiere, 16 years ago
|
|
1) Add new algo in ifetch queue
2) Add Cancel bit
3) new config
|
-
Property svn:keywords set to
Id
|
|
File size:
678 bytes
|
| Line | |
|---|
| 1 | // $Id: main.c 136 2009-10-20 18:52:15Z rosiere $ |
|---|
| 2 | |
|---|
| 3 | //=====[ main ]================================================================= |
|---|
| 4 | /* |
|---|
| 5 | * All thread execute this routine |
|---|
| 6 | * Initialize the thread and attribute a Workload at each thread |
|---|
| 7 | */ |
|---|
| 8 | |
|---|
| 9 | #include <stdlib.h> |
|---|
| 10 | |
|---|
| 11 | int f (int x) |
|---|
| 12 | { |
|---|
| 13 | int x1, x2, x3, x4, x5, x6, x7, x8; |
|---|
| 14 | |
|---|
| 15 | x1=x2=x3=x4=x5=x6=x7=x8=1; |
|---|
| 16 | |
|---|
| 17 | for (int i=0; i<x; ++i) |
|---|
| 18 | { |
|---|
| 19 | x1 += 2; |
|---|
| 20 | x2 += 3; |
|---|
| 21 | x3 += 5; |
|---|
| 22 | x4 += 7; |
|---|
| 23 | x5 += 9; |
|---|
| 24 | x6 +=11; |
|---|
| 25 | x7 +=13; |
|---|
| 26 | x8 +=17; |
|---|
| 27 | } |
|---|
| 28 | |
|---|
| 29 | return x1+x2+x3+x4+x5+x6+x7+x8; |
|---|
| 30 | } |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | int main() |
|---|
| 34 | { |
|---|
| 35 | f(1000); |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | unsigned int * addr = (unsigned int*)((0xa0000000) + 4); |
|---|
| 39 | /* *(addr) = a+b+c+d; */ |
|---|
| 40 | *(addr) = 0; |
|---|
| 41 | |
|---|
| 42 | /* _exit (0); */ |
|---|
| 43 | |
|---|
| 44 | while (1); |
|---|
| 45 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.