Skip to content

Commit

Permalink
Report all warnings as errors (#155)
Browse files Browse the repository at this point in the history
* Fix the warnings in Difftest and DPIC
  • Loading branch information
poemonsense authored Sep 14, 2023
1 parent b0bb8d5 commit 3609274
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/DPIC.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/Difftest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3609274

Please sign in to comment.