summaryrefslogtreecommitdiff
path: root/src/test/scala/ChiselTests/BundleWire.scala
diff options
context:
space:
mode:
authorHenry Cook2015-08-12 19:32:43 -0700
committerHenry Cook2015-08-12 19:32:57 -0700
commit85d7403f9bf7bc2b3520f924736c237f21f70ebd (patch)
tree64560f779063a419395a2fb8a31ea52c52af4404 /src/test/scala/ChiselTests/BundleWire.scala
parent7e69966362b1dbd9835695250494857f3a3767c8 (diff)
being to convert tests to scala-test; tests compile and run
Diffstat (limited to 'src/test/scala/ChiselTests/BundleWire.scala')
-rw-r--r--src/test/scala/ChiselTests/BundleWire.scala35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/test/scala/ChiselTests/BundleWire.scala b/src/test/scala/ChiselTests/BundleWire.scala
deleted file mode 100644
index 5d6af2aa..00000000
--- a/src/test/scala/ChiselTests/BundleWire.scala
+++ /dev/null
@@ -1,35 +0,0 @@
-package ChiselTests
-import Chisel._
-import Chisel.testers._
-
-class Coord extends Bundle {
- val x = UInt(width = 32)
- val y = UInt(width = 32)
-}
-
-class BundleWire extends Module {
- val io = new Bundle {
- val in = (new Coord).asInput
- val outs = Vec((new Coord).asOutput, 4)
- }
- val coords = Wire(Vec(new Coord, 4))
- for (i <- 0 until 4) {
- coords(i) := io.in
- io.outs(i) := coords(i)
- }
-}
-
-class BundleWireTester(c: BundleWire) extends Tester(c) {
- for (t <- 0 until 4) {
- val test_in_x = rnd.nextInt(256)
- val test_in_y = rnd.nextInt(256)
- poke(c.io.in.x, test_in_x)
- poke(c.io.in.y, test_in_y)
- step(1)
- for (i <- 0 until 4) {
- expect(c.io.outs(i).x, test_in_x)
- expect(c.io.outs(i).y, test_in_y)
- }
- }
-}
-