diff options
Diffstat (limited to 'ice40/main.cc')
-rw-r--r-- | ice40/main.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ice40/main.cc b/ice40/main.cc index e77bdd34..c14b6086 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -95,6 +95,7 @@ int main(int argc, char *argv[]) options.add_options()("json", po::value<std::string>(), "JSON design file to ingest"); options.add_options()("pcf", po::value<std::string>(), "PCF constraints file to ingest"); options.add_options()("asc", po::value<std::string>(), "asc bitstream file to write"); + options.add_options()("read", po::value<std::string>(), "asc bitstream file to read"); options.add_options()("seed", po::value<int>(), "seed value for random number generator"); options.add_options()("version,V", "show version"); options.add_options()("tmfuzz", "run path delay estimate fuzzer"); @@ -353,6 +354,13 @@ int main(int argc, char *argv[]) if (vm.count("no-tmdriv")) ctx->timing_driven = false; + if (vm.count("read")) { + std::string filename = vm["read"].as<std::string>(); + std::ifstream f(filename); + if (!read_asc(ctx.get(), f)) + log_error("Loading ASC failed.\n"); + } + #ifndef NO_GUI if (vm.count("gui")) { Application a(argc, argv); |