ucb-bar / chisel-tutorial

chisel tutorial exercises and answers
Other
695 stars 197 forks source link

"chisel-iotesters" -> "1.4.1+" in build.sbt breaks Vec code (which is also in your solutions) #171

Open FrancescoTerrosi opened 2 years ago

FrancescoTerrosi commented 2 years ago

Hello, I discovered chisel and its ecosystem (rocketchip, chipyard etc.) recently and I'm playing around with the various tutorials I found.

This is the error i get:


(base) xxx@ubuntu:~/chisel-tutorial$ ./run-solution.sh all
[info] Loading project definition from /home/xxx/chisel-tutorial/project
[info] Loading settings for project chisel-tutorial from build.sbt ...
[info] Set current project to chisel-tutorial (in build file:/home/xxx/chisel-tutorial/)
[info] Compiling 56 Scala sources to /home/xxx/chisel-tutorial/target/scala-2.12/classes ...
[error] /home/xxx/chisel-tutorial/src/main/scala/problems/VecShiftRegisterParam.scala:22:33: not enough arguments for method apply: (n: Int, gen: T)(implicit sourceInfo: chisel3.internal.sourceinfo.SourceInfo, implicit compileOptions: chisel3.CompileOptions)chisel3.Vec[T] in trait VecFactory.
[error] Unspecified value parameter gen.
[error]   val delay_vector = RegInit(Vec(initValues))
[error]                                 ^
[error] /home/xxx/chisel-tutorial/src/main/scala/problems/VecShiftRegisterSimple.scala:18:27: not enough arguments for method apply: (n: Int, gen: T)(implicit sourceInfo: chisel3.internal.sourceinfo.SourceInfo, implicit compileOptions: chisel3.CompileOptions)chisel3.Vec[T] in trait VecFactory.
[error] Unspecified value parameter gen.
[error]   val delays = RegInit(Vec(initValues))
[error]                           ^
[error] two errors found
[error] (Compile / compileIncremental) Compilation failed
[error] Total time: 7 s, completed Mar 30, 2022, 8:55:47 AM

I was confused at first because I started from the Chisel Learning Journey and my code worked there. hence, i tried to run your provided solutions with run-solution.sh all and I kept getting the error above. Changing the chisel-iotesters from version 1.4.1.+ to version 1.2.+ fixed this issue, but the sensation of weird workaround pervades me.