aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--COPYING18
-rw-r--r--common/placer1.cc1
-rw-r--r--gui/treemodel.cc12
-rw-r--r--gui/treemodel.h9
-rw-r--r--json/jsonparse.cc5
5 files changed, 35 insertions, 10 deletions
diff --git a/COPYING b/COPYING
new file mode 100644
index 00000000..6df840be
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,18 @@
+Copyright (C) 2018 Clifford Wolf <clifford@symbioticeda.com>
+Copyright (C) 2018 David Shah <david@symbioticeda.com>
+Copyright (C) 2018 Dan Gisselquist <dan@symbioticeda.com>
+Copyright (C) 2018 Serge Bazanski <q3k@symbioticeda.com>
+Copyright (C) 2018 Miodrag Milanovic <miodrag@symbioticeda.com>
+Copyright (C) 2018 Eddie Hung <eddieh@ece.ubc.ca>
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/common/placer1.cc b/common/placer1.cc
index 68db9650..fc679b50 100644
--- a/common/placer1.cc
+++ b/common/placer1.cc
@@ -193,7 +193,6 @@ class SAPlacer
if (temp <= 1e-3 && n_no_progress >= 5) {
if (iter % 5 != 0)
log_info(" at iteration #%d: temp = %f, cost = %f\n", iter, temp, double(curr_metric));
- ctx->unlock();
break;
}
diff --git a/gui/treemodel.cc b/gui/treemodel.cc
index 900d5101..33dd6a96 100644
--- a/gui/treemodel.cc
+++ b/gui/treemodel.cc
@@ -70,12 +70,14 @@ void IdStringList::updateElements(Context *ctx, std::vector<IdString> elements)
}
// For any elements that are in managed_ but not in new, delete them.
- for (auto &pair : managed_) {
- if (element_set.count(pair.first) != 0) {
- continue;
+ auto it = managed_.begin();
+ while (it != managed_.end()) {
+ if (element_set.count(it->first) != 0) {
+ ++it;
+ } else {
+ it = managed_.erase(it);
+ changed = true;
}
- managed_.erase(pair.first);
- changed = true;
}
// Return early if there are no changes.
diff --git a/gui/treemodel.h b/gui/treemodel.h
index 4c3f64c3..c3f9fe88 100644
--- a/gui/treemodel.h
+++ b/gui/treemodel.h
@@ -62,6 +62,8 @@ class Item
void addChild(Item *child) { children_.append(child); }
+ void deleteChild(Item *child) { children_.removeAll(child); }
+
public:
Item(QString name, Item *parent) : name_(name), parent_(parent)
{
@@ -100,7 +102,12 @@ class Item
virtual bool canFetchMore() const { return false; }
virtual void fetchMore() {}
- ~Item() {}
+ ~Item()
+ {
+ if (parent_ != nullptr) {
+ parent_->deleteChild(this);
+ }
+ }
};
// IdString is an Item that corresponds to a real element in Arch.
diff --git a/json/jsonparse.cc b/json/jsonparse.cc
index a0a4e8d0..89c2b8d9 100644
--- a/json/jsonparse.cc
+++ b/json/jsonparse.cc
@@ -462,9 +462,8 @@ void json_import_ports(Context *ctx, const string &modname, const std::vector<Id
ground_net(ctx, net.get());
log_info(" Floating wire node value, "
- "\'%s\' of port \'%s\' "
- "in cell \'%s\' of module \'%s\'\n, converted to zero driver",
- wire_node->data_string.c_str(), port_name.c_str(), obj_name.c_str(), modname.c_str());
+ "'%s' on '%s'/'%s', converted to zero driver\n",
+ this_port.name.c_str(ctx), modname.c_str(), obj_name.c_str());
} else
log_error(" Unknown fixed type wire node "