-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cpp
74 lines (58 loc) · 1.85 KB
/
main.cpp
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
#include <iostream>
#include "CPU.h"
#include "Instruction.h"
#include "inputException.h"
using namespace std;
int main ()
{
//SEBA
/*try {
CPU one ("C:/Users/Seba/Documents/330_Project/MipsPipelinedSimulator/MipsPipelinedSimulator/input2.txt");
}
catch(const inputException & inp)
{
cout << "File input error: \nIncorrect syntax at line: " <<inp.what();
exit(0);
}
catch(const invalid_argument & inp)
{
cout << "File input error: \nInvalid argument at line: " <<inp.what();
}*/
//
// //NESMA
// try {
// CPU one ("C:/Users/NesmaBadr/Desktop/Fall 2015/CS 330/330project/input.txt");
// }
// catch(const inputException & inp)
// {
// cout << "File input error: \nIncorrect syntax at line: " <<inp.what();
// exit(0);
// }
//INGY
try {
CPU ingy ("input4.txt");
ingy.loadAndParse();
do{
ingy.test();
ingy.incrementClk();
} while (ingy.getClk() < ingy.getClkWAtFinal());
cout <<"blaaaaa";
// for (int i = 0; i < btb.size(); i++)
// cout << btb[i].branchAddress << btb[i].predictedPC << btb[i].taken << endl;
}
catch(const inputException & inp)
{
cout << "File input error: \nIncorrect syntax at line: " <<inp.what();
exit(0);
}
catch(const invalid_argument & inp)
{
cout << "File input error: \nInvalid argument at line: " <<inp.what();
}
//CPU one ("C:/Users/NesmaBadr/Desktop/Fall 2015/CS 330/330project/input.txt");
//CPU one ("C:/Users/Seba/Documents/330_Project/MipsPipelinedSimulator/MipsPipelinedSimulator/input2.txt");
//CPU alia ("/Users/Alia/Desktop/MipsPipelinedSimulator/MipsPipelinedSimulator/input4.txt");
// CPU ingy ("input2.txt");
system ("Pause");
return 0;
}