Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hierarchy API doesn't allow custom instance names #2366

Closed
tymcauley opened this issue Jan 26, 2022 · 0 comments · Fixed by #2886 · May be fixed by #2414
Closed

Hierarchy API doesn't allow custom instance names #2366

tymcauley opened this issue Jan 26, 2022 · 0 comments · Fixed by #2886 · May be fixed by #2414

Comments

@tymcauley
Copy link
Contributor

tymcauley commented Jan 26, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant