pass VexRiscv regressions
This commit is contained in:
parent
173336af33
commit
ba42f71813
|
@ -9,7 +9,7 @@ scalaVersion := "2.11.8"
|
||||||
EclipseKeys.withSource := true
|
EclipseKeys.withSource := true
|
||||||
|
|
||||||
libraryDependencies ++= Seq(
|
libraryDependencies ++= Seq(
|
||||||
"com.github.spinalhdl" % "spinalhdl-core_2.11" % "0.10.15",
|
"com.github.spinalhdl" % "spinalhdl-core_2.11" % "0.11.0",
|
||||||
"com.github.spinalhdl" % "spinalhdl-lib_2.11" % "0.10.15",
|
"com.github.spinalhdl" % "spinalhdl-lib_2.11" % "0.11.0",
|
||||||
"org.yaml" % "snakeyaml" % "1.8"
|
"org.yaml" % "snakeyaml" % "1.8"
|
||||||
)
|
)
|
|
@ -12,13 +12,12 @@ class Stageable[T <: Data](val dataType : T) extends HardType[T](dataType) with
|
||||||
|
|
||||||
class Stage() extends Area{
|
class Stage() extends Area{
|
||||||
def outsideCondScope[T](that : => T) : T = {
|
def outsideCondScope[T](that : => T) : T = {
|
||||||
val condStack = GlobalData.get.conditionalAssignStack.stack.toList
|
val body = Component.current.dslBody
|
||||||
val switchStack = GlobalData.get.switchStack.stack.toList
|
body.push()
|
||||||
GlobalData.get.conditionalAssignStack.stack.clear()
|
val swapContext = body.swap()
|
||||||
GlobalData.get.switchStack.stack.clear()
|
|
||||||
val ret = that
|
val ret = that
|
||||||
GlobalData.get.conditionalAssignStack.stack.pushAll(condStack.reverseIterator)
|
body.pop()
|
||||||
GlobalData.get.switchStack.stack.pushAll(switchStack.reverseIterator)
|
swapContext.appendBack()
|
||||||
ret
|
ret
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ import spinal.lib.eda.altera.{InterruptReceiverTag, ResetEmitterTag}
|
||||||
|
|
||||||
object TestsWorkspace {
|
object TestsWorkspace {
|
||||||
def main(args: Array[String]) {
|
def main(args: Array[String]) {
|
||||||
SpinalVerilog {
|
SpinalConfig(mergeAsyncProcess = false).generateVerilog {
|
||||||
val configFull = VexRiscvConfig(
|
val configFull = VexRiscvConfig(
|
||||||
plugins = List(
|
plugins = List(
|
||||||
new PcManagerSimplePlugin(
|
new PcManagerSimplePlugin(
|
||||||
|
|
|
@ -54,5 +54,5 @@ object GenSmallestNoCsr extends App{
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
SpinalVerilog(cpu())
|
SpinalConfig(mergeAsyncProcess = false).generateVerilog(cpu())
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,11 +83,11 @@ class DecoderSimplePlugin(catchIllegalInstruction : Boolean) extends Plugin[VexR
|
||||||
stageables.foreach(e => {
|
stageables.foreach(e => {
|
||||||
defaults.get(e) match {
|
defaults.get(e) match {
|
||||||
case Some(value) => {
|
case Some(value) => {
|
||||||
value.input match {
|
value.head.source match {
|
||||||
case literal: EnumLiteral[_] => literal.fixEncoding(e.dataType.asInstanceOf[SpinalEnumCraft[_]].getEncoding)
|
case literal: EnumLiteral[_] => literal.fixEncoding(e.dataType.asInstanceOf[SpinalEnumCraft[_]].getEncoding)
|
||||||
case _ =>
|
case _ =>
|
||||||
}
|
}
|
||||||
defaultValue += value.input.asInstanceOf[Literal].getValue << offset
|
defaultValue += value.head.source .asInstanceOf[Literal].getValue << offset
|
||||||
defaultCare += ((BigInt(1) << e.dataType.getBitsWidth) - 1) << offset
|
defaultCare += ((BigInt(1) << e.dataType.getBitsWidth) - 1) << offset
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -102,12 +102,12 @@ class DecoderSimplePlugin(catchIllegalInstruction : Boolean) extends Plugin[VexR
|
||||||
var decodedValue = defaultValue
|
var decodedValue = defaultValue
|
||||||
var decodedCare = defaultCare
|
var decodedCare = defaultCare
|
||||||
for((e, literal) <- values){
|
for((e, literal) <- values){
|
||||||
literal.input match{
|
literal.head.source match{
|
||||||
case literal : EnumLiteral[_] => literal.fixEncoding(e.dataType.asInstanceOf[SpinalEnumCraft[_]].getEncoding)
|
case literal : EnumLiteral[_] => literal.fixEncoding(e.dataType.asInstanceOf[SpinalEnumCraft[_]].getEncoding)
|
||||||
case _ =>
|
case _ =>
|
||||||
}
|
}
|
||||||
val offset = offsetOf(e)
|
val offset = offsetOf(e)
|
||||||
decodedValue |= literal.input.asInstanceOf[Literal].getValue << offset
|
decodedValue |= literal.head.source.asInstanceOf[Literal].getValue << offset
|
||||||
decodedCare |= ((BigInt(1) << e.dataType.getBitsWidth)-1) << offset
|
decodedCare |= ((BigInt(1) << e.dataType.getBitsWidth)-1) << offset
|
||||||
}
|
}
|
||||||
(Masked(key.value,key.careAbout),Masked(decodedValue,decodedCare))
|
(Masked(key.value,key.careAbout),Masked(decodedValue,decodedCare))
|
||||||
|
@ -145,7 +145,7 @@ class DecoderSimplePlugin(catchIllegalInstruction : Boolean) extends Plugin[VexR
|
||||||
val stageables = encodings.flatMap(_._2.map(_._1)).toSet
|
val stageables = encodings.flatMap(_._2.map(_._1)).toSet
|
||||||
stageables.foreach(e => out(RegNext(RegNext(toplevel.decode.insert(e)).setName(e.getName()))))
|
stageables.foreach(e => out(RegNext(RegNext(toplevel.decode.insert(e)).setName(e.getName()))))
|
||||||
if(catchIllegalInstruction) out(RegNext(RegNext(toplevel.decode.insert(LEGAL_INSTRUCTION)).setName(LEGAL_INSTRUCTION.getName())))
|
if(catchIllegalInstruction) out(RegNext(RegNext(toplevel.decode.insert(LEGAL_INSTRUCTION)).setName(LEGAL_INSTRUCTION.getName())))
|
||||||
toplevel.getAdditionalNodesRoot.clear()
|
// toplevel.getAdditionalNodesRoot.clear()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue