no match between component class X and Y

13 views
Skip to first unread message

Rupert Smith

unread,
Nov 19, 2013, 6:12:45 AM11/19/13
to chisel...@googlegroups.com
Hi,

I get this error when trying to instantiate one of my modules for testing:

chiselTestHelper.scala:46: error: 0x4[Chisel.Literal] has no match between component class com.thesett.numbers.chisel.impl.translator.rx.AtoiSubtractAndRange and 'class com.thesett.numbers.chisel.impl.translator.rx.Chunker' input of ? in class com.thesett.numbers.chisel.impl.translator.rx.chiselTestHelper$
*** RUN ABORTED ***
  java.lang.AssertionError: assertion failed: ()
  at scala.Predef$.assert(Predef.scala:179)
  at Chisel.Node$$anonfun$traceNode$2.apply(Node.scala:343)
  at Chisel.Node$$anonfun$traceNode$2.apply(Node.scala:337)
  at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
  at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
  at Chisel.Node.traceNode(Node.scala:337)
  at Chisel.Node$$anonfun$traceNode$2$$anonfun$apply$4.apply(Node.scala:354)
  at Chisel.Module.traceNodes(Module.scala:847)
  at Chisel.Backend.elaborate(Backend.scala:554)
  at Chisel.CppBackend.elaborate(Cpp.scala:604)

The Chunker module does create instances of the AtoiSubtractAndRange module:

val ds = Vec(cs.map(AtoiSubtractAndRange(_)))

The problem seems to be that earlier in testing, AtoiSubtractAndRange module is created on its own and unit tested. Later on Chunker is created, and it tries to create an ASAR as a child module. This second instantiation of ASAR produces the above error. I have also noticed it when running ChunkerTests in a Scala console, I can only run the test once, a second attempt will fail with this error.

There must be some state preserved in a singleton between separate instantiations of the module, that prevents a second instantiation from happening? An help on resolving this error would be appreciated.

Rupert
Reply all
Reply to author
Forward
0 new messages