summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/experimental/DataViewTargetSpec.scala
diff options
context:
space:
mode:
authormergify[bot]2022-04-12 00:09:55 +0000
committerGitHub2022-04-12 00:09:55 +0000
commit898142ba05b04fb1602b249fd1ae81baa3f47f89 (patch)
tree75304868c8e8a43abc79a5e125c51167fccce6b4 /src/test/scala/chiselTests/experimental/DataViewTargetSpec.scala
parentd766e8f7270579406d54abc9015d494cd199c6ce (diff)
Enhance views to [sometimes] support dynamic indexing and implement FlatIO (backport #2476) (#2479)
* Capture 1:1 mappings of Aggregates inside of views This is implemented by including any corresponding Aggregates from the DataView.mapping in the AggregateViewBinding.childMap (which is now of type Map[Data, Data]). This enables dynamically indexing Vecs that are themselves elements of larger Aggregates in views when the corresponding element of the view is a Vec of the same type. It also increases the number of cases where a single Target can represent part of a view. (cherry picked from commit 1f6b1ca14ccf86918065073c3f6f3626dd83a68e) * Add FlatIO API for creating ports from Bundles without a prefix (cherry picked from commit 772a3a1fe3b9372b7c2d7cd2d424b2adcd633cdb) * [docs] Add FlatIO to the general cookbook (cherry picked from commit b4159641350f238f0f899b69954142ce8ee11544) Co-authored-by: Jack Koenig <koenig@sifive.com>
Diffstat (limited to 'src/test/scala/chiselTests/experimental/DataViewTargetSpec.scala')
-rw-r--r--src/test/scala/chiselTests/experimental/DataViewTargetSpec.scala4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/test/scala/chiselTests/experimental/DataViewTargetSpec.scala b/src/test/scala/chiselTests/experimental/DataViewTargetSpec.scala
index da27c9c8..ddeeab6e 100644
--- a/src/test/scala/chiselTests/experimental/DataViewTargetSpec.scala
+++ b/src/test/scala/chiselTests/experimental/DataViewTargetSpec.scala
@@ -125,9 +125,7 @@ class DataViewTargetSpec extends ChiselFlatSpec {
val pairs = annos.collect { case DummyAnno(t, idx) => (idx, t.toString) }.sortBy(_._1)
val expected = Seq(
0 -> "~MyParent|MyChild>out.foo",
- // The child of the view that was itself an Aggregate got split because 1:1 is lacking here
- 1 -> "~MyParent|MyChild>out.foo[0]",
- 1 -> "~MyParent|MyChild>out.foo[1]",
+ 1 -> "~MyParent|MyChild>out.foo",
2 -> "~MyParent|MyParent/inst:MyChild>out.foo",
3 -> "~MyParent|MyParent/inst:MyChild>out"
)