-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtester.c
112 lines (91 loc) · 1.84 KB
/
tester.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#include <stdio.h>
int main()
{
int i;
FILE* t3=fopen("./Tests/1000.hex","w");
FILE* s3=fopen("./Tests/step3","w");
for(i=0;i<1000;++i)
{
fprintf(t3,"014b4820\n");
fprintf(s3,"step\n");
}
for(i=0;i<10;++i)
{
fprintf(s3,"step\n");
}
fclose(t3);
fclose(s3);
FILE* t4=fopen("./Tests/10000.hex","w");
FILE* s4=fopen("./Tests/step4","w");
for(i=0;i<10000;++i)
{
fprintf(t4,"014b4820\n");
fprintf(s4,"step\n");
}
for(i=0;i<10;++i)
{
fprintf(s4,"step\n");
}
fclose(t4);
fclose(s4);
FILE* t5=fopen("./Tests/100000.hex","w");
FILE* s5=fopen("./Tests/step5","w");
for(i=0;i<100000;++i)
{
fprintf(t5,"014b4820\n");
fprintf(s5,"step\n");
}
for(i=0;i<10;++i)
{
fprintf(s5,"step\n");
}
fclose(t5);
fclose(s5);
FILE* t6=fopen("./Tests/1000000.hex","w");
FILE* s6=fopen("./Tests/step6","w");
for(i=0;i<1000000;++i)
{
fprintf(t6,"014b4820\n");
fprintf(s6,"step\n");
}
for(i=0;i<10;++i)
{
fprintf(s6,"step\n");
}
fclose(t6);
fclose(s6);
FILE* t7=fopen("./Tests/10000000.hex","w");
FILE* s7=fopen("./Tests/step7","w");
for(i=0;i<10000000;++i)
{
fprintf(t7,"014b4820\n");
fprintf(s7,"step\n");
}
for(i=0;i<10;++i)
{
fprintf(s7,"step\n");
}
fclose(t7);
fclose(s7);
FILE* t8=fopen("./Tests/100000000.hex","w");
FILE* s8=fopen("./Tests/step8","w");
for(i=0;i<100000000;++i)
{
fprintf(t8,"014b4820\n");
fprintf(s8,"step\n");
}
for(i=0;i<10;++i)
{
fprintf(s8,"step\n");
}
fclose(t8);
fclose(s8);
}
/*
./processor_simulator 1000.hex 1000.svg 1000.txt <step3
./processor_simulator 10000.hex 10000.svg 10000.txt <step4
./processor_simulator 100000.hex 100000.svg 100000.txt <step5
./processor_simulator 1000000.hex 1000000.svg 1000000.txt <step6
./processor_simulator 10000000.hex 10000000.svg 10000000.txt <step7
./processor_simulator 100000000.hex 100000000.svg 100000000.txt <step8
*/