diff options
| author | Chick Markley | 2018-04-02 10:23:37 -0700 |
|---|---|---|
| committer | GitHub | 2018-04-02 10:23:37 -0700 |
| commit | 6ec5df16a38a7b53494ed3f52da039b8fa62175e (patch) | |
| tree | 47b81990e151b13a5435c7ee5bc713a58a2e9553 /src/main/scala/firrtl/transforms | |
| parent | 396ee7ca63eb8a9e201dcdea965cbfc3e9d36783 (diff) | |
CyclicException identifies a problem node. (#778)
Needed for special handling in Treadle.
Small refactor that allows users of DiGraph#linearize
to return the first node found in a cycle.
Fixed RemoveWiresTransfrom to handle this.
Added test to show usage of this feature.
Diffstat (limited to 'src/main/scala/firrtl/transforms')
| -rw-r--r-- | src/main/scala/firrtl/transforms/RemoveWires.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/scala/firrtl/transforms/RemoveWires.scala b/src/main/scala/firrtl/transforms/RemoveWires.scala index 931288d9..5ba953cd 100644 --- a/src/main/scala/firrtl/transforms/RemoveWires.scala +++ b/src/main/scala/firrtl/transforms/RemoveWires.scala @@ -111,9 +111,10 @@ class RemoveWires extends Transform { case Success(logic) => Module(info, name, ports, Block(decls ++ logic ++ otherStmts)) // If we hit a CyclicException, just abort removing wires - case Failure(_: CyclicException) => + case Failure(c: CyclicException) => + val problematicNode = c.node logger.warn(s"Cycle found in module $name, " + - "wires will not be removed which can prevent optimizations!") + s"wires will not be removed which can prevent optimizations! Problem node: $problematicNode") mod case Failure(other) => throw other } |
