Commit 0260f867 authored by Jens Korinth's avatar Jens Korinth
Browse files

Closes #61 - DSE: False positives for double enqueues of ConcreteRuns

* compare support was completely broken, a wonder that the code ever
  seemed to work at all
* comparison of the actual Composition was missing; comparing
  Compositions is a bit tricky due to many isomorphisms in the
* opted to compare area utilization instead: Unlikely that two different
  compositions in the same DSE run will ever have _exactly_ the same
  number of LUTs, FFS, etc.
* should work now, comparison order: area, h-value, frequency
parent 7ab0344b
package de.tu_darmstadt.cs.esa.tapasco.dse
import de.tu_darmstadt.cs.esa.tapasco.task._
import de.tu_darmstadt.cs.esa.tapasco.base._
import de.tu_darmstadt.cs.esa.tapasco.util._
import de.tu_darmstadt.cs.esa.tapasco.activity.composers._
import java.util.concurrent.CountDownLatch
......@@ -10,14 +11,18 @@ sealed private trait Run extends Startable with Ordered[Run] {
def target: Target
def result: Option[Composer.Result]
def task: Option[ComposeTask]
def area: AreaEstimate
def compare(that: Run): Int =
(this.element.h, this.element.frequency) compare (that.element.h, this.element.frequency)
(this.area, this.element.h, this.element.frequency) compare (that.area, that.element.h, that.element.frequency)
private class ConcreteRun(val no: Int, val element: DesignSpace.Element, val target: Target, val debugMode: Option[String])
(implicit exploration: Exploration, configuration: Configuration) extends Run {
private[this] var _result: Option[Composer.Result] = None
private[this] var _task: Option[ComposeTask] = None
lazy val area = AreaUtilization(target, element.composition) getOrElse {
throw new Exception("could not get area estimation for %s".format(element))
def result: Option[Composer.Result] = _result
def task: Option[ComposeTask] = _task
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment