object ManyInts extends SpatialApp {
val N = 200
type R = Int
type T = Int
def f(x: Int, y: Int): Int = x | y
@virtualize def main(): Unit = {
val outs = List.fill(N)(ArgOut[R])
val insA = List.fill(N)(ArgIn[T])
val insB = List.fill(N)(ArgIn[T])
(insA:::insB).foreach(setArg(_, zero[T]))
Accel {
(insA, insB, outs).zipped.foreach { case (inA, inB, out) =>
out := f(inA.value, inB.value)
}
}
}
}
This compiles and everything looks good when N = 200. If you set N = 300 or higher, though, it appears to not generate the split file GlobalWires properly. Specifically, the line declaring the trait is missing in GlobalWires_1.scala, and only the body of the trait and the closing bracket is generated.
This compiles and everything looks good when N = 200. If you set N = 300 or higher, though, it appears to not generate the split file GlobalWires properly. Specifically, the line declaring the trait is missing in GlobalWires_1.scala, and only the body of the trait and the closing bracket is generated.