failed to build the GCD module
zhutmost opened this issue · 4 comments
zhutmost commented
Hi developers,
I'm trying to build the GCD module as follows,
package gcd
import chisel3._
/**
* Compute GCD using subtraction method.
* Subtracts the smaller from the larger until register y is zero.
* value in register x is then the GCD
*/
class GCD extends Module {
val io = IO(new Bundle {
val value1 = Input(UInt(16.W))
val value2 = Input(UInt(16.W))
val loadingValues = Input(Bool())
val outputGCD = Output(UInt(16.W))
val outputValid = Output(Bool())
})
val x = Reg(UInt())
val y = Reg(UInt())
when(x > y) { x := x - y }
.otherwise { y := y - x }
when(io.loadingValues) {
x := io.value1
y := io.value2
}
io.outputGCD := x
io.outputValid := y === 0.U
}
But it failed for some bugs I cannot solve. Here is the log of builder.
Thank you.
edwardcwang commented
Can you show us the Dragonfly.scala
file?
zhutmost commented
Oh, it's just the file name of the gcd module.
ucbjrl commented
This looks like the Scala 2.12 problem with anonymous bundles.
You need to copy the relevant sections of chisel-template/build.sbt that
set the appropriate Scala compiler options to work around this.
…On Fri, Aug 17, 2018 at 9:05 AM, edwardcwang ***@***.***> wrote:
Can you show us the Dragonfly.scala file?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#35 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGh1wMNyuuAXImYBwDd48IKFc4JmgXbeks5uRunagaJpZM4WBz8k>
.
zhutmost commented
Thank you, ucbjrl. I bumped the scalaVersion to 2.11.12. and solved.
This issue can be closed.