diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2018-06-23 16:55:13 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2018-06-23 16:55:13 +0200 |
commit | 3407d7638313ec6bb989088c81a30f99e8ec94b1 (patch) | |
tree | 9535ff47781e5a01bf28ee1d58fb2ea4215edf24 /gui/ice40/worker.cc | |
parent | fe26ce447155c88f13be1846b36de013e91c13a4 (diff) | |
download | nextpnr-3407d7638313ec6bb989088c81a30f99e8ec94b1.tar.gz nextpnr-3407d7638313ec6bb989088c81a30f99e8ec94b1.tar.bz2 nextpnr-3407d7638313ec6bb989088c81a30f99e8ec94b1.zip |
added PCF load
Diffstat (limited to 'gui/ice40/worker.cc')
-rw-r--r-- | gui/ice40/worker.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gui/ice40/worker.cc b/gui/ice40/worker.cc index 1558bc0c..9986ff3b 100644 --- a/gui/ice40/worker.cc +++ b/gui/ice40/worker.cc @@ -68,6 +68,18 @@ void Worker::loadfile(const std::string &filename) } } +void Worker::loadpcf(const std::string &filename) +{ + Q_EMIT taskStarted(); + std::string fn = filename; + std::ifstream f(fn); + try { + Q_EMIT loadpcf_finished(apply_pcf(ctx, f)); + } catch (WorkerInterruptionRequested) { + Q_EMIT taskCanceled(); + } +} + void Worker::pack() { Q_EMIT taskStarted(); @@ -119,6 +131,7 @@ TaskManager::TaskManager(Context *ctx) : toTerminate(false), toPause(false) connect(&workerThread, &QThread::finished, worker, &QObject::deleteLater); connect(this, &TaskManager::loadfile, worker, &Worker::loadfile); + connect(this, &TaskManager::loadpcf, worker, &Worker::loadpcf); connect(this, &TaskManager::pack, worker, &Worker::pack); connect(this, &TaskManager::budget, worker, &Worker::budget); connect(this, &TaskManager::place, worker, &Worker::place); @@ -126,6 +139,7 @@ TaskManager::TaskManager(Context *ctx) : toTerminate(false), toPause(false) connect(worker, &Worker::log, this, &TaskManager::info); connect(worker, &Worker::loadfile_finished, this, &TaskManager::loadfile_finished); + connect(worker, &Worker::loadpcf_finished, this, &TaskManager::loadpcf_finished); connect(worker, &Worker::pack_finished, this, &TaskManager::pack_finished); connect(worker, &Worker::budget_finish, this, &TaskManager::budget_finish); connect(worker, &Worker::place_finished, this, &TaskManager::place_finished); |