Reorganized directory structure
[riscv-isa-sim.git] / riscv / riscv-isa-run.cc
1 #include <unistd.h>
2 #include "common.h"
3 #include "sim.h"
4
5 int main(int argc, char** argv)
6 {
7 sim_t s(1,MEMSIZE);
8
9 bool debug = false;
10
11 for(int c; (c = getopt(argc,argv,"-d")) != -1; )
12 {
13 switch(c)
14 {
15 case '\1':
16 s.load_elf(optarg);
17 break;
18 case 'd':
19 debug = true;
20 break;
21 case '?':
22 demand(0,"unrecognized option %c",optopt);
23 }
24 }
25
26 s.run(debug);
27 }