VexRiscvBmbGenerator export more info
This commit is contained in:
parent
48cf4120f2
commit
209fc719e8
|
@ -1,11 +1,11 @@
|
||||||
package vexriscv
|
package vexriscv
|
||||||
|
|
||||||
import spinal.core._
|
import spinal.core._
|
||||||
import spinal.lib.bus.bmb.{Bmb, BmbAccessCapabilities, BmbAccessParameter, BmbImplicitDebugDecoder, BmbInvalidationParameter, BmbParameter, BmbInterconnectGenerator}
|
import spinal.lib.bus.bmb.{Bmb, BmbAccessCapabilities, BmbAccessParameter, BmbImplicitDebugDecoder, BmbInterconnectGenerator, BmbInvalidationParameter, BmbParameter}
|
||||||
import spinal.lib.bus.misc.AddressMapping
|
import spinal.lib.bus.misc.AddressMapping
|
||||||
import spinal.lib.com.jtag.{Jtag, JtagTapInstructionCtrl}
|
import spinal.lib.com.jtag.{Jtag, JtagTapInstructionCtrl}
|
||||||
import spinal.lib.generator._
|
import spinal.lib.generator._
|
||||||
import spinal.lib.slave
|
import spinal.lib.{sexport, slave}
|
||||||
import vexriscv.plugin._
|
import vexriscv.plugin._
|
||||||
import spinal.core.fiber._
|
import spinal.core.fiber._
|
||||||
|
|
||||||
|
@ -93,12 +93,33 @@ case class VexRiscvBmbGenerator()(implicit interconnectSmp: BmbInterconnectGener
|
||||||
}
|
}
|
||||||
|
|
||||||
val cpu = new VexRiscv(config)
|
val cpu = new VexRiscv(config)
|
||||||
|
def doExport(value : => Any, postfix : String) = {
|
||||||
|
sexport(Handle(value).setCompositeName(VexRiscvBmbGenerator.this, postfix))
|
||||||
|
}
|
||||||
|
|
||||||
|
doExport(cpu.plugins.exists(_.isInstanceOf[CfuPlugin]), "cfu")
|
||||||
|
doExport(cpu.plugins.exists(_.isInstanceOf[FpuPlugin]), "fpu")
|
||||||
for (plugin <- cpu.plugins) plugin match {
|
for (plugin <- cpu.plugins) plugin match {
|
||||||
case plugin: IBusSimplePlugin => iBus.load(plugin.iBus.toBmb())
|
case plugin: IBusSimplePlugin => iBus.load(plugin.iBus.toBmb())
|
||||||
case plugin: DBusSimplePlugin => dBus.load(plugin.dBus.toBmb())
|
case plugin: DBusSimplePlugin => dBus.load(plugin.dBus.toBmb())
|
||||||
case plugin: IBusCachedPlugin => iBus.load(plugin.iBus.toBmb())
|
case plugin: IBusCachedPlugin => {
|
||||||
case plugin: DBusCachedPlugin => dBus.load(plugin.dBus.toBmb())
|
iBus.load(plugin.iBus.toBmb())
|
||||||
|
doExport(plugin.config.wayCount, "icacheWays")
|
||||||
|
doExport(plugin.config.cacheSize, "icacheSize")
|
||||||
|
}
|
||||||
|
case plugin: DBusCachedPlugin => {
|
||||||
|
dBus.load(plugin.dBus.toBmb())
|
||||||
|
doExport(plugin.config.wayCount, "dcacheWays")
|
||||||
|
doExport(plugin.config.cacheSize, "dcacheSize")
|
||||||
|
}
|
||||||
|
case plugin: MmuPlugin => {
|
||||||
|
doExport(true, "mmu")
|
||||||
|
}
|
||||||
|
case plugin: StaticMemoryTranslatorPlugin => {
|
||||||
|
doExport(false, "mmu")
|
||||||
|
}
|
||||||
case plugin: CsrPlugin => {
|
case plugin: CsrPlugin => {
|
||||||
|
doExport(plugin.config.supervisorGen, "supervisor")
|
||||||
externalInterrupt load plugin.externalInterrupt
|
externalInterrupt load plugin.externalInterrupt
|
||||||
timerInterrupt load plugin.timerInterrupt
|
timerInterrupt load plugin.timerInterrupt
|
||||||
softwareInterrupt load plugin.softwareInterrupt
|
softwareInterrupt load plugin.softwareInterrupt
|
||||||
|
|
Loading…
Reference in New Issue