diff --git a/build.sc b/build.sc index 924cf8dc0..4364fbb1e 100644 --- a/build.sc +++ b/build.sc @@ -30,6 +30,9 @@ trait CommonDiffTest extends ScalaModule with SbtModule { override def scalacPluginIvyDeps = Agg(ivys.chisel3Plugin) + override def scalacOptions = Seq("-Ymacro-annotations") ++ + Seq("-Xfatal-warnings", "-feature", "-deprecation", "-language:reflectiveCalls") + override def ivyDeps = Agg(ivys.chisel3) } diff --git a/src/main/scala/DPIC.scala b/src/main/scala/DPIC.scala index 5c3c85059..62e0f54f4 100644 --- a/src/main/scala/DPIC.scala +++ b/src/main/scala/DPIC.scala @@ -63,7 +63,7 @@ class DPIC[T <: DifftestBundle](gen: T) extends ExtModule // This is different from BlackBoxes. io.elements.toSeq.reverse.map{ case (name, data) => data match { - case vec: Vec[Data] => vec.zipWithIndex.map { case (v, i) => (s"io_${name}_$i", v) } + case vec: Vec[_] => vec.zipWithIndex.map { case (v, i) => (s"io_${name}_$i", v) } case _ => Seq((s"io_$name", data)) } } diff --git a/src/main/scala/Difftest.scala b/src/main/scala/Difftest.scala index f547cdd04..fd1000056 100644 --- a/src/main/scala/Difftest.scala +++ b/src/main/scala/Difftest.scala @@ -88,7 +88,7 @@ abstract class DifftestBundle extends Bundle val raw = elements.toSeq.reverse.filterNot(e => filteredElements.contains(e._1)) raw.map{ case (s, data) => data match { - case v: Vec[UInt] => (s, Some(v)) + case v: Vec[_] => (s, Some(v.asInstanceOf[Vec[UInt]])) case u: UInt => (s, Some(Seq(u))) case _ => println(s"Unknown type: ($s, $data)") (s, None)