chipsalliance / chisel

Chisel: A Modern Hardware Design Language
https://www.chisel-lang.org/
Apache License 2.0
3.91k stars 588 forks source link

hierarchy API not working for inner classes #2359

Open debs-sifive opened 2 years ago

debs-sifive commented 2 years ago

Type of issue: bug report

Impact: API addition (no impact on existing code)

I'm considering this an addition b/c it will give the existing API the capability to deal with inner modules.

Development Phase: request

Other information

If the current behavior is a bug, please provide the steps to reproduce the problem: https://scastie.scala-lang.org/debs-sifive/t9ZYvcYnRSGNuTJwNqdYVg/23

What is the current behavior?

value friends is not a member of chisel3.experimental.hierarchy.Instance[Playground.ModuleMeow#FriendList]

Field access does not seem to work on the inner class with @instantiable or IsLookupable.

What is the expected behavior? I expect the above Scastie to compile.

Please tell us about your environment: See Scastie

What is the use case for changing the behavior? Use case is any hierarchy API application that involves accessing fields in an inner class.

xzores commented 2 years ago

I am in need of this too.