1
0
mirror of https://github.com/antonblanchard/chiselwatt.git synced 2026-02-28 01:26:22 +00:00
Files
antonblanchard.chiselwatt/build.sc
Anton Blanchard 3354fcf0ea Fix make check issue
make check has stopped working recently:

  java.lang.ClassCastException: java.lang.Class cannot be cast to firrtl.options.Dependency
  at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
  at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
  at scala.collection.immutable.List.foldLeft(List.scala:89)
  at firrtl.options.DependencyManager.firrtl$options$DependencyManager$$_targets(DependencyManager.scala:34)
  at firrtl.options.DependencyManager.firrtl$options$DependencyManager$$_targets$(DependencyManager.scala:33)
  at firrtl.options.PhaseManager.firrtl$options$DependencyManager$$_targets$lzycompute(DependencyManager.scala:414)
  at firrtl.options.PhaseManager.firrtl$options$DependencyManager$$_targets(DependencyManager.scala:414)
  at firrtl.options.DependencyManager.firrtl$options$DependencyManager$$prerequisiteGraph(DependencyManager.scala:115)
  at firrtl.options.DependencyManager.firrtl$options$DependencyManager$$prerequisiteGraph$(DependencyManager.scala:113)
  at firrtl.options.PhaseManager.firrtl$options$DependencyManager$$prerequisiteGraph$lzycompute(DependencyManager.scala:414)

I need to investigate, but setting chisel3 to 3.2.5 fixes it for now.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2020-04-23 22:23:13 +10:00

52 lines
1.5 KiB
Scala

// Works with mill 0.6.0
import mill._, scalalib._
import coursier.MavenRepository
/**
* Scala 2.12 module that is source-compatible with 2.11.
* This is due to Chisel's use of structural types. See
* https://github.com/freechipsproject/chisel3/issues/606
*/
trait HasXsource211 extends ScalaModule {
override def scalacOptions = T {
super.scalacOptions() ++ Seq(
"-deprecation",
"-unchecked",
"-Xsource:2.11"
)
}
}
trait HasChisel3 extends ScalaModule {
override def ivyDeps = Agg(
ivy"edu.berkeley.cs::chisel3:3.2.5"
)
}
trait HasChiselTests extends CrossSbtModule {
object test extends Tests {
override def ivyDeps = Agg(
ivy"org.scalatest::scalatest:3.0.4",
ivy"edu.berkeley.cs::chisel-iotesters:1.2+",
ivy"edu.berkeley.cs::chiseltest:0.2-SNAPSHOT"
)
def repositories = super.repositories ++ Seq(
MavenRepository("https://oss.sonatype.org/content/repositories/snapshots")
)
def testFrameworks = Seq("org.scalatest.tools.Framework")
}
}
trait HasMacroParadise extends ScalaModule {
// Enable macro paradise for @chiselName et al
val macroPlugins = Agg(ivy"org.scalamacros:::paradise:2.1.0")
def scalacPluginIvyDeps = macroPlugins
def compileIvyDeps = macroPlugins
}
object chiselwatt extends CrossSbtModule with HasChisel3 with HasChiselTests with HasXsource211 with HasMacroParadise {
override def millSourcePath = super.millSourcePath
def crossScalaVersion = "2.12.10"
def mainClass = Some("CoreObj")
}