diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2018-08-03 23:53:33 -0700 |
---|---|---|
committer | Eddie Hung <eddieh@ece.ubc.ca> | 2018-08-03 23:53:33 -0700 |
commit | dced12cbd2355604279c7277c8a48f584771dfb8 (patch) | |
tree | e802b563faf47c06c9022d4cde0ce79631623b19 /ice40/main.cc | |
parent | 0a14e20f7332344d4c2f73c7ede54ef0258997f7 (diff) | |
parent | f5a1b93f0e9348437ece7fb7d46ac69af98536d0 (diff) | |
download | nextpnr-dced12cbd2355604279c7277c8a48f584771dfb8.tar.gz nextpnr-dced12cbd2355604279c7277c8a48f584771dfb8.tar.bz2 nextpnr-dced12cbd2355604279c7277c8a48f584771dfb8.zip |
Merge branch 'master' into slack_histogram
Conflicts:
common/timing.cc
Diffstat (limited to 'ice40/main.cc')
-rw-r--r-- | ice40/main.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/ice40/main.cc b/ice40/main.cc index 37e18215..46cdce71 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -319,6 +319,13 @@ int main(int argc, char *argv[]) if (vm.count("slack_redist_iter")) { ctx->slack_redist_iter = vm["slack_redist_iter"].as<int>(); + if (vm.count("freq") && vm["freq"].as<double>() == 0) { + ctx->auto_freq = true; +#ifndef NO_GUI + if (!vm.count("gui")) +#endif + log_warning("Target frequency not specified. Will optimise for max frequency.\n"); + } } if (vm.count("cstrweight")) { @@ -385,13 +392,9 @@ int main(int argc, char *argv[]) } if (vm.count("freq")) { - ctx->target_freq = vm["freq"].as<double>() * 1e6; - ctx->user_freq = true; - } else { -#ifndef NO_GUI - if (!vm.count("gui")) -#endif - log_warning("Target frequency not specified. Will optimise for max frequency.\n"); + auto freq = vm["freq"].as<double>(); + if (freq > 0) + ctx->target_freq = freq * 1e6; } ctx->timing_driven = true; |