DecoderPlugin now implement forceIllegal API

This commit is contained in:
Dolu1990 2022-03-23 18:53:43 +01:00
parent 51b8865b66
commit 9149c42065
2 changed files with 3 additions and 0 deletions

View File

@ -24,6 +24,7 @@ trait DecoderService{
def add(key : MaskedLiteral,values : Seq[(Stageable[_ <: BaseType],Any)])
def add(encoding :Seq[(MaskedLiteral,Seq[(Stageable[_ <: BaseType],Any)])])
def addDefault(key : Stageable[_ <: BaseType], value : Any)
def forceIllegal() : Unit
}
case class ExceptionCause(codeWidth : Int) extends Bundle{

View File

@ -71,6 +71,8 @@ class DecoderSimplePlugin(catchIllegalInstruction : Boolean = false,
}
}
def forceIllegal() : Unit = if(catchIllegalInstruction) pipeline.decode.input(pipeline.config.LEGAL_INSTRUCTION) := False
val defaults = mutable.LinkedHashMap[Stageable[_ <: BaseType], BaseType]()
val encodings = mutable.LinkedHashMap[MaskedLiteral,ArrayBuffer[(Stageable[_ <: BaseType], BaseType)]]()
var decodeExceptionPort : Flow[ExceptionCause] = null