diff options
| author | mergify[bot] | 2022-10-23 22:27:06 +0000 |
|---|---|---|
| committer | GitHub | 2022-10-23 22:27:06 +0000 |
| commit | f86c1ff7b39146f23cd1959bcc63dcb3b0b27125 (patch) | |
| tree | 4f443eb311ca5c0fb0fcd769cdee545ef49413a3 /core/src/main/scala/chisel3/internal/BiConnect.scala | |
| parent | d997acb05e5a307afb7c9ad4c136b9b4e1506efc (diff) | |
Fix for <> to BlackBox.IO with Compatibility Bundles (#2801) (#2803)
MonoConnect.traceFlow now properly handles coerced directions.
Also minor improvement to getClassName especially useful in test case printf debugging.
(cherry picked from commit 3aba755bdcf996c0fbd846d13268fd6641b29e96)
Co-authored-by: Megan Wachs <megan@sifive.com>
Diffstat (limited to 'core/src/main/scala/chisel3/internal/BiConnect.scala')
| -rw-r--r-- | core/src/main/scala/chisel3/internal/BiConnect.scala | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/src/main/scala/chisel3/internal/BiConnect.scala b/core/src/main/scala/chisel3/internal/BiConnect.scala index e8fb2361..74376598 100644 --- a/core/src/main/scala/chisel3/internal/BiConnect.scala +++ b/core/src/main/scala/chisel3/internal/BiConnect.scala @@ -227,9 +227,12 @@ private[chisel3] object BiConnect { context_mod: RawModule ): Unit = { // Verify right has no extra fields that left doesn't have - for ((field, right_sub) <- right_r.elements) { - if (!left_r.elements.isDefinedAt(field)) { - if (connectCompileOptions.connectFieldsMustMatch) { + + // For each field in left, descend with right. + // Don't bother doing this check if we don't expect it to necessarily pass. + if (connectCompileOptions.connectFieldsMustMatch) { + for ((field, right_sub) <- right_r.elements) { + if (!left_r.elements.isDefinedAt(field)) { throw MissingLeftFieldException(field) } } |
