diff options
| author | Andrew Waterman | 2015-08-27 17:06:49 -0700 |
|---|---|---|
| committer | Andrew Waterman | 2015-08-27 23:43:26 -0700 |
| commit | 5293b1cfdcc18a4879f476a1c0370ec19e409089 (patch) | |
| tree | d5e6ba926bb33cab297ddd87734725090324c779 /src/main/scala/Chisel/Core.scala | |
| parent | 6ab5d0c440d77fa84b9ca2aab7b209b4f3108b0c (diff) | |
Fix bug where flipping top-level I/O had no effect
The fix is to propagate the flip to the fields in the bundle.
Diffstat (limited to 'src/main/scala/Chisel/Core.scala')
| -rw-r--r-- | src/main/scala/Chisel/Core.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/scala/Chisel/Core.scala b/src/main/scala/Chisel/Core.scala index 542d31e7..76e45d35 100644 --- a/src/main/scala/Chisel/Core.scala +++ b/src/main/scala/Chisel/Core.scala @@ -805,7 +805,10 @@ abstract class Module(_clock: Clock = null, _reset: Bool = null) extends HasId { private[Chisel] def ref = Builder.globalRefMap(this) private[Chisel] def lref = ref - private def computePorts = io.namedElts.unzip._2 + private[Chisel] def computePorts = io.namedElts.unzip._2 map { x => + val bundleDir = if (io.isFlip ^ x.isFlip) INPUT else OUTPUT + Port(x, if (x.dir == NO_DIR) bundleDir else x.dir) + } private def connectImplicitIOs(): this.type = _parent match { case Some(p) => |
