aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2022-12-17 10:37:15 +0000
committergatecat <gatecat@ds0.me>2022-12-17 10:37:15 +0000
commitbc18d18a95d476b7d32bb5244a33fffaa637893f (patch)
treeb66afb53343d2a2e6f490eb6740254052ec0ab1e
parent0eb53d59d84ea1c46de7d9e25eb5a9901544202d (diff)
downloadnextpnr-bc18d18a95d476b7d32bb5244a33fffaa637893f.tar.gz
nextpnr-bc18d18a95d476b7d32bb5244a33fffaa637893f.tar.bz2
nextpnr-bc18d18a95d476b7d32bb5244a33fffaa637893f.zip
ecp5: Only write bitstream if --textcfg passed
Signed-off-by: gatecat <gatecat@ds0.me>
-rw-r--r--ecp5/main.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/ecp5/main.cc b/ecp5/main.cc
index f143d583..6abea4a9 100644
--- a/ecp5/main.cc
+++ b/ecp5/main.cc
@@ -111,11 +111,10 @@ void ECP5CommandHandler::customBitstream(Context *ctx)
log_error("bitstream generation is not available in out-of-context mode (use --write to create a post-PnR JSON "
"design)\n");
- std::string textcfg;
- if (vm.count("textcfg"))
- textcfg = vm["textcfg"].as<std::string>();
-
- write_bitstream(ctx, basecfg, textcfg);
+ if (vm.count("textcfg")) {
+ std::string textcfg = vm["textcfg"].as<std::string>();
+ write_bitstream(ctx, basecfg, textcfg);
+ }
}
static std::string speedString(ArchArgs::SpeedGrade speed)