Hierarchy API doesn't allow custom instance names
Type of issue: feature request
Impact: API addition (no impact on existing code)
Development Phase: request
Other information
https://gitter.im/freechipsproject/chisel3?at=61f0ae51d41a5853f96bbf59
If the current behavior is a bug, please provide the steps to reproduce the problem:
What is the current behavior?
You can't customize the names of Instance objects. In the existing Module API, you can customize an instance's name using suggestName("my_custom_name"). However, no such functionality exists for the hierarchy API (introduced in #2045).
What is the expected behavior?
val myDef = Definition(...)
for (i <- 0 until 10) {
val inst = Instance(myDef)
inst.suggestName(s"custom_instance_name_$i")
...
}
I'm not sure if we'd want to use the same method name (suggestName), but that seems desirable to make it simpler to transition between the existing Module API and the new hierarchy API.
Please tell us about your environment:
What is the use case for changing the behavior?
Bringing parity between the existing Module(...) API and the new hierarchy API.