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

Some Bundles are flattened in the viewer: hierarchy is not preserved when the hardware type of a signal is specified for the single fields #20

Open
rameloni opened this issue Jun 22, 2024 · 0 comments
Labels
bug Something isn't working internals-chisel The issue is related to the internals of chisel

Comments

@rameloni
Copy link
Owner

When the hardware type of the fields of a bundle is specified in the fields instead of the root, the waveform is not able to render the hierarchy of that bundle. In the code below it's the case of MyMixedBundle where the actual hardware signals are myMixedBundle.a and myMixedBundle.b. myMixedBundle is only a scala variable and it is not a hardware variable like myIOBundle, therefore it is not passed to firtool and the information cannot be available in the viewer.

class MyBundle extends Bundle {
  val x = UInt(32.W)
  val y = UInt(32.W)
}

class MyIOBundle extends Bundle {
  val w = Input(UInt(32.W))
  val z = Output(UInt(32.W))
}

class MyMixedBundle extends Bundle {
  val a = WireInit(0.U(32.W))
  val b = IO(Output(UInt(32.W)))
}

class Foo extends Module {
  val myBundleValIO   = IO(Input(new MyBundle))
  val myBundleValWire = Wire(new MyBundle)
  val myBundleValReg  = Reg(new MyBundle)

  val myIOBundle = IO(new MyIOBundle)

  val myMixedBundle = new MyMixedBundle

  // Connections
  myBundleValWire := myBundleValIO
  myBundleValReg  := myBundleValIO

  myIOBundle.z := 18.U

  myMixedBundle.a := myBundleValIO.x
  myMixedBundle.b := myMixedBundle.a
}

issue-hierarchy-not-visible-for-some-bundles

@rameloni rameloni added bug Something isn't working internals-chisel The issue is related to the internals of chisel labels Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working internals-chisel The issue is related to the internals of chisel
Projects
None yet
Development

No branches or pull requests

1 participant