From 2edfe895e4ff9f751c52904f73fe701502aa926a Mon Sep 17 00:00:00 2001 From: Jim Lawson Date: Wed, 28 Sep 2016 08:43:59 -0700 Subject: Don't use firrtlDirection for direction checks - fix #298. firrtlDirection should only be used for emitting firrtl. Any checks on the actual direction should use the bound Direction `dir`. --- chiselFrontend/src/main/scala/chisel3/core/Data.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'chiselFrontend/src/main/scala/chisel3/core/Data.scala') diff --git a/chiselFrontend/src/main/scala/chisel3/core/Data.scala b/chiselFrontend/src/main/scala/chisel3/core/Data.scala index 4bb58572..52bc8128 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Data.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Data.scala @@ -241,7 +241,9 @@ abstract class Data extends HasId { // firrtlDirection is the direction we report to firrtl. // It maintains the user-specified value (as opposed to the "actual" or applied/propagated value). - var firrtlDirection: Direction = Direction.Unspecified + // NOTE: This should only be used for emitting acceptable firrtl. + // The Element.dir should be used for any tests involving direction. + private var firrtlDirection: Direction = Direction.Unspecified /** Default pretty printing */ def toPrintable: Printable } -- cgit v1.2.3