-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathinterrupts.cpp
More file actions
44 lines (27 loc) · 1.13 KB
/
interrupts.cpp
File metadata and controls
44 lines (27 loc) · 1.13 KB
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
/**
*
* @file interrupts.cpp
* @author Sasisekhar Govind
*
*/
#include<interrupts.hpp>
int main(int argc, char** argv) {
//vectors is a C++ std::vector of strings that contain the address of the ISR
//delays is a C++ std::vector of ints that contain the delays of each device
//the index of these elemens is the device number, starting from 0
auto [vectors, delays] = parse_args(argc, argv);
std::ifstream input_file(argv[1]);
std::string trace; //!< string to store single line of trace file
std::string execution; //!< string to accumulate the execution output
/******************ADD YOUR VARIABLES HERE*************************/
/******************************************************************/
//parse each line of the input trace file
while(std::getline(input_file, trace)) {
auto [activity, duration_intr] = parse_trace(trace);
/******************ADD YOUR SIMULATION CODE HERE*************************/
/************************************************************************/
}
input_file.close();
write_output(execution);
return 0;
}