-
Notifications
You must be signed in to change notification settings - Fork 607
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
chisel3.util.Queue not working with SInt #4536
Labels
Comments
This is a CIRCT bug, the single-address Chisel memory is being substituted by reg and a incorrect type conversion in the process causes this problem. I will fix it later, for now you can simply use firtool option |
I can confirm this is still present in latest firtool ( //> using repository "sonatype-s01:snapshots"
//> using scala "2.13.15"
//> using dep "org.chipsalliance::chisel:7.0.0-M2+208-892fa802-SNAPSHOT"
//> using plugin "org.chipsalliance:::chisel-plugin:7.0.0-M2+208-892fa802-SNAPSHOT"
//> using options "-unchecked", "-deprecation", "-language:reflectiveCalls", "-feature", "-Xcheckinit", "-Xfatal-warnings", "-Ywarn-dead-code", "-Ywarn-unused", "-Ymacro-annotations"
import chisel3._
import chisel3.util._
// _root_ disambiguates from package chisel3.util.circt if user imports chisel3.util._
import _root_.circt.stage.ChiselStage
class Test() extends Module {
val io = IO(new Bundle {
val a = Flipped(Decoupled(SInt(32.W)))
val b = Decoupled(SInt(32.W))
})
val que = Module(new Queue(SInt(32.W), 1))
que.io.enq.valid := io.a.valid
que.io.enq.bits := io.a.bits
io.a.ready := que.io.enq.ready
io.b.bits := que.io.deq.bits + 1.S
io.b.valid := que.io.deq.valid
que.io.deq.ready := io.b.ready
}
object Test extends App {
// These lines generate the Verilog output
println(
ChiselStage.emitSystemVerilog(
new Test(),
firtoolOpts = Array("-disable-all-randomization", "-strip-debug-info")
)
)
} Gives:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Type of issue: Bug Report
Please provide the steps to reproduce the problem:
Run the following code:
What is the current behavior?
It fails with:
What is the expected behavior?
It should not fail
Please tell us about your environment:
- chisel version:
6.6.0
- OS:
Debian Bookworm
The text was updated successfully, but these errors were encountered: