Skip to content

Commit

Permalink
#81 Update SpinalHDL / sbt
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolu1990 committed Jan 4, 2024
1 parent db626f4 commit f44052b
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 13 deletions.
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ lazy val root = (project in file(".")).

libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.5",
"org.yaml" % "snakeyaml" % "1.8"
"org.yaml" % "snakeyaml" % "1.8",
"org.scalactic" %% "scalactic" % "3.2.10"
),
name := "SaxonSoc",
scalaSource in Compile := baseDirectory.value / "hardware" / "scala",
Expand Down
2 changes: 1 addition & 1 deletion ext/SpinalHDL
Submodule SpinalHDL updated 348 files
2 changes: 1 addition & 1 deletion ext/VexRiscv
Submodule VexRiscv updated 72 files
+155 −1 README.md
+592 −0 doc/gcdPeripheral/README.md
+ doc/gcdPeripheral/img/murax-gcd-diagrams-gcd-controlpath.png
+ doc/gcdPeripheral/img/murax-gcd-diagrams-gcd-datapath.png
+ doc/gcdPeripheral/img/murax-gcd-diagrams-gcd-dp+cp.png
+ doc/gcdPeripheral/img/murax-gcd-diagrams-gcd.png
+1 −0 doc/gcdPeripheral/img/murax-gcd-diagrams.drawio
+ doc/gcdPeripheral/img/simulationWave.PNG
+134 −0 doc/gcdPeripheral/src/main/c/murax/gcd_world/makefile
+1 −0 doc/gcdPeripheral/src/main/c/murax/gcd_world/project/build.properties
+98 −0 doc/gcdPeripheral/src/main/c/murax/gcd_world/src/crt.S
+13 −0 doc/gcdPeripheral/src/main/c/murax/gcd_world/src/gcd.h
+15 −0 doc/gcdPeripheral/src/main/c/murax/gcd_world/src/gpio.h
+17 −0 doc/gcdPeripheral/src/main/c/murax/gcd_world/src/interrupt.h
+110 −0 doc/gcdPeripheral/src/main/c/murax/gcd_world/src/linker.ld
+62 −0 doc/gcdPeripheral/src/main/c/murax/gcd_world/src/main.c
+78 −0 doc/gcdPeripheral/src/main/c/murax/gcd_world/src/main.h
+20 −0 doc/gcdPeripheral/src/main/c/murax/gcd_world/src/murax.h
+16 −0 doc/gcdPeripheral/src/main/c/murax/gcd_world/src/prescaler.h
+20 −0 doc/gcdPeripheral/src/main/c/murax/gcd_world/src/timer.h
+42 −0 doc/gcdPeripheral/src/main/c/murax/gcd_world/src/uart.h
+559 −0 doc/gcdPeripheral/src/main/scala/vexriscv/demo/Murax.scala
+39 −0 doc/gcdPeripheral/src/main/scala/vexriscv/periph/gcd/Apb3GCDCtrl.scala
+68 −0 doc/gcdPeripheral/src/main/scala/vexriscv/periph/gcd/GCDCtrl.scala
+54 −0 doc/gcdPeripheral/src/main/scala/vexriscv/periph/gcd/GCDData.scala
+46 −0 doc/gcdPeripheral/src/main/scala/vexriscv/periph/gcd/GCDTop.scala
+52 −0 doc/gcdPeripheral/src/main/scala/vexriscv/periph/gcd/GCDTopSim.scala
+2 −2 doc/nativeJtag/README.md
+0 −1 project/plugins.sbt
+1 −0 src/main/scala/vexriscv/Riscv.scala
+14 −0 src/main/scala/vexriscv/Services.scala
+3 −0 src/main/scala/vexriscv/VexRiscv.scala
+29 −20 src/main/scala/vexriscv/VexRiscvBmbGenerator.scala
+6 −6 src/main/scala/vexriscv/demo/GenCustomInterrupt.scala
+128 −0 src/main/scala/vexriscv/demo/GenFullWithOfficialRiscvDebug.scala
+100 −0 src/main/scala/vexriscv/demo/GenFullWithTcm.scala
+97 −0 src/main/scala/vexriscv/demo/GenFullWithTcmIntegrated.scala
+1 −1 src/main/scala/vexriscv/demo/VexRiscvAhbLite3.scala
+85 −12 src/main/scala/vexriscv/demo/smp/VexRiscvSmpCluster.scala
+23 −7 src/main/scala/vexriscv/demo/smp/VexRiscvSmpLitexCluster.scala
+10 −5 src/main/scala/vexriscv/ip/DataCache.scala
+21 −8 src/main/scala/vexriscv/ip/fpu/FpuCore.scala
+6 −3 src/main/scala/vexriscv/plugin/BranchPlugin.scala
+5 −3 src/main/scala/vexriscv/plugin/CfuPlugin.scala
+124 −34 src/main/scala/vexriscv/plugin/CsrPlugin.scala
+87 −37 src/main/scala/vexriscv/plugin/DBusCachedPlugin.scala
+19 −11 src/main/scala/vexriscv/plugin/DBusSimplePlugin.scala
+1 −1 src/main/scala/vexriscv/plugin/DebugPlugin.scala
+6 −2 src/main/scala/vexriscv/plugin/EmbeddedRiscvJtag.scala
+23 −6 src/main/scala/vexriscv/plugin/Fetcher.scala
+4 −0 src/main/scala/vexriscv/plugin/FormalPlugin.scala
+114 −22 src/main/scala/vexriscv/plugin/FpuPlugin.scala
+12 −6 src/main/scala/vexriscv/plugin/MmuPlugin.scala
+30 −5 src/main/scala/vexriscv/plugin/PmpPluginOld.scala
+2 −2 src/test/cpp/common/jtag.h
+2 −2 src/test/cpp/custom/atomic/src/crt.S
+1,403 −370 src/test/cpp/raw/mmu/build/mmu.asm
+499 −235 src/test/cpp/raw/mmu/build/mmu.hex
+71 −85 src/test/cpp/raw/mmu/src/crt.S
+4 −0 src/test/cpp/raw/privSpec/.gitignore
+142 −0 src/test/cpp/raw/privSpec/build/privSpec.hex
+5 −0 src/test/cpp/raw/privSpec/makefile
+328 −0 src/test/cpp/raw/privSpec/src/crt.S
+16 −0 src/test/cpp/raw/privSpec/src/ld
+159 −0 src/test/cpp/raw/privSpec/src/privileged.h
+94 −0 src/test/cpp/raw/privSpec/src/riscv_asm.h
+37 −11 src/test/cpp/regression/main.cpp
+13,463 −0 src/test/resources/asm/mmu.asm
+3,495 −4,789 src/test/resources/hex/mmu.hex
+1 −1 src/test/scala/vexriscv/TestIndividualFeatures.scala
+1 −0 src/test/scala/vexriscv/experimental/PlicCost.scala
+55 −43 src/test/scala/vexriscv/ip/fpu/FpuTest.scala
5 changes: 3 additions & 2 deletions hardware/scala/saxon/Apb3DecoderStdGenerators.scala
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,13 @@ case class Apb3PlicGenerator(apbOffset : Handle[BigInt] = Unset) (implicit decod
val apb = Apb3(apbConfig)
val bus = Apb3SlaveFactory(apb)

val targets = targetsModel.map(flag =>
val targets = targetsModel.zipWithIndex.map { case (flag, id) =>
PlicTarget(
id = id,
gateways = gateways.map(_.get),
priorityWidth = priorityWidth
).setCompositeName(flag, "plic_target")
)
}

// gateways.foreach(_.priority := 1)
// targets.foreach(_.threshold := 0)
Expand Down
8 changes: 6 additions & 2 deletions hardware/scala/saxon/VexRiscvClusterGenerator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import spinal.lib.bus.misc.SizeMapping
import spinal.lib.com.jtag.{JtagInstructionDebuggerGenerator, JtagTapDebuggerGenerator}
import spinal.lib.com.jtag.xilinx.Bscane2BmbMasterGenerator
import spinal.lib.com.jtag.altera.VJtag2BmbMasterGenerator
import spinal.lib.cpu.riscv.debug.{DebugModule, DebugModuleParameter, DebugTransportModuleJtagTap, DebugTransportModuleParameter, DebugTransportModuleTunneled}
import spinal.lib.cpu.riscv.debug.{DebugModule, DebugModuleCpuConfig, DebugModuleParameter, DebugTransportModuleJtagTap, DebugTransportModuleParameter, DebugTransportModuleTunneled}
import spinal.lib.generator._
import spinal.lib.misc.plic.PlicMapping
import vexriscv.VexRiscvBmbGenerator
Expand Down Expand Up @@ -115,7 +115,11 @@ class VexRiscvClusterGenerator(cpuCount : Int, withSupervisor : Boolean = true,
harts = cpuCount,
progBufSize = 2,
datacount = XLEN/32,
xlens = List(XLEN)
hartsConfig = cores.map(c => DebugModuleCpuConfig(
xlen = XLEN,
flen = c.config.get.FLEN,
withFpuRegAccess = c.config.get.FLEN == 64
))
)
)
systemReset := dm.io.ndmreset
Expand Down
9 changes: 5 additions & 4 deletions hardware/scala/saxon/board/digilent/ArtyA7SmpLinux.scala
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,7 @@ object ArtyA7SmpLinuxSystemSim {
import spinal.core.sim._

def main(args: Array[String]): Unit = {
Handle.loadHandleAsync = true

case class Config(trace : Boolean, bin : String)
val parser = new scopt.OptionParser[Config]("SpinalCore") {
Expand Down Expand Up @@ -830,8 +831,8 @@ object ArtyA7SmpLinuxSystemSim {

val images = "../buildroot-build/images/"

dut.top.phy.logic.loadBin(0x00F80000, images + "fw_jump.bin")
dut.top.phy.logic.loadBin(0x00E00000, images + "u-boot.bin")
// dut.top.phy.logic.loadBin(0x00F80000, images + "fw_jump.bin")
// dut.top.phy.logic.loadBin(0x00E00000, images + "u-boot.bin")
// dut.top.phy.logic.loadBin(0x00000000, images + "Image")
// dut.top.phy.logic.loadBin(0x00FF0000, images + "linux.dtb")
// dut.top.phy.logic.loadBin(0x00FFFFC0, images + "rootfs.cpio.uboot")
Expand All @@ -842,10 +843,10 @@ object ArtyA7SmpLinuxSystemSim {

// dut.top.phy.logic.loadBin(0x00F80000, "software/standalone/fpu/build/fpu.bin")
// dut.top.phy.logic.loadBin(0x00F80000, "software/standalone/test/aes/build/aes.bin")
//dut.phy.logic.loadBin(0x00F80000, "software/standalone/dhrystone/build/dhrystone.bin")
dut.top.phy.logic.loadBin(0x00F80000, "software/standalone/dhrystone/build/dhrystone.bin")
// dut.phy.logic.loadBin(0x00F80000, "software/standalone/timerAndGpioInterruptDemo/build/timerAndGpioInterruptDemo_spinal_sim.bin")
// dut.phy.logic.loadBin(0x00F80000, "software/standalone/freertosDemo/build/freertosDemo_spinal_sim.bin")
dut.top.phy.logic.loadBin(0x00F80000, "software/standalone/mmcmeConfig/build/mmcmeConfig.bin")
// dut.top.phy.logic.loadBin(0x00F80000, "software/standalone/mmcmeConfig/build/mmcmeConfig.bin")
println("DRAM loading done")
}
}
Expand Down
6 changes: 5 additions & 1 deletion hardware/scala/saxon/package.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import spinal.core.SpinalConfig
import spinal.core.fiber.Handle

package object saxon {
def SpinalRtlConfig = SpinalConfig(targetDirectory = "hardware/netlist")
def SpinalRtlConfig = {
Handle.loadHandleAsync = true // For compatibility
SpinalConfig(targetDirectory = "hardware/netlist")
}
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.4.7
sbt.version=1.6.0

0 comments on commit f44052b

Please sign in to comment.