diff options
-rw-r--r-- | common/command.cc | 28 | ||||
-rw-r--r-- | common/placer_heap.cc | 8 |
2 files changed, 32 insertions, 4 deletions
diff --git a/common/command.cc b/common/command.cc index d3e8af8d..2303ad91 100644 --- a/common/command.cc +++ b/common/command.cc @@ -161,6 +161,11 @@ po::options_description CommandHandler::getGeneralOptions() general.add_options()("no-print-critical-path-source", "disable printing of the line numbers associated with each net in the critical path"); + general.add_options()("placer-heap-alpha", po::value<float>(), "placer heap alpha value (float, default: 0.1)"); + general.add_options()("placer-heap-beta", po::value<float>(), "placer heap beta value (float, default: 0.9)"); + general.add_options()("placer-heap-critexp", po::value<int>(), "placer heap criticality exponent (int, default: 2)"); + general.add_options()("placer-heap-timingweight", po::value<int>(), "placer heap timing weight (int, default: 10)"); + general.add_options()("placed-svg", po::value<std::string>(), "write render of placement to SVG file"); general.add_options()("routed-svg", po::value<std::string>(), "write render of routing to SVG file"); @@ -258,6 +263,18 @@ void CommandHandler::setupContext(Context *ctx) if (vm.count("no-tmdriv")) ctx->settings[ctx->id("timing_driven")] = false; + if (vm.count("placer-heap-alpha")) + ctx->settings[ctx->id("placerHeap/alpha")] = std::to_string(vm["placer-heap-alpha"].as<float>()); + + if (vm.count("placer-heap-beta")) + ctx->settings[ctx->id("placerHeap/beta")] = std::to_string(vm["placer-heap-beta"].as<float>()); + + if (vm.count("placer-heap-critexp")) + ctx->settings[ctx->id("placerHeap/criticalityExponent")] = std::to_string(vm["placer-heap-critexp"].as<int>()); + + if (vm.count("placer-heap-timingweight")) + ctx->settings[ctx->id("placerHeap/timingWeight")] = std::to_string(vm["placer-heap-timingweight"].as<int>()); + // Setting default values if (ctx->settings.find(ctx->id("target_freq")) == ctx->settings.end()) ctx->settings[ctx->id("target_freq")] = std::to_string(12e6); @@ -275,6 +292,15 @@ void CommandHandler::setupContext(Context *ctx) ctx->settings[ctx->id("arch.name")] = std::string(ctx->archId().c_str(ctx)); ctx->settings[ctx->id("arch.type")] = std::string(ctx->archArgsToId(ctx->archArgs()).c_str(ctx)); ctx->settings[ctx->id("seed")] = ctx->rngstate; + + if (ctx->settings.find(ctx->id("placerHeap/alpha")) == ctx->settings.end()) + ctx->settings[ctx->id("placerHeap/alpha")] = std::to_string(0.1); + if (ctx->settings.find(ctx->id("placerHeap/beta")) == ctx->settings.end()) + ctx->settings[ctx->id("placerHeap/beta")] = std::to_string(0.9); + if (ctx->settings.find(ctx->id("placerHeap/criticalityExponent")) == ctx->settings.end()) + ctx->settings[ctx->id("placerHeap/criticalityExponent")] = std::to_string(2); + if (ctx->settings.find(ctx->id("placerHeap/timingWeight")) == ctx->settings.end()) + ctx->settings[ctx->id("placerHeap/timingWeight")] = std::to_string(10); } int CommandHandler::executeMain(std::unique_ptr<Context> ctx) @@ -421,6 +447,8 @@ int CommandHandler::exec() setupArchContext(ctx.get()); int rc = executeMain(std::move(ctx)); printFooter(); + log_break(); + log_info("Program finished normally.\n"); return rc; } catch (log_execution_error_exception) { printFooter(); diff --git a/common/placer_heap.cc b/common/placer_heap.cc index 7d529401..92caaf09 100644 --- a/common/placer_heap.cc +++ b/common/placer_heap.cc @@ -1764,10 +1764,10 @@ bool placer_heap(Context *ctx, PlacerHeapCfg cfg) { return HeAPPlacer(ctx, cfg). PlacerHeapCfg::PlacerHeapCfg(Context *ctx) { - alpha = ctx->setting<float>("placerHeap/alpha", 0.1); - beta = ctx->setting<float>("placerHeap/beta", 0.9); - criticalityExponent = ctx->setting<int>("placerHeap/criticalityExponent", 2); - timingWeight = ctx->setting<int>("placerHeap/timingWeight", 10); + alpha = ctx->setting<float>("placerHeap/alpha"); + beta = ctx->setting<float>("placerHeap/beta"); + criticalityExponent = ctx->setting<int>("placerHeap/criticalityExponent"); + timingWeight = ctx->setting<int>("placerHeap/timingWeight"); timing_driven = ctx->setting<bool>("timing_driven"); solverTolerance = 1e-5; placeAllAtOnce = false; |