aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/main.cc
diff options
context:
space:
mode:
authorMiodrag Milanović <mmicko@gmail.com>2018-08-08 11:22:01 -0700
committerGitHub <noreply@github.com>2018-08-08 11:22:01 -0700
commitbc378fc3e4bbb16251f4076384eb6aaf25ef79e3 (patch)
tree18ff4129f05a457f0afaf8edcef90fe73252ad24 /ice40/main.cc
parentb326b03a5261a824f428fe0811a5376c8758b929 (diff)
parent61bce47f3cb7b4adf1d5292b3c431ca4048ad038 (diff)
downloadnextpnr-bc378fc3e4bbb16251f4076384eb6aaf25ef79e3.tar.gz
nextpnr-bc378fc3e4bbb16251f4076384eb6aaf25ef79e3.tar.bz2
nextpnr-bc378fc3e4bbb16251f4076384eb6aaf25ef79e3.zip
Merge pull request #46 from YosysHQ/use_settings
Use settings for json and pcf
Diffstat (limited to 'ice40/main.cc')
-rw-r--r--ice40/main.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/ice40/main.cc b/ice40/main.cc
index 2818a3ad..8bab360d 100644
--- a/ice40/main.cc
+++ b/ice40/main.cc
@@ -79,8 +79,9 @@ void Ice40CommandHandler::validate()
void Ice40CommandHandler::customAfterLoad(Context *ctx)
{
if (vm.count("pcf")) {
- std::ifstream pcf(vm["pcf"].as<std::string>());
- if (!apply_pcf(ctx, pcf))
+ std::string filename = vm["pcf"].as<std::string>();
+ std::ifstream pcf(filename);
+ if (!apply_pcf(ctx, filename, pcf))
log_error("Loading PCF failed.\n");
}
}