pass VexRiscv regressions

This commit is contained in:
Dolu1990 2017-10-30 14:29:25 +01:00
parent 173336af33
commit ba42f71813
5 changed files with 15 additions and 16 deletions

View File

@ -9,7 +9,7 @@ scalaVersion := "2.11.8"
EclipseKeys.withSource := true
libraryDependencies ++= Seq(
"com.github.spinalhdl" % "spinalhdl-core_2.11" % "0.10.15",
"com.github.spinalhdl" % "spinalhdl-lib_2.11" % "0.10.15",
"com.github.spinalhdl" % "spinalhdl-core_2.11" % "0.11.0",
"com.github.spinalhdl" % "spinalhdl-lib_2.11" % "0.11.0",
"org.yaml" % "snakeyaml" % "1.8"
)
)

View File

@ -12,13 +12,12 @@ class Stageable[T <: Data](val dataType : T) extends HardType[T](dataType) with
class Stage() extends Area{
def outsideCondScope[T](that : => T) : T = {
val condStack = GlobalData.get.conditionalAssignStack.stack.toList
val switchStack = GlobalData.get.switchStack.stack.toList
GlobalData.get.conditionalAssignStack.stack.clear()
GlobalData.get.switchStack.stack.clear()
val body = Component.current.dslBody
body.push()
val swapContext = body.swap()
val ret = that
GlobalData.get.conditionalAssignStack.stack.pushAll(condStack.reverseIterator)
GlobalData.get.switchStack.stack.pushAll(switchStack.reverseIterator)
body.pop()
swapContext.appendBack()
ret
}

View File

@ -28,7 +28,7 @@ import spinal.lib.eda.altera.{InterruptReceiverTag, ResetEmitterTag}
object TestsWorkspace {
def main(args: Array[String]) {
SpinalVerilog {
SpinalConfig(mergeAsyncProcess = false).generateVerilog {
val configFull = VexRiscvConfig(
plugins = List(
new PcManagerSimplePlugin(

View File

@ -54,5 +54,5 @@ object GenSmallestNoCsr extends App{
)
)
)
SpinalVerilog(cpu())
SpinalConfig(mergeAsyncProcess = false).generateVerilog(cpu())
}

View File

@ -83,11 +83,11 @@ class DecoderSimplePlugin(catchIllegalInstruction : Boolean) extends Plugin[VexR
stageables.foreach(e => {
defaults.get(e) match {
case Some(value) => {
value.input match {
value.head.source match {
case literal: EnumLiteral[_] => literal.fixEncoding(e.dataType.asInstanceOf[SpinalEnumCraft[_]].getEncoding)
case _ =>
}
defaultValue += value.input.asInstanceOf[Literal].getValue << offset
defaultValue += value.head.source .asInstanceOf[Literal].getValue << offset
defaultCare += ((BigInt(1) << e.dataType.getBitsWidth) - 1) << offset
}
@ -102,12 +102,12 @@ class DecoderSimplePlugin(catchIllegalInstruction : Boolean) extends Plugin[VexR
var decodedValue = defaultValue
var decodedCare = defaultCare
for((e, literal) <- values){
literal.input match{
literal.head.source match{
case literal : EnumLiteral[_] => literal.fixEncoding(e.dataType.asInstanceOf[SpinalEnumCraft[_]].getEncoding)
case _ =>
}
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
}
(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
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())))
toplevel.getAdditionalNodesRoot.clear()
// toplevel.getAdditionalNodesRoot.clear()
}
}
}