Closed JL102 closed 3 years ago
This is the intended behavior.
We use underscores to concatenate config fragments into a single config string, and then separate them during elaboration. This is useful when you want to combine a couple of config fragments for quick builds without creating new compound configurations. You can have a look for example at some example FireSim config definitions.
Yes, it does imply that you cannot use underscores in the names of config fragments. As an aside, the style guide for Scala classes recommends camel case, which is indeed the style we use for configs.
Regarding that location in the code where the underscore is used as a delimiter, you can have a look here
Okay, I see. Thanks for the explanation. Any particular reason why underscores have to be used as that delimiter, instead of something like a hyphen?
I think we use _
for legacy reasons... though I can't tell you for sure. You would have to dig back into a ton of old commits to find out the exact reason.
Closing for now since the base question was answered.
Impact: rtl?
Tell us about your environment: Chipyard Version: 1.4.0 (2021-01-19) OS: Ubuntu 20.04 Other:
I've been creating custom simulator configs inside
generators/chipyard/src/main/scala/config/HeteroConfigs.scala
. They do not compile properly when the name has an underscore.For example:
The above compiles without issues. However:
The above fails to compile.
Logs and Stacktrace:
Presumably, at some point in the code, it splits the config name by underscores and then tries to find chipyard.BoomD3F8 and chipyard.Br8 instead of chipyard.BoomD3F8_Br8. I spent an hour searching for where it does that, but to no avail.
(By the way: The reason I'm giving them weird names is that I'm trying to test the performance of boom cores with different parameters. I got rid of the extra parameters when I copied the code in here.)