summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/VendingMachine.scala
diff options
context:
space:
mode:
authorJim Lawson2016-06-21 09:17:30 -0700
committerJim Lawson2016-06-21 09:17:30 -0700
commitd675043717593fb7e96fb0f1952debbeb7f20a57 (patch)
tree75efcd84a40d0520421d0d40d9b9cc9fdba6df8d /src/test/scala/chiselTests/VendingMachine.scala
parent53813f61b7dfe246d214ab966739d01c65c8ecb0 (diff)
New Module, IO, Input/Output wrapping.
Diffstat (limited to 'src/test/scala/chiselTests/VendingMachine.scala')
-rw-r--r--src/test/scala/chiselTests/VendingMachine.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test/scala/chiselTests/VendingMachine.scala b/src/test/scala/chiselTests/VendingMachine.scala
index 012fc493..5baff275 100644
--- a/src/test/scala/chiselTests/VendingMachine.scala
+++ b/src/test/scala/chiselTests/VendingMachine.scala
@@ -4,10 +4,11 @@ package chiselTests
import Chisel._
class VendingMachine extends Module {
- val io = new Bundle {
- val nickel = Bool(dir = INPUT)
- val dime = Bool(dir = INPUT)
- val valid = Bool(dir = OUTPUT) }
+ val io = IO(new Bundle {
+ val nickel = Input(Bool())
+ val dime = Input(Bool())
+ val valid = Output(Bool())
+ })
val c = UInt(5, width = 3)
val sIdle :: s5 :: s10 :: s15 :: sOk :: Nil = Enum(UInt(), 5)
val state = Reg(init = sIdle)