Commit 41a66104 authored by Jens Korinth's avatar Jens Korinth
Browse files

Closes #91 - Alternatives are not built prior to DSE

* alternatives are now checked and built, in case the alternatives
  dimension is activated in DSE
parent dd2daa49
......@@ -58,9 +58,20 @@ object Alternatives {
* @param target Target Architecture and Platform
* @return Set of alternative names for kernel on Target **/
def alternatives(kernel: String, target: Target)(implicit cfg: Configuration): Set[String] =
//idForName(kernel) map (namesForId(_, target)) getOrElse(Set())
idForName(kernel) map (namesForId(_)) getOrElse(Set())
/** Returns alternative kernels for given kernel.
* @param kernel Kernel to find alternatives to.
* @return Set of alternative Kernels. **/
def alternatives(kernel: Kernel)(implicit cfg: Configuration): Set[Kernel] =
FileAssetManager.entities.kernels.filter( equals
/** Returns alternative kernels for given kernel name.
* @param name Name of Kernel; this may be used to find alternatives to an Verilog/VHDL core.
* @return Set of alternative Kernels. **/
def alternatives(name: String)(implicit cfg: Configuration): Set[Kernel] =
FileAssetManager.entities.kernels.filter(k => idForName(name) map (_ equals getOrElse false)
/** Returns alternative compositions on given Target.
* @param bd Original Composition
* @param target Target for the Composition
......@@ -23,6 +23,7 @@
import de.tu_darmstadt.cs.esa.tapasco.base._
import de.tu_darmstadt.cs.esa.tapasco.dse._
import de.tu_darmstadt.cs.esa.tapasco.filemgmt._
import de.tu_darmstadt.cs.esa.tapasco.task._
......@@ -42,12 +43,18 @@ private object DesignSpaceExploration extends Executor[DesignSpaceExplorationJob
val kernels = job.initialComposition.composition map (_.kernel) toSet
logger.debug("kernels found in composition: {}", kernels)
logger.debug("alternative kernels: {}", kernels map (Alternatives.alternatives _))
val missing = for {
val missing = (for {
k <- kernels
t <- job.targets
if FileAssetManager.entities.core(k, t).isEmpty
} yield (k, t)
} yield (k, t)) ++ (for {
k <- kernels
t <- job.targets
a <- Alternatives.alternatives(k)
if job.dimensions.alternatives && FileAssetManager.entities.core(, t).isEmpty
} yield (, t))
if (missing.nonEmpty) {"need to synthesize the following cores first: {}",
Supports Markdown
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