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

Views of Probes of Aggregates cause Stack Overflow errors #4187

Closed
jackkoenig opened this issue Jun 18, 2024 · 0 comments · Fixed by #4186
Closed

Views of Probes of Aggregates cause Stack Overflow errors #4187

jackkoenig opened this issue Jun 18, 2024 · 0 comments · Fixed by #4186

Comments

@jackkoenig
Copy link
Contributor

jackkoenig commented Jun 18, 2024

Type of issue: Bug Report

Please provide the steps to reproduce the problem:

Consider the following Chisel:

//> using scala "2.13.12"
//> using dep "org.chipsalliance::chisel:6.4.0"
//> using plugin "org.chipsalliance:::chisel-plugin:6.4.0"
//> using options "-unchecked", "-deprecation", "-language:reflectiveCalls", "-feature", "-Xcheckinit", "-Xfatal-warnings", "-Ywarn-dead-code", "-Ywarn-unused", "-Ymacro-annotations"

import chisel3._
import chisel3.probe._
import chisel3.experimental.dataview._
// _root_ disambiguates from package chisel3.util.circt if user imports chisel3.util._
import _root_.circt.stage.ChiselStage

class MyBundle extends Bundle {
  val a = UInt(8.W)
  val b = UInt(8.W)
}

class Foo extends RawModule {
  val out = IO(Output(Probe(new MyBundle)))
}

class Top extends RawModule {
  val f = Module(new Foo)

  f.out.viewAs.isLit
}

object Main extends App {
  println(
    ChiselStage.emitCHIRRTL(
      gen = new Top
    )
  )
}

What is the current behavior?

The f.out.viewAs.isLit will cause a stack overflow.

What is the expected behavior?

Views of Probes of Aggregates should work!

Please tell us about your environment:

Other Information

What is the use case for changing the behavior?

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