From eb64bf518df7a91094d99b7dfc7dfa8d199f04ae Mon Sep 17 00:00:00 2001 From: harrisonliew Date: Wed, 29 May 2019 09:46:13 -0700 Subject: [PATCH] make analog attachment order fixed with linked hash map (#1089) --- src/main/scala/firrtl/passes/ExpandWhens.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/firrtl/passes/ExpandWhens.scala b/src/main/scala/firrtl/passes/ExpandWhens.scala index 956d54bc6c0..23c7956a316 100644 --- a/src/main/scala/firrtl/passes/ExpandWhens.scala +++ b/src/main/scala/firrtl/passes/ExpandWhens.scala @@ -256,7 +256,7 @@ object ExpandWhens extends Pass { case class AttachAcc(exprs: Seq[WrappedExpression], idx: Int) // Map from every attached expression to its corresponding AttachAcc // (many keys will point to same value) - val attachMap = mutable.HashMap.empty[WrappedExpression, AttachAcc] + val attachMap = mutable.LinkedHashMap.empty[WrappedExpression, AttachAcc] for (Attach(_, es) <- attaches) { val exprs = es.map(we(_)) val acc = exprs.map(attachMap.get(_)).flatten match {