import spatial.dsl._
@spatial object drmt extends SpatialApp {
def main(args: Array[String]): Void = {
// Create DRAM (malloc)
val d = DRAM[Int](16)
// Set DRAM (memcpy)
val data = Array.fill[Int](16)(0)
setMem(d, data)
Accel {
// Create 16-element SRAM
val s = SRAM[Int](16)
// Transfer data from d to s
s load d(0::16)
// Add number to each element
Foreach(16 by 1){i => s(i) = s(i) + i}
// Transfer data back to d
d(0::16) store s
}
// Print contents in memory
printArray(getMem(d), "Result: ")
}
}
```
cd ~/spatial-quickstart
bin/spatial drmt --sim
This compiled the app. When you said you used "bin/spatial src/main/scala/drmt.scala", you you mean you ran this command verbatim? I was able to confirm the error is the "class not found exception" if this is the case. Or did running "bin/spatial drmt" actually fail to find the class, in which case I did something wrong here?