Loading src/main/scala/tapasco/jobs/Jobs.scala +4 −2 Original line number Diff line number Diff line Loading @@ -54,11 +54,12 @@ final case class BulkImportJob(csvFile: Path) extends Job("bulkimport") * i.e., each combination of [[base.Architecture]] and [[base.Platform]] given. * @param composition Composition to synthesize micro-architecture for. * @param designFrequency Operating frequency of PEs in the design. * @param implementation Composer Implementation (e.g., Vivado). * @param _implementation Composer Implementation (e.g., Vivado). * @param _architectures Name list of [[base.Architecture]] instances. * @param _platforms Name list of [[base.Platform]] instances. * @param features List of [[base.Feature]] configurations for the design (opt.). * @param debugMode Debug mode name (opt.). * @param synthEffort Synthesis effort level (opt.). **/ final case class ComposeJob( composition: Composition, Loading @@ -68,7 +69,8 @@ final case class ComposeJob( private val _platforms: Option[Seq[String]] = None, features: Option[Seq[Feature]] = None, debugMode: Option[String] = None, deleteProjects: Option[Boolean] = None) extends Job("compose") { deleteProjects: Option[Boolean] = None, synthEffort : Option[String] = Some("normal")) extends Job("compose") { /** Returns the selected composer tool implementation. */ lazy val implementation: Composer.Implementation = Composer.Implementation(_implementation) Loading src/main/scala/tapasco/jobs/json/package.scala +4 −2 Original line number Diff line number Diff line Loading @@ -117,7 +117,8 @@ package object json { (JsPath \ "Platforms").readNullable[Seq[String]] ~ (JsPath \ "Features").readNullable[Seq[Feature]] ~ (JsPath \ "DebugMode").readNullable[String] ~ (JsPath \ "DeleteProjects").readNullable[Boolean] (JsPath \ "DeleteProjects").readNullable[Boolean] ~ (JsPath \ "SynthEffort").readNullable[String] ) (ComposeJob.apply _) implicit val composeJobWrites: Writes[ComposeJob] = ( Loading @@ -129,7 +130,8 @@ package object json { (JsPath \ "Platforms").writeNullable[Seq[String]] ~ (JsPath \ "Features").writeNullable[Seq[Feature]] ~ (JsPath \ "DebugMode").writeNullable[String] ~ (JsPath \ "DeleteProjects").writeNullable[Boolean] (JsPath \ "DeleteProjects").writeNullable[Boolean] ~ (JsPath \ "SynthEffort").writeNullable[String] ) (unlift(ComposeJob.unapply _ andThen (_ map ("Compose" +: _)))) /* ComposeJob @} */ Loading src/main/scala/tapasco/parser/CommonArgParsers.scala +4 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,10 @@ private object CommonArgParsers { (longOption("deleteProjects", "DeleteProjects") ~ ws ~/ ( boolstr ~ ws).?) map {case s => (s._1, s._2.getOrElse(true))} def synthEffort : Parser[(String, String)] = longOption("synthEffort", "SynthEffort") ~ ws ~/ string.opaque("Synthesis effort") ~ ws def implementation: Parser[(String, String)] = longOption("implementation", "Implementation") ~ ws ~/ Loading src/main/scala/tapasco/parser/ComposeParser.scala +11 −1 Original line number Diff line number Diff line Loading @@ -39,9 +39,12 @@ private object ComposeParser { private val jobid = identity[ComposeJob] _ private def options: Parser[ComposeJob => ComposeJob] = (implementation | architectures | platforms | features | debugMode | delProj).rep (implementation | architectures | platforms | features | debugMode | synthEffort | delProj).rep .map (opts => (opts map (applyOption _) fold jobid) (_ andThen _)) private val effortModes : Set[String] = Set("fastest", "fast", "normal", "optimal", "aggressive_performance", "aggressive_area") private def applyOption(opt: (String, _)): ComposeJob => ComposeJob = opt match { case ("Implementation", i: String) => _.copy(_implementation = i) Loading @@ -50,6 +53,13 @@ private object ComposeParser { case ("Features", fs: Seq[Feature @unchecked]) => _.copy(features = Some(fs)) case ("DebugMode", m: String) => _.copy(debugMode = Some(m)) case ("DeleteProjects", e: Boolean) => _.copy(deleteProjects = Some(e)) case ("SynthEffort", effort : String) => if(effortModes.contains(effort)){ _.copy(synthEffort = Some(effort)) } else{ logger.warn(s"Unknown effort level $effort, using default normal") _.copy(synthEffort = Some("normal")) } case o => throw new Exception(s"parsed illegal option: $o") } } src/main/scala/tapasco/parser/Usage.scala +8 −1 Original line number Diff line number Diff line Loading @@ -169,7 +169,14 @@ configuration via `tapasco -n config.json`. Indent(Arg(" r", "generate random result values") & Arg(" f", "generate only timing failures") & Arg(" p", "generate only placer errors") & Arg(" o", "generate only other errors"))) & Arg(" o", "generate only other errors")) & Arg("--synthEffort EFFORT", "set effort level for synthesis and PnR; levels:") & Indent(Arg("fastest", "lowest effort, minimal runtime") & Arg("fast", "slightly slower, but still short runtime") & Arg("normal", "default options") & Arg("optimal", "slower, get best QoR possible") & Arg("aggressive_performance", "maximal optimization for performance") & Arg("aggressive_area", "maximal optimization for area"))) & "" & "NOTE: Currently the total number of PEs must be <= ${PLATFORM_NUM_SLOTS}.") Loading Loading
src/main/scala/tapasco/jobs/Jobs.scala +4 −2 Original line number Diff line number Diff line Loading @@ -54,11 +54,12 @@ final case class BulkImportJob(csvFile: Path) extends Job("bulkimport") * i.e., each combination of [[base.Architecture]] and [[base.Platform]] given. * @param composition Composition to synthesize micro-architecture for. * @param designFrequency Operating frequency of PEs in the design. * @param implementation Composer Implementation (e.g., Vivado). * @param _implementation Composer Implementation (e.g., Vivado). * @param _architectures Name list of [[base.Architecture]] instances. * @param _platforms Name list of [[base.Platform]] instances. * @param features List of [[base.Feature]] configurations for the design (opt.). * @param debugMode Debug mode name (opt.). * @param synthEffort Synthesis effort level (opt.). **/ final case class ComposeJob( composition: Composition, Loading @@ -68,7 +69,8 @@ final case class ComposeJob( private val _platforms: Option[Seq[String]] = None, features: Option[Seq[Feature]] = None, debugMode: Option[String] = None, deleteProjects: Option[Boolean] = None) extends Job("compose") { deleteProjects: Option[Boolean] = None, synthEffort : Option[String] = Some("normal")) extends Job("compose") { /** Returns the selected composer tool implementation. */ lazy val implementation: Composer.Implementation = Composer.Implementation(_implementation) Loading
src/main/scala/tapasco/jobs/json/package.scala +4 −2 Original line number Diff line number Diff line Loading @@ -117,7 +117,8 @@ package object json { (JsPath \ "Platforms").readNullable[Seq[String]] ~ (JsPath \ "Features").readNullable[Seq[Feature]] ~ (JsPath \ "DebugMode").readNullable[String] ~ (JsPath \ "DeleteProjects").readNullable[Boolean] (JsPath \ "DeleteProjects").readNullable[Boolean] ~ (JsPath \ "SynthEffort").readNullable[String] ) (ComposeJob.apply _) implicit val composeJobWrites: Writes[ComposeJob] = ( Loading @@ -129,7 +130,8 @@ package object json { (JsPath \ "Platforms").writeNullable[Seq[String]] ~ (JsPath \ "Features").writeNullable[Seq[Feature]] ~ (JsPath \ "DebugMode").writeNullable[String] ~ (JsPath \ "DeleteProjects").writeNullable[Boolean] (JsPath \ "DeleteProjects").writeNullable[Boolean] ~ (JsPath \ "SynthEffort").writeNullable[String] ) (unlift(ComposeJob.unapply _ andThen (_ map ("Compose" +: _)))) /* ComposeJob @} */ Loading
src/main/scala/tapasco/parser/CommonArgParsers.scala +4 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,10 @@ private object CommonArgParsers { (longOption("deleteProjects", "DeleteProjects") ~ ws ~/ ( boolstr ~ ws).?) map {case s => (s._1, s._2.getOrElse(true))} def synthEffort : Parser[(String, String)] = longOption("synthEffort", "SynthEffort") ~ ws ~/ string.opaque("Synthesis effort") ~ ws def implementation: Parser[(String, String)] = longOption("implementation", "Implementation") ~ ws ~/ Loading
src/main/scala/tapasco/parser/ComposeParser.scala +11 −1 Original line number Diff line number Diff line Loading @@ -39,9 +39,12 @@ private object ComposeParser { private val jobid = identity[ComposeJob] _ private def options: Parser[ComposeJob => ComposeJob] = (implementation | architectures | platforms | features | debugMode | delProj).rep (implementation | architectures | platforms | features | debugMode | synthEffort | delProj).rep .map (opts => (opts map (applyOption _) fold jobid) (_ andThen _)) private val effortModes : Set[String] = Set("fastest", "fast", "normal", "optimal", "aggressive_performance", "aggressive_area") private def applyOption(opt: (String, _)): ComposeJob => ComposeJob = opt match { case ("Implementation", i: String) => _.copy(_implementation = i) Loading @@ -50,6 +53,13 @@ private object ComposeParser { case ("Features", fs: Seq[Feature @unchecked]) => _.copy(features = Some(fs)) case ("DebugMode", m: String) => _.copy(debugMode = Some(m)) case ("DeleteProjects", e: Boolean) => _.copy(deleteProjects = Some(e)) case ("SynthEffort", effort : String) => if(effortModes.contains(effort)){ _.copy(synthEffort = Some(effort)) } else{ logger.warn(s"Unknown effort level $effort, using default normal") _.copy(synthEffort = Some("normal")) } case o => throw new Exception(s"parsed illegal option: $o") } }
src/main/scala/tapasco/parser/Usage.scala +8 −1 Original line number Diff line number Diff line Loading @@ -169,7 +169,14 @@ configuration via `tapasco -n config.json`. Indent(Arg(" r", "generate random result values") & Arg(" f", "generate only timing failures") & Arg(" p", "generate only placer errors") & Arg(" o", "generate only other errors"))) & Arg(" o", "generate only other errors")) & Arg("--synthEffort EFFORT", "set effort level for synthesis and PnR; levels:") & Indent(Arg("fastest", "lowest effort, minimal runtime") & Arg("fast", "slightly slower, but still short runtime") & Arg("normal", "default options") & Arg("optimal", "slower, get best QoR possible") & Arg("aggressive_performance", "maximal optimization for performance") & Arg("aggressive_area", "maximal optimization for area"))) & "" & "NOTE: Currently the total number of PEs must be <= ${PLATFORM_NUM_SLOTS}.") Loading