From 7098ebf439ea22187d91dc6f16f6377d021499b2 Mon Sep 17 00:00:00 2001 From: Henry Cook Date: Mon, 13 Nov 2017 19:25:20 -0800 Subject: [PATCH] rocket: fix itim GetPropertyByHartId (#1109) needs to use RocketTileParams.hartid instead of zipWithIndex --- src/main/scala/rocket/ICache.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/rocket/ICache.scala b/src/main/scala/rocket/ICache.scala index dce99de3..a03c21d8 100644 --- a/src/main/scala/rocket/ICache.scala +++ b/src/main/scala/rocket/ICache.scala @@ -100,7 +100,7 @@ class ICacheBundle(outer: ICache) extends CoreBundle()(outer.p) { // get a tile-specific property without breaking deduplication object GetPropertyByHartId { 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 }) } }