Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1663 | pj | 1 | /* |
2 | Step 1b: Generation of the Shape of the hard periodic load |
||
3 | --------------------------------------------------------- |
||
4 | This is a variant for the step1. It simply produces a constant periodic |
||
5 | load. |
||
6 | */ |
||
7 | |||
8 | #include <stdio.h> |
||
9 | #include <stdlib.h> |
||
10 | |||
11 | #define MAX_BANDWIDTH 0xFFFFFFFF |
||
12 | |||
13 | int x; |
||
14 | int x_total[1000], x_B[1000]; |
||
15 | |||
16 | int main() |
||
17 | { |
||
18 | unsigned length; |
||
19 | unsigned i; |
||
20 | |||
21 | scanf("%d",&length); |
||
22 | |||
23 | srand(time(0)); |
||
24 | |||
25 | printf("2\n"); |
||
26 | |||
27 | i=(MAX_BANDWIDTH/100)*(rand()%90); |
||
28 | |||
29 | printf("0 %u\n",i); |
||
30 | printf("%u 0\n",length); |
||
31 | |||
32 | fprintf(stderr,"Bandwidth=%f",((double)i)/MAX_BANDWIDTH); |
||
33 | return 0; |
||
34 | } |