aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/coreview
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-04-14 11:09:40 +0200
committerKarel Kočí <cynerd@email.cz>2018-04-14 11:09:40 +0200
commit204551e69cdf3a29b3a0b36a9759841f0d7df500 (patch)
tree9428b24365ae00268b70f6b8c0d8bbbb1f26584a /qtmips_gui/coreview
parent3ad654354bc051796646186d45e027b30feea942 (diff)
downloadqtmips-204551e69cdf3a29b3a0b36a9759841f0d7df500.tar.gz
qtmips-204551e69cdf3a29b3a0b36a9759841f0d7df500.tar.bz2
qtmips-204551e69cdf3a29b3a0b36a9759841f0d7df500.zip
Wire up missing control connections
Now only hazard unit is missing all wires. Anything else is wired up already.
Diffstat (limited to 'qtmips_gui/coreview')
-rw-r--r--qtmips_gui/coreview/connection.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qtmips_gui/coreview/connection.cpp b/qtmips_gui/coreview/connection.cpp
index 140185f..e090d98 100644
--- a/qtmips_gui/coreview/connection.cpp
+++ b/qtmips_gui/coreview/connection.cpp
@@ -189,6 +189,8 @@ void Bus::conns_update() {
QPointF inter;
qreal range;
for (int y = 0; y < (points.size() - 1); y++) {
+ if (points[y] == points[y+1]) // TODO this is just workaround (for some reason we have lines with multiple points same. It should do no harm in reality but it causes this math to break so skip it here) (well reason is probably missmatch of axis, line comes from x for example but it should come from y so it creates line of zero length)
+ continue;
range = cu_closest(QLineF(points[y], points[y+1]), QPointF(conns[i].p), &inter);
if (closest.isNull() || closest_range > range) {
closest = inter;