aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAdam Izraelevitz2019-05-09 12:06:29 -0700
committermergify[bot]2019-05-09 19:06:29 +0000
commit524b8957e36a7ac931ca0fe042a64fce80195057 (patch)
tree9150d162c32d3dc27dfc5b12d81642d8a01b3490 /src/main
parent14b9ead2ee028ba977e9c61eff962380d4e87d30 (diff)
Bugfix: GroupComponents (#1082)
* Added test to GroupComponentsSpec demonstrating bug * Added bugfix to GroupComponents for invalid ports of grouped instances
Diffstat (limited to 'src/main')
-rw-r--r--src/main/scala/firrtl/transforms/GroupComponents.scala5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/scala/firrtl/transforms/GroupComponents.scala b/src/main/scala/firrtl/transforms/GroupComponents.scala
index 8c36bb6d..6e149762 100644
--- a/src/main/scala/firrtl/transforms/GroupComponents.scala
+++ b/src/main/scala/firrtl/transforms/GroupComponents.scala
@@ -264,6 +264,11 @@ class GroupComponents extends firrtl.Transform {
val group = byNode(getWRef(c.loc).name)
groupStatements(group) += Connect(c.info, c.loc, inGroupFixExps(group, topStmts)(c.expr))
Block(topStmts)
+ case i: IsInvalid if byNode(getWRef(i.expr).name) != "" =>
+ // Sink is in group
+ val group = byNode(getWRef(i.expr).name)
+ groupStatements(group) += i
+ EmptyStmt
// TODO Attach if all are in a group?
case _: IsDeclaration | _: Connect | _: Attach =>
// Sink is in Top