diff options
| author | Jack Koenig | 2019-03-29 15:10:13 -0700 |
|---|---|---|
| committer | GitHub | 2019-03-29 15:10:13 -0700 |
| commit | 69e8250dd47210cee809c9ae231c1e320d76c084 (patch) | |
| tree | aa639ef424141d07adfaadb06712a90ebbe34a14 /chiselFrontend/src/main/scala/chisel3/core/Bits.scala | |
| parent | 0d00420ba2d00a957ace9112ab570fe52abea9d3 (diff) | |
Ignore empty aggregates elements when binding aggregate direction (#946)
Previously, including an empty aggregate in a Bundle would cause
a MixedDirectionAggregateException because it has no elements and thus
doesn't have a direction
* Add SampleElementBinding for Vec sample elements
* Add ActualDirection.Empty for bound empty aggregates
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core/Bits.scala')
| -rw-r--r-- | chiselFrontend/src/main/scala/chisel3/core/Bits.scala | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala index 7270d92b..43a851ed 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala @@ -27,11 +27,7 @@ abstract class Element extends Data { private[chisel3] override def bind(target: Binding, parentDirection: SpecifiedDirection) { binding = target val resolvedDirection = SpecifiedDirection.fromParent(parentDirection, specifiedDirection) - direction = resolvedDirection match { - case SpecifiedDirection.Unspecified | SpecifiedDirection.Flip => ActualDirection.Unspecified - case SpecifiedDirection.Output => ActualDirection.Output - case SpecifiedDirection.Input => ActualDirection.Input - } + direction = ActualDirection.fromSpecified(resolvedDirection) } private[core] override def topBindingOpt: Option[TopBinding] = super.topBindingOpt match { |
