diff options
| author | Jim Lawson | 2016-09-28 08:43:59 -0700 |
|---|---|---|
| committer | Jim Lawson | 2016-09-28 09:25:32 -0700 |
| commit | 2edfe895e4ff9f751c52904f73fe701502aa926a (patch) | |
| tree | 5fc05aacab0938b53dedd5375e644fb3dd3dff18 /chiselFrontend/src/main/scala/chisel3/core/Data.scala | |
| parent | 0c73611321cf12ff07c68e867f94430a329075e7 (diff) | |
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`.
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core/Data.scala')
| -rw-r--r-- | chiselFrontend/src/main/scala/chisel3/core/Data.scala | 4 |
1 files changed, 3 insertions, 1 deletions
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 } |
