Skip to content

Commit

Permalink
[rtl] use scanRightOr in chisel3 utils
Browse files Browse the repository at this point in the history
  • Loading branch information
OceanS2000 committed Feb 16, 2023
1 parent 994c6ea commit 86e5d66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 37 deletions.
35 changes: 0 additions & 35 deletions tilelink/src/utils/package.scala

This file was deleted.

4 changes: 2 additions & 2 deletions tilelink/src/xbar/TLArbiter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class TLArbiter(val parameter: TLArbiterParameter)
val valid = valids(width - 1, 0)
assert(valid === valids)
val mask = RegInit(((BigInt(1) << width) - 1).U(width - 1, 0))
val filter = Cat(valid & (~mask).asUInt, valid)
val unready = (rightOR(filter, width * 2, width) >> 1).asUInt | (mask << width).asUInt
val filter = Cat(scanRightOr(valid & ~mask), valid)
val unready = (filter >> 1).asUInt | (mask << width).asUInt
val readys = (~((unready >> width).asUInt & unready(width - 1, 0))).asUInt
when(select && valid.orR) {
mask := scanLeftOr(readys & valid)
Expand Down

0 comments on commit 86e5d66

Please sign in to comment.