aboutsummaryrefslogtreecommitdiffstats
path: root/common/command.cc
diff options
context:
space:
mode:
Diffstat (limited to 'common/command.cc')
-rw-r--r--common/command.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/command.cc b/common/command.cc
index ad5b6c54..f7f804a0 100644
--- a/common/command.cc
+++ b/common/command.cc
@@ -149,6 +149,8 @@ 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");
+
return general;
}
@@ -336,6 +338,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);
+ }
+
#ifndef NO_PYTHON
deinit_python();
#endif