summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/experimental/FlatIOSpec.scala
diff options
context:
space:
mode:
authormergify[bot]2022-11-05 22:31:07 +0000
committerGitHub2022-11-05 22:31:07 +0000
commit017bd6b9c96974df2a3c4f35e069d60fec001f2e (patch)
tree8dab4e44284af8a0904f0817c1875a9b73243328 /src/test/scala/chiselTests/experimental/FlatIOSpec.scala
parent4149157df6531d124483d992daf96cf4e62a0f0c (diff)
Support Analog in DataView (#2782) (#2828)
Co-authored-by: Megan Wachs <megan@sifive.com> (cherry picked from commit 26100a875c69bf56f7442fac82ca9c74ad3596eb) Co-authored-by: Jack Koenig <koenig@sifive.com>
Diffstat (limited to 'src/test/scala/chiselTests/experimental/FlatIOSpec.scala')
-rw-r--r--src/test/scala/chiselTests/experimental/FlatIOSpec.scala17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/test/scala/chiselTests/experimental/FlatIOSpec.scala b/src/test/scala/chiselTests/experimental/FlatIOSpec.scala
index dfce447f..ebb7cbdb 100644
--- a/src/test/scala/chiselTests/experimental/FlatIOSpec.scala
+++ b/src/test/scala/chiselTests/experimental/FlatIOSpec.scala
@@ -5,7 +5,7 @@ package chiselTests.experimental
import chisel3._
import chisel3.util.Valid
import chisel3.stage.ChiselStage.emitChirrtl
-import chisel3.experimental.FlatIO
+import chisel3.experimental.{Analog, FlatIO}
import chiselTests.ChiselFlatSpec
class FlatIOSpec extends ChiselFlatSpec {
@@ -48,4 +48,19 @@ class FlatIOSpec extends ChiselFlatSpec {
val chirrtl = emitChirrtl(new MyModule)
chirrtl should include("out[addr] <= in[addr]")
}
+
+ it should "support Analog members" in {
+ class MyBundle extends Bundle {
+ val foo = Output(UInt(8.W))
+ val bar = Analog(8.W)
+ }
+ class MyModule extends RawModule {
+ val in = IO(Flipped(new MyBundle))
+ val out = IO(new MyBundle)
+ out <> in
+ }
+ val chirrtl = emitChirrtl(new MyModule)
+ chirrtl should include("out.foo <= in.foo")
+ chirrtl should include("attach (out.bar, in.bar)")
+ }
}