ysyx-workbench/npc/csrc/Flow/config.cpp
xinyangli 24aeabee4f
All checks were successful
Build npc tests / npc-build (flow) (push) Successful in 3m7s
Build npc tests / npc-build (flow-simlib) (push) Successful in 3m13s
Build abstract machine with nix / build-packages (nemu) (pull_request) Successful in 25s
Build abstract machine with nix / build-packages (nemu-lib) (pull_request) Successful in 19s
Build abstract machine with nix / build-packages (rv32Cross.abstract-machine) (pull_request) Successful in 7s
Build abstract machine with nix / build-packages (abstract-machine) (pull_request) Successful in 1m23s
npc,fix: bugs of new arch in cpu-tests
2024-09-06 14:57:11 +08:00

22 lines
718 B
C++

#include "config.hpp"
void Config::cli_parse(int argc, char **argv) {
CLI::App app;
app.add_option("-l,--listen", gdbsocket,
"Listen to debugger at this address");
app.add_flag("-g", do_debug, "Listen for gdb");
app.add_option("-m,--memory", memory_file, "Content of memory")
->check(CLI::ExistingFile);
app.add_flag("!--no-bin", memory_file_binary,
"Memory file is in text format");
app.add_option("--wav", wavefile, "output .vcd file path");
app.add_flag("-i", interactive, "Launch sdb for interactive session");
try {
app.parse(argc, argv);
} catch (const CLI::ParseError &e) {
exit((app).exit(e));
}
}
Config config{.wavefile = "flowwave.vcd"};