differentiate default config package delimiter

This commit is contained in:
Alon Amid
2020-10-15 17:07:20 +00:00
parent 8f86b6d19a
commit 4a317b0cab
2 changed files with 4 additions and 4 deletions

View File

@@ -110,7 +110,7 @@ generator_temp: $(SCALA_SOURCES) $(sim_files) $(EXTRA_GENERATOR_REQS)
--target-dir $(build_dir) \
--name $(long_name) \
--top-module $(MODEL_PACKAGE).$(MODEL) \
--legacy-configs $(CONFIG_PACKAGE).$(CONFIG))
--legacy-configs $(CONFIG_PACKAGE):$(CONFIG))
.PHONY: firrtl
firrtl: $(FIRRTL_FILE)

View File

@@ -12,10 +12,10 @@ private[stage] object UnderscoreDelimitedConfigsAnnotation extends HasShellOptio
new ShellOption[String](
longOption = "legacy-configs",
toAnnotationSeq = a => {
val split = a.split('.')
val packageName = split.init.mkString(".")
val split = a.split(':')
val packageName = split.head
val configs = split.last.split("_")
Seq(new ConfigsAnnotation(configs map { config => s"${packageName}.${config}" } ))
Seq(new ConfigsAnnotation(configs map { config => if (config contains ".") s"${config}" else s"${packageName}.${config}" } ))
},
helpText = "A string of underscore-delimited configs (configs have decreasing precendence from left to right).",
shortOption = Some("LC")