Update 2.13 compatibility

This commit is contained in:
Dolu1990 2021-06-23 11:48:38 +02:00
parent cdd8a7e94a
commit df7ac05db9
7 changed files with 22 additions and 19 deletions

View File

@ -10,8 +10,8 @@ lazy val root = (project in file(".")).
scalacOptions += s"-Xplugin:${new File(baseDirectory.value + s"/../SpinalHDL/idslplugin/target/scala-2.11/spinalhdl-idsl-plugin_2.11-$spinalVersion.jar")}",
scalacOptions += s"-Xplugin-require:idsl-plugin",
libraryDependencies ++= Seq(
"org.scalatest" % "scalatest_2.11" % "2.2.1",
"org.yaml" % "snakeyaml" % "1.8"
"org.scalatest" %% "scalatest" % "3.2.5",
"org.yaml" % "snakeyaml" % "1.8"
),
name := "VexRiscv"
).dependsOn(spinalHdlIdslPlugin, spinalHdlSim,spinalHdlCore,spinalHdlLib)

View File

@ -174,9 +174,9 @@ class Briey(config: BrieyConfig) extends Component{
val io = new Bundle{
//Clocks / reset
val asyncReset = in Bool
val axiClk = in Bool
val vgaClk = in Bool
val asyncReset = in Bool()
val axiClk = in Bool()
val vgaClk = in Bool()
//Main components IO
val jtag = slave(Jtag())
@ -188,7 +188,7 @@ class Briey(config: BrieyConfig) extends Component{
val uart = master(Uart())
val vga = master(Vga(vgaRgbConfig))
val timerExternal = in(PinsecTimerCtrlExternal())
val coreInterrupt = in Bool
val coreInterrupt = in Bool()
}
val resetCtrlClockDomain = ClockDomain(

View File

@ -157,8 +157,8 @@ case class Murax(config : MuraxConfig) extends Component{
val io = new Bundle {
//Clocks / reset
val asyncReset = in Bool
val mainClk = in Bool
val asyncReset = in Bool()
val mainClk = in Bool()
//Main components IO
val jtag = slave(Jtag())

View File

@ -142,7 +142,7 @@ class MuraxApb3Timer extends Component{
addressWidth = 8,
dataWidth = 32
))
val interrupt = out Bool
val interrupt = out Bool()
}
val prescaler = Prescaler(16)

View File

@ -2,13 +2,13 @@ package vexriscv
import java.io.File
import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite
import spinal.core.SpinalVerilog
import vexriscv.demo._
import scala.sys.process._
class DhrystoneBench extends FunSuite {
class DhrystoneBench extends AnyFunSuite {
def doCmd(cmd: String): String = {
val stdOut = new StringBuilder()
class Logger extends ProcessLogger {

View File

@ -3,7 +3,9 @@ package vexriscv
import java.io.{File, OutputStream}
import java.util.concurrent.{ForkJoinPool, TimeUnit}
import org.apache.commons.io.FileUtils
import org.scalatest.{BeforeAndAfterAll, FunSuite, ParallelTestExecution, Tag, Transformer}
import org.scalatest.{BeforeAndAfterAll, ParallelTestExecution, Tag, Transformer}
import org.scalatest.funsuite.AnyFunSuite
import spinal.core._
import spinal.lib.DoCmd
import vexriscv.demo._
@ -617,7 +619,7 @@ object PlayFuture extends App{
Thread.sleep(8000)
}
class MultithreadedFunSuite(threadCount : Int) extends FunSuite {
class MultithreadedFunSuite(threadCount : Int) extends AnyFunSuite {
val finalThreadCount = if(threadCount > 0) threadCount else {
new oshi.SystemInfo().getHardware.getProcessor.getLogicalProcessorCount
}
@ -650,7 +652,7 @@ class MultithreadedFunSuite(threadCount : Int) extends FunSuite {
}
}
override protected def test(testName: String, testTags: Tag*)(testFun: => Unit) {
def testMp(testName: String, testTags: Tag*)(testFun: => Unit) {
val job = new Job(testFun)
super.test(testName, testTags :_*)(job.join())
}
@ -662,7 +664,7 @@ class MultithreadedFunSuite(threadCount : Int) extends FunSuite {
class FunTestPara extends MultithreadedFunSuite(3){
def createTest(name : String): Unit ={
test(name){
testMp(name){
for(i <- 0 to 4) {
println(s"$name $i")
Thread.sleep(500)
@ -745,7 +747,7 @@ class TestIndividualFeatures extends MultithreadedFunSuite(sys.env.getOrElse("VE
stdOut.toString()
}
test(prefix + name) {
testMp(prefix + name) {
println("START TEST " + prefix + name)
//Cleanup
@ -787,7 +789,7 @@ class TestIndividualFeatures extends MultithreadedFunSuite(sys.env.getOrElse("VE
val rand = new Random(seed)
test("Info"){
testMp("Info"){
println(s"MAIN_SEED=$seed")
}
println(s"Seed=$seed")

View File

@ -5,7 +5,7 @@ import java.lang
import java.util.Scanner
import org.apache.commons.io.FileUtils
import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite
import spinal.core.SpinalEnumElement
import spinal.core.sim._
import spinal.core._
@ -18,9 +18,10 @@ import scala.collection.mutable
import scala.collection.mutable.ArrayBuffer
import scala.sys.process.ProcessLogger
import scala.util.Random
import org.scalatest.funsuite.AnyFunSuite
//TODO Warning DataCache write aggregation will disable itself
class FpuTest extends FunSuite{
class FpuTest extends AnyFunSuite{
val b2f = lang.Float.intBitsToFloat(_)
val b2d = lang.Double.longBitsToDouble(_)