diff --git a/csrc/emulator.cc b/csrc/emulator.cc index 0b000388..e7041262 100644 --- a/csrc/emulator.cc +++ b/csrc/emulator.cc @@ -29,7 +29,6 @@ int main(int argc, char** argv) const char* failure = NULL; disassembler disasm; bool dramsim2 = false; - std::vector target_args; for (int i = 1; i < argc; i++) { @@ -46,19 +45,6 @@ int main(int argc, char** argv) max_cycles = atoll(argv[i]+12); else if (arg.substr(0, 9) == "+loadmem=") loadmem = argv[i]+9; - else if (arg.substr(0, 1) != "-" || arg.substr(0, 1) != "+") - target_args = std::vector(argv + i, argv + argc); - else - { - fprintf(stderr, "unknown option: %s\n", argv[i]); - exit(1); - } - } - - if (target_args.empty()) - { - fprintf(stderr, "usage: %s [host options] [target args]\n", argv[0]); - exit(1); } const int disasm_len = 24; @@ -85,7 +71,7 @@ int main(int argc, char** argv) tile.init(random_seed != 0); // Instantiate HTIF - htif = new htif_emulator_t(target_args); + htif = new htif_emulator_t(std::vector(argv + 1, argv + argc)); int htif_bits = tile.Top__io_host_in_bits.width(); assert(htif_bits % 8 == 0 && htif_bits <= val_n_bits()); diff --git a/emulator/Makefile b/emulator/Makefile index 4fd8c813..484ac655 100644 --- a/emulator/Makefile +++ b/emulator/Makefile @@ -69,13 +69,13 @@ output: mkdir -p $@ output/%.run: output/%.hex emulator - ./emulator +dramsim +max-cycles=3000000 +loadmem=$< none 2> /dev/null + ./emulator +dramsim +max-cycles=3000000 +coremap-random +loadmem=$< none 2> /dev/null output/%.out: output/%.hex emulator - ./emulator +dramsim +max-cycles=3000000 +verbose +loadmem=$< none 2> $@ + ./emulator +dramsim +max-cycles=3000000 +verbose +coremap-random +loadmem=$< none 2> $@ output/%.vpd: output/%.hex emulator-debug - ./emulator-debug +dramsim +max-cycles=3000000 +verbose -v- +loadmem=$< none 2> $(patsubst %.vpd,%.out,$@) | vcd2vpd - $@ > /dev/null && [ $$PIPESTATUS -eq 0 ] + ./emulator-debug +dramsim +max-cycles=3000000 +verbose -v- +coremap-random +loadmem=$< none 2> $(patsubst %.vpd,%.out,$@) | vcd2vpd - $@ > /dev/null && [ $$PIPESTATUS -eq 0 ] run-asm-tests: $(addprefix output/, $(addsuffix .out, $(global_asm_tests) $(global_asm_vm_tests))) @echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' $^; echo;