diff --git a/build.sbt b/build.sbt index 766ecd6..1fa6636 100644 --- a/build.sbt +++ b/build.sbt @@ -7,8 +7,8 @@ scalaVersion := "2.11.12" EclipseKeys.withSource := true libraryDependencies ++= Seq( - "com.github.spinalhdl" % "spinalhdl-core_2.11" % "1.3.0", - "com.github.spinalhdl" % "spinalhdl-lib_2.11" % "1.3.0" + "com.github.spinalhdl" % "spinalhdl-core_2.11" % "1.3.1", + "com.github.spinalhdl" % "spinalhdl-lib_2.11" % "1.3.1" ) fork := true diff --git a/src/main/scala/mylib/MyTopLevelSim.scala b/src/main/scala/mylib/MyTopLevelSim.scala index 4ea40f6..122c04e 100644 --- a/src/main/scala/mylib/MyTopLevelSim.scala +++ b/src/main/scala/mylib/MyTopLevelSim.scala @@ -15,8 +15,7 @@ object MyTopLevelSim { dut.clockDomain.forkStimulus(period = 10) var modelState = 0 - var idx = 0 - while(idx < 100){ + for(idx <- 0 to 99){ //Drive the dut inputs with random values dut.io.cond0 #= Random.nextBoolean() dut.io.cond1 #= Random.nextBoolean() @@ -33,8 +32,6 @@ object MyTopLevelSim { if(dut.io.cond0.toBoolean) { modelState = (modelState + 1) & 0xFF } - - idx += 1 } } }