diff options
| author | Jack Koenig | 2017-08-06 16:37:31 -0700 |
|---|---|---|
| committer | Jack Koenig | 2017-08-07 16:26:43 -0700 |
| commit | 156435b80e32175883be21c7ab53784dd94f5c53 (patch) | |
| tree | 7a5cff31e5aa1fedea2a1a5ef7e521a3cefd8c03 /chiselFrontend/src/main/scala/chisel3 | |
| parent | 818d2d25e1a66147905c8bf672dc762a5df587ac (diff) | |
Don't assign default direction to Analog in Chisel._
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3')
| -rw-r--r-- | chiselFrontend/src/main/scala/chisel3/core/Data.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Data.scala b/chiselFrontend/src/main/scala/chisel3/core/Data.scala index 74e41895..66f16294 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Data.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Data.scala @@ -202,10 +202,11 @@ abstract class Data extends HasId { * DO NOT USE OUTSIDE THIS PURPOSE. THIS OPERATION IS DANGEROUS! */ private[core] def _assignCompatibilityExplicitDirection: Unit = { - _userDirection match { - case UserDirection.Unspecified => _userDirection = UserDirection.Output - case UserDirection.Flip => _userDirection = UserDirection.Input - case UserDirection.Input | UserDirection.Output => // nothing to do + (this, _userDirection) match { + case (_: Analog, _) => // nothing to do + case (_, UserDirection.Unspecified) => _userDirection = UserDirection.Output + case (_, UserDirection.Flip) => _userDirection = UserDirection.Input + case (_, UserDirection.Input | UserDirection.Output) => // nothing to do } } |
