Error with Queue: Chisel.Queue was not properly wrapped into a module() call.

86 views
Skip to first unread message

Kentaro Sano

unread,
Sep 29, 2014, 2:18:36 PM9/29/14
to chisel...@googlegroups.com
Hi,

I could not solve the problem of error with Queue. Could you help me?
I tried to use "Queue" in the following source code. However I got an error message:

[error] ChiselUtil.scala:359: Chisel.Queue was not properly wrapped into a module() call. in class Chisel.Queue
[error] (run-main-0) java.lang.IllegalStateException: 4mCODE HAS 4m1m10m4m 4m31mERRORS0m4m and 4m1m00m4m 4m33mWARNINGS0m
java.lang.IllegalStateException: CODE HAS 1 ERRORS and 0 WARNINGS
        at Chisel.ChiselError$.checkpoint(ChiselError.scala:128)
        at Chisel.Backend.elaborate(Backend.scala:791)
        at Chisel.VerilogBackend.elaborate(Verilog.scala:1086)
        ...

I couldn't find any solution so far. I am happy if I could get any hint.
Many thanks,

--
Kentaro


Extracted source code: mRemoteMM.scala
================================================================
package Qsys
package mRemoteMM

import Chisel._
import scala.collection.mutable.HashMap

class mRemoteMM_IO(...) extends Bundle {
...
}


class mRemoteMM  extends Module {

  val pW_AVMM_DATA    = ...
  ...

  val io = new mRemoteMM_IO(pW_AVMM_DATA, pW_GLBL_ADDR, pW_LOCL_ADDR,
                            pW_CSRG_ADDR, pW_CSRG_DATA, pW_AVST_DATA)

  //------------------------------------------------------------------------
  // Queue test 
  // WHEN THIS PART IS REMOVED, COMPILATION IS PASSED W/O ERRORS.

  val uFifo = new Queue(UInt(), 256) // entries = 256  (THIS MAKES THE ERROR)
  uFifo.io.enq.ready := io.st_in.ready
  uFifo.io.enq.valid := io.st_in.valid
  uFifo.io.enq.bits  := io.st_in.data
  uFifo.io.deq.ready := io.st_out.ready
  uFifo.io.deq.valid := io.st_out.valid
  uFifo.io.deq.bits  := io.st_out.data

}

object mRemoteMM {
  def main(args: Array[String]): Unit = {
    val cutArgs = args.slice(1, args.length)
    chiselMainTest(cutArgs, () => Module(new mRemoteMM())) {
      c => new mRemoteMM_Tests(c) }
  }
}
================================================================

Jonathan Bachrach

unread,
Sep 29, 2014, 3:24:40 PM9/29/14
to chisel...@googlegroups.com
you've got to wrap your called to new Queue with Module:

  val uFifo = Module(new Queue(UInt(), 256))

--
You received this message because you are subscribed to the Google Groups "chisel-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chisel-users...@googlegroups.com.
To post to this group, send email to chisel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chisel-users/63443851-0d4e-4209-b48e-1682d39a589b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kentaro Sano

unread,
Sep 29, 2014, 9:42:02 PM9/29/14
to chisel...@googlegroups.com, j...@pobox.com
Hi Jonathan,

I could solve the problem. Thank you so much!

Kentaro

2014年9月30日火曜日 4時24分40秒 UTC+9 Jonathan Bachrach:
Reply all
Reply to author
Forward
0 new messages