fix command groups
This commit is contained in:
@@ -15,7 +15,7 @@ trait BaseOption[T](using conv: ValueConverter[T]) extends ConfigElement {
|
|||||||
def get: T = scallop()
|
def get: T = scallop()
|
||||||
def apply: T = get
|
def apply: T = get
|
||||||
|
|
||||||
def getToolParameters: Seq[Shellable] = if (scallop.isDefined) Seq(s"--$toolName", getToolArg) else Seq()
|
def getToolParameters: Seq[Shellable] = if (scallop.isDefined) Seq(s"$toolName", getToolArg) else Seq()
|
||||||
|
|
||||||
def toolName: String
|
def toolName: String
|
||||||
def getToolArg: String = get.toString
|
def getToolArg: String = get.toString
|
||||||
|
@@ -5,8 +5,8 @@ import os.Shellable
|
|||||||
|
|
||||||
class CommandGroup(name: String) extends BaseGroup {
|
class CommandGroup(name: String) extends BaseGroup {
|
||||||
override def getToolParameters: Seq[Shellable] = {
|
override def getToolParameters: Seq[Shellable] = {
|
||||||
val sub = options.toSeq.map(_.getToolParameters)
|
val sub = options.toSeq.map(_.getToolParameters.map(_.value).mkString("="))
|
||||||
Seq(s"""--$name="${sub.flatMap(_.value).mkString(" ")}"""")
|
Seq(s"""$name="${sub.mkString(" ")}"""")
|
||||||
}
|
}
|
||||||
|
|
||||||
override def init(scallopConf: ScallopConf, group: ScallopOptionGroup): Unit = {
|
override def init(scallopConf: ScallopConf, group: ScallopOptionGroup): Unit = {
|
||||||
|
@@ -7,13 +7,13 @@ import org.rogach.scallop.*
|
|||||||
class SchedulingParameters extends OptionGroup {
|
class SchedulingParameters extends OptionGroup {
|
||||||
override def name: String = "Longnail Scheduling Args"
|
override def name: String = "Longnail Scheduling Args"
|
||||||
|
|
||||||
add(new CommandGroup("prepare-schedule-lil") {
|
add(new CommandGroup("--prepare-schedule-lil") {
|
||||||
choiceS(Seq("LEGACY", "MS", "PAMS", "PARAMS", "MI_MS", "MI_PAMS", "MI_PARAMS"), name = "schedulingAlgo", default = Some("LEGACY"))
|
choiceS(Seq("LEGACY", "MS", "PAMS", "PARAMS", "MI_MS", "MI_PAMS", "MI_PARAMS"), name = "schedulingAlgo", default = Some("LEGACY"))
|
||||||
value[Path](cliName = "cellLibrary", toolName = "library")
|
value[Path](cliName = "cellLibrary", toolName = "library")
|
||||||
valueS[Path](name = "opTyLibrary")
|
valueS[Path](name = "opTyLibrary")
|
||||||
})
|
})
|
||||||
|
|
||||||
add(new CommandGroup("schedule-lil") {
|
add(new CommandGroup("--schedule-lil") {
|
||||||
valueS[Int](name = "schedulingTimeout")
|
valueS[Int](name = "schedulingTimeout")
|
||||||
value[Int](cliName = "schedulingRefineTimeout", toolName = "schedRefineTimeout")
|
value[Int](cliName = "schedulingRefineTimeout", toolName = "schedRefineTimeout")
|
||||||
value[Path](cliName = "schedulingKconf", toolName = "solSelKconfPath")
|
value[Path](cliName = "schedulingKconf", toolName = "solSelKconfPath")
|
||||||
@@ -22,6 +22,6 @@ class SchedulingParameters extends OptionGroup {
|
|||||||
value[Int](cliName = "clockPeriod", toolName = "clockTime")
|
value[Int](cliName = "clockPeriod", toolName = "clockTime")
|
||||||
})
|
})
|
||||||
|
|
||||||
value[Int](cliName = "maxLoopUnrollFactor", toolName = "max-unroll-factor")
|
value[Int](cliName = "--maxLoopUnrollFactor", toolName = "max-unroll-factor")
|
||||||
value[Path](cliName = "schedulingMLIR", toolName = "o")
|
value[Path](cliName = "--schedulingMLIR", toolName = "o")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user