1
0

rocket: fix itim GetPropertyByHartId (#1109)

needs to use RocketTileParams.hartid instead of zipWithIndex
This commit is contained in:
Henry Cook 2017-11-13 19:25:20 -08:00 committed by GitHub
parent b317735319
commit 7098ebf439
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,7 +100,7 @@ class ICacheBundle(outer: ICache) extends CoreBundle()(outer.p) {
// get a tile-specific property without breaking deduplication // get a tile-specific property without breaking deduplication
object GetPropertyByHartId { object GetPropertyByHartId {
def apply[T <: Data](tiles: Seq[RocketTileParams], f: RocketTileParams => Option[T], hartId: UInt): T = { def apply[T <: Data](tiles: Seq[RocketTileParams], f: RocketTileParams => Option[T], hartId: UInt): T = {
PriorityMux(tiles.zipWithIndex.collect { case (t, i) if f(t).nonEmpty => (hartId === i) -> f(t).get }) PriorityMux(tiles.collect { case t if f(t).isDefined => (t.hartid === hartId) -> f(t).get })
} }
} }