Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in AXI4 Xbar with unused fields #3548

Closed
tymcauley opened this issue Dec 24, 2023 · 1 comment
Closed

Error in AXI4 Xbar with unused fields #3548

tymcauley opened this issue Dec 24, 2023 · 1 comment

Comments

@tymcauley
Copy link
Contributor

Type of issue: bug report

Impact: no functional change

Development Phase: proposal

Other information

When constructing an AXI4 Xbar where some master/slave ports have extra fields (such as AMBACorrupt), but others don't, the new :<>= connectable operators throw the following errors:

[error] generators/rocket-chip/src/main/scala/amba/axi4/Xbar.scala:88:24: unconnected consumer field AXI4Xbar.in[1].w.bits.user.corrupt: Wire[Bool]
[error]       in(i).squeezeAll :<>= io_in(i).squeezeAll
[error]                        ^
[error] generators/rocket-chip/src/main/scala/amba/axi4/Xbar.scala:171:28: dangling producer field AXI4Xbar.out[1].w.bits.user.corrupt: Wire[Bool]
[error]       io_out(i).squeezeAll :<>= out(i).squeezeAll
[error]                            ^
[error] There were 2 error(s) during hardware elaboration.

It looks like this was resolved in the TileLink Xbar by adding .waiveAll to these operators, and I can confirm that this resolves the hardware elaboration error for me.

If the current behavior is a bug, please provide the steps to reproduce the problem:

This change will reproduce the error:

--- a/src/main/scala/amba/axi4/Xbar.scala
+++ b/src/main/scala/amba/axi4/Xbar.scala
@@ -319,7 +319,7 @@ class AXI4XbarFuzzTest(name: String, txns: Int, nMasters: Int, nSlaves: Int)(imp
   masters.zipWithIndex.foreach { case (m, i) => (xbar
     := AXI4Delayer(0.25)
     := AXI4Deinterleaver(4096)
-    := TLToAXI4()
+    := TLToAXI4(wcorrupt = (if (i == 0) false else true))
     := TLFilter(filter(i))
     := TLRAMModel(s"${name} Master $i")
     := m.node) }

Then try to emit FIRRTL for the AMBAUnitTestConfig.

Please tell us about your environment:

  • Version: current HEAD on master: 74d65ca
  • OS: macOS 14.2.1

What is the use case for changing the behavior?

If you have an AXI4 crossbar that is driven by two masters, one with the AMBACorruptField, and one without, then you'll get this elaboration error.

tymcauley added a commit to tymcauley/rocket-chip that referenced this issue Dec 24, 2023
tymcauley added a commit to tymcauley/rocket-chip that referenced this issue Dec 24, 2023
tymcauley added a commit to tymcauley/rocket-chip that referenced this issue Jan 29, 2024
tymcauley added a commit to tymcauley/rocket-chip that referenced this issue Feb 15, 2024
@tymcauley
Copy link
Contributor Author

Resolved by #3549.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant