diff options
Diffstat (limited to 'common/command.cc')
-rw-r--r-- | common/command.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/command.cc b/common/command.cc index ad5b6c54..fd310789 100644 --- a/common/command.cc +++ b/common/command.cc @@ -149,6 +149,9 @@ po::options_description CommandHandler::getGeneralOptions() general.add_options()("freq", po::value<double>(), "set target frequency for design in MHz"); general.add_options()("timing-allow-fail", "allow timing to fail in design"); general.add_options()("no-tmdriv", "disable timing-driven placement"); + general.add_options()("sdf", po::value<std::string>(), "SDF delay back-annotation file to write"); + general.add_options()("sdf-cvc", "enable tweaks for SDF file compatibility with the CVC simulator"); + return general; } @@ -336,6 +339,14 @@ int CommandHandler::executeMain(std::unique_ptr<Context> ctx) log_error("Saving design failed.\n"); } + if (vm.count("sdf")) { + std::string filename = vm["sdf"].as<std::string>(); + std::ofstream f(filename); + if (!f) + log_error("Failed to open SDF file '%s' for writing.\n", filename.c_str()); + ctx->writeSDF(f, vm.count("sdf-cvc")); + } + #ifndef NO_PYTHON deinit_python(); #endif |