aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorjackkoenig2016-08-02 09:05:01 -0700
committerjackkoenig2016-08-02 09:05:01 -0700
commit203616271a864ded538904721f19a975b2959569 (patch)
tree773275bd203de7b2acc30845b6585f48c4a22c0c /src/main
parentdc493d5a1479a57125dd05f4601da94be7fa8be7 (diff)
Fix use of global state in instance loop checking
Also increase sensitivity of thread safety checking Fixes #159
Diffstat (limited to 'src/main')
-rw-r--r--src/main/scala/firrtl/passes/Checks.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/scala/firrtl/passes/Checks.scala b/src/main/scala/firrtl/passes/Checks.scala
index 9bbf7fa8..ab6db202 100644
--- a/src/main/scala/firrtl/passes/Checks.scala
+++ b/src/main/scala/firrtl/passes/Checks.scala
@@ -256,7 +256,7 @@ object CheckHighForm extends Pass with LazyLogging {
if (!c.modules.map(_.name).contains(s.module))
errors.append(new ModuleNotDefinedException(s.module))
// Check to see if a recursive module instantiation has occured
- val childToParent = moduleGraph.add(mname, s.module)
+ val childToParent = moduleGraph.add(m.name, s.module)
if(childToParent.nonEmpty) {
errors.append(new InstanceLoop(childToParent.mkString("->")))
}