summaryrefslogtreecommitdiff
path: root/src/test/scala/ChiselTests/Outer.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/Outer.scala
parent7e69966362b1dbd9835695250494857f3a3767c8 (diff)
being to convert tests to scala-test; tests compile and run
Diffstat (limited to 'src/test/scala/ChiselTests/Outer.scala')
-rw-r--r--src/test/scala/ChiselTests/Outer.scala33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/test/scala/ChiselTests/Outer.scala b/src/test/scala/ChiselTests/Outer.scala
deleted file mode 100644
index 4a20544d..00000000
--- a/src/test/scala/ChiselTests/Outer.scala
+++ /dev/null
@@ -1,33 +0,0 @@
-package ChiselTests
-import Chisel._
-import Chisel.testers._
-
-class Inner extends Module {
- val io = new Bundle {
- val in = Bits(INPUT, 8)
- val out = Bits(OUTPUT, 8)
- }
- io.out := io.in +% Bits(1)
-}
-
-class Outer extends Module {
- val io = new Bundle {
- val in = Bits(INPUT, 8)
- val out = Bits(OUTPUT, 8)
- }
- // val c = Module(new Inner)
- val c = Array(Module(new Inner))
- // val w = Wire(Bits(NO_DIR, 8))
- // w := io.in
- c(0).io.in := io.in
- io.out := (c(0).io.out * Bits(2))(7,0)
-}
-
-class OuterTester(c: Outer) extends Tester(c) {
- for (t <- 0 until 16) {
- val test_in = rnd.nextInt(256)
- poke(c.io.in, test_in)
- step(1)
- expect(c.io.out, ((test_in + 1) * 2)&255)
- }
-}