summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/OptionBundle.scala
diff options
context:
space:
mode:
authorRichard Lin2018-01-02 13:51:36 -0800
committerGitHub2018-01-02 13:51:36 -0800
commit678df42aa6bf2f4715be2d051c3c29f058948d0c (patch)
tree0b3fb00565e1c442abd7885d490cd4324f02d3fe /src/test/scala/chiselTests/OptionBundle.scala
parentcb7fcd2b18135230dc40f3c7bb98685e7ffde9d5 (diff)
parentade792ee7c5bb718f738f5e4c3886b2e87c68756 (diff)
Merge pull request #723 from freechipsproject/autoclonetype
Auto clone type 🦆
Diffstat (limited to 'src/test/scala/chiselTests/OptionBundle.scala')
-rw-r--r--src/test/scala/chiselTests/OptionBundle.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/scala/chiselTests/OptionBundle.scala b/src/test/scala/chiselTests/OptionBundle.scala
index 2ac661ea..03b08385 100644
--- a/src/test/scala/chiselTests/OptionBundle.scala
+++ b/src/test/scala/chiselTests/OptionBundle.scala
@@ -6,7 +6,7 @@ import org.scalatest._
import chisel3._
import chisel3.testers.BasicTester
-class OptionBundle(hasIn: Boolean) extends Bundle {
+class OptionBundle(val hasIn: Boolean) extends Bundle {
val in = if (hasIn) {
Some(Input(Bool()))
} else {
@@ -15,7 +15,7 @@ class OptionBundle(hasIn: Boolean) extends Bundle {
val out = Output(Bool())
}
-class OptionBundleModule(hasIn: Boolean) extends Module {
+class OptionBundleModule(val hasIn: Boolean) extends Module {
val io = IO(new OptionBundle(hasIn))
if (hasIn) {
io.out := io.in.get