Add a check that MaxHartIdBits is enough for all hartids (#1054)
* Add a check that MaxHartIdBits is enough for all hartids * Correct off-by-one error in hartid check
This commit is contained in:
parent
1852ccd8f3
commit
e9e05b5f3b
@ -27,7 +27,9 @@ case class RocketTileParams(
|
||||
require(dcache.isDefined)
|
||||
}
|
||||
|
||||
abstract class HartedTile(tileParams: TileParams, val hartid: Int)(implicit p: Parameters) extends BaseTile(tileParams)(p)
|
||||
abstract class HartedTile(tileParams: TileParams, val hartid: Int)(implicit p: Parameters) extends BaseTile(tileParams)(p) {
|
||||
require (log2Up(hartid + 1) <= p(MaxHartIdBits), s"p(MaxHartIdBits) of ${p(MaxHartIdBits)} is not enough for hartid ${hartid}")
|
||||
}
|
||||
|
||||
class RocketTile(val rocketParams: RocketTileParams)(implicit p: Parameters) extends HartedTile(rocketParams, rocketParams.hartid)(p)
|
||||
with HasExternalInterrupts
|
||||
|
Loading…
Reference in New Issue
Block a user