From 524b8957e36a7ac931ca0fe042a64fce80195057 Mon Sep 17 00:00:00 2001 From: Adam Izraelevitz Date: Thu, 9 May 2019 12:06:29 -0700 Subject: Bugfix: GroupComponents (#1082) * Added test to GroupComponentsSpec demonstrating bug * Added bugfix to GroupComponents for invalid ports of grouped instances --- src/main/scala/firrtl/transforms/GroupComponents.scala | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main') 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 -- cgit v1.2.3