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 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 getToolArg: String = get.toString
|
||||
|
@@ -5,8 +5,8 @@ import os.Shellable
|
||||
|
||||
class CommandGroup(name: String) extends BaseGroup {
|
||||
override def getToolParameters: Seq[Shellable] = {
|
||||
val sub = options.toSeq.map(_.getToolParameters)
|
||||
Seq(s"""--$name="${sub.flatMap(_.value).mkString(" ")}"""")
|
||||
val sub = options.toSeq.map(_.getToolParameters.map(_.value).mkString("="))
|
||||
Seq(s"""$name="${sub.mkString(" ")}"""")
|
||||
}
|
||||
|
||||
override def init(scallopConf: ScallopConf, group: ScallopOptionGroup): Unit = {
|
||||
|
@@ -7,13 +7,13 @@ import org.rogach.scallop.*
|
||||
class SchedulingParameters extends OptionGroup {
|
||||
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"))
|
||||
value[Path](cliName = "cellLibrary", toolName = "library")
|
||||
valueS[Path](name = "opTyLibrary")
|
||||
})
|
||||
|
||||
add(new CommandGroup("schedule-lil") {
|
||||
add(new CommandGroup("--schedule-lil") {
|
||||
valueS[Int](name = "schedulingTimeout")
|
||||
value[Int](cliName = "schedulingRefineTimeout", toolName = "schedRefineTimeout")
|
||||
value[Path](cliName = "schedulingKconf", toolName = "solSelKconfPath")
|
||||
@@ -22,6 +22,6 @@ class SchedulingParameters extends OptionGroup {
|
||||
value[Int](cliName = "clockPeriod", toolName = "clockTime")
|
||||
})
|
||||
|
||||
value[Int](cliName = "maxLoopUnrollFactor", toolName = "max-unroll-factor")
|
||||
value[Path](cliName = "schedulingMLIR", toolName = "o")
|
||||
value[Int](cliName = "--maxLoopUnrollFactor", toolName = "max-unroll-factor")
|
||||
value[Path](cliName = "--schedulingMLIR", toolName = "o")
|
||||
}
|
||||
|
Reference in New Issue
Block a user