diff options
author | David Shah <davey1576@gmail.com> | 2018-06-21 11:59:20 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-06-21 11:59:20 +0200 |
commit | 56ed679f831f703ad2f170713e0b127a97da40b3 (patch) | |
tree | 5ba34e16424301e38bf44b94376e5a8a558dd0c2 /ice40 | |
parent | 9e28e45bd5e1f322f11f4759e8174d861df2eb2c (diff) | |
download | nextpnr-56ed679f831f703ad2f170713e0b127a97da40b3.tar.gz nextpnr-56ed679f831f703ad2f170713e0b127a97da40b3.tar.bz2 nextpnr-56ed679f831f703ad2f170713e0b127a97da40b3.zip |
Add frequency setting and fix slack calculation
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40')
-rw-r--r-- | ice40/main.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ice40/main.cc b/ice40/main.cc index 8143a902..fcf112e6 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -93,6 +93,8 @@ int main(int argc, char *argv[]) options.add_options()("hx1k", "set device type to iCE40HX1K"); options.add_options()("hx8k", "set device type to iCE40HX8K"); options.add_options()("up5k", "set device type to iCE40UP5K"); + options.add_options()("freq", po::value<double>(), + "set target frequency for design in MHz"); options.add_options()("package", po::value<std::string>(), "set device package"); po::positional_options_description pos; @@ -286,7 +288,10 @@ int main(int argc, char *argv[]) if (!pack_design(&ctx) && !ctx.force) log_error("Packing design failed.\n"); - assign_budget(&ctx, 50e6); + double freq = 50e6; + if (vm.count("freq")) + freq = vm["freq"].as<double>() * 1e6; + assign_budget(&ctx, freq); print_utilisation(&ctx); if (!vm.count("pack-only")) { |