Skip to content

Commit

Permalink
Merge pull request #3549 from tymcauley/waiveall-axi4-xbar
Browse files Browse the repository at this point in the history
Fix AXI4 Xbar elaboration error due to missing fields
  • Loading branch information
jerryz123 committed Feb 20, 2024
2 parents 39b2188 + 2a3bd4e commit 49e7d27
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main/scala/amba/axi4/Xbar.scala
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ class AXI4Xbar(
// Transform input bundles
val in = Wire(Vec(io_in.size, new AXI4Bundle(wide_bundle)))
for (i <- 0 until in.size) {
in(i).squeezeAll :<>= io_in(i).squeezeAll
in(i).aw.bits.user := DontCare
in(i).aw.bits.echo := DontCare
in(i).ar.bits.user := DontCare
in(i).ar.bits.echo := DontCare
in(i).w.bits.user := DontCare
in(i).squeezeAll.waiveAll :<>= io_in(i).squeezeAll.waiveAll

// Handle size = 1 gracefully (Chisel3 empty range is broken)
def trim(id: UInt, size: Int) = if (size <= 1) 0.U else id(log2Ceil(size)-1, 0)
Expand Down Expand Up @@ -168,7 +173,9 @@ class AXI4Xbar(
// Transform output bundles
val out = Wire(Vec(io_out.size, new AXI4Bundle(wide_bundle)))
for (i <- 0 until out.size) {
io_out(i).squeezeAll :<>= out(i).squeezeAll
out(i).b.bits.user := DontCare
out(i).r.bits.user := DontCare
io_out(i).squeezeAll.waiveAll :<>= out(i).squeezeAll.waiveAll

if (io_in.size > 1) {
// Block AW if we cannot record the W source
Expand Down

0 comments on commit 49e7d27

Please sign in to comment.