From 968851f7e38b2b4af79dcbf6ecebea6029fafb55 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Tue, 4 Oct 2016 22:22:42 -0700 Subject: [PATCH] Default to configurable priorities up-to-7 levels is kind of arbitrary, but I'm unwilling to introduce a new Parameter at the moment. --- src/main/scala/coreplex/BaseCoreplex.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/scala/coreplex/BaseCoreplex.scala b/src/main/scala/coreplex/BaseCoreplex.scala index f635d248..bb933227 100644 --- a/src/main/scala/coreplex/BaseCoreplex.scala +++ b/src/main/scala/coreplex/BaseCoreplex.scala @@ -44,7 +44,8 @@ case class CoreplexConfig( nMemChannels: Int, 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