1
0

Default to configurable priorities

up-to-7 levels is kind of arbitrary, but I'm unwilling to introduce
a new Parameter at the moment.
This commit is contained in:
Andrew Waterman 2016-10-04 22:22:42 -07:00
parent e952f8f222
commit 968851f7e3

View File

@ -44,7 +44,8 @@ case class CoreplexConfig(
nMemChannels: Int, nMemChannels: Int,
hasSupervisor: Boolean) hasSupervisor: Boolean)
{ {
val plicKey = PLICConfig(nTiles, hasSupervisor, nExtInterrupts, 0) val nInterruptPriorities = if (nExtInterrupts <= 1) 0 else (nExtInterrupts min 7)
val plicKey = PLICConfig(nTiles, hasSupervisor, nExtInterrupts, nInterruptPriorities)
} }
abstract class BaseCoreplex(c: CoreplexConfig)(implicit p: Parameters) extends LazyModule abstract class BaseCoreplex(c: CoreplexConfig)(implicit p: Parameters) extends LazyModule