10 fprintf(stderr
, "usage: riscv-isa-run [host options] <target program> [target options]\n");
11 fprintf(stderr
, "Host Options:\n");
12 fprintf(stderr
, " -p <n> Simulate <n> processors\n");
13 fprintf(stderr
, " -m <n> Provide <n> MB of target memory\n");
14 fprintf(stderr
, " -d Interactive debug mode\n");
15 fprintf(stderr
, " -h Print this help message\n");
19 int main(int argc
, char** argv
)
25 // parse command-line arguments
26 for(int c
; (c
= getopt(argc
,argv
,"hdp:m:")) != -1; )
34 nprocs
= atoi(optarg
);
37 mem_mb
= atoi(optarg
);
40 fprintf(stderr
, "unknown option: -%c", optopt
);
49 std::vector
<std::string
> htif_args(argv
+ optind
, argv
+ argc
);
50 sim_t
s(nprocs
, mem_mb
, htif_args
);