proteus-core / proteus

The SpinalHDL design of the Proteus core, an extensible RISC-V core.
MIT License
39 stars 9 forks source link

InternalError: Malformed class name #7

Closed lycfly closed 1 year ago

lycfly commented 1 year ago

Hi, I cloned the repo and opened it with idea, but when I run the Core object, I just got a Malformed class name error. Is there any additional process I need to do? I have spinalhdl environment installed. Here is the error message:

[Runtime] SpinalHDL v1.7.3    git head : ed8004c489ee8a38c2cab309d0447b543fe9d5b8
[Runtime] JVM max memory : 6181.5MiB
[Runtime] Current date : 2023.05.25 14:48:56
[Progress] at 0.000 : Elaborate components

**********************************************************************************************
[Warning] Elaboration failed (0 error).
          Spinal will restart with scala trace to help you to find the problem.
**********************************************************************************************

[Progress] at 0.237 : Elaborate components
Exception in thread "main" java.lang.InternalError: Malformed class name
    at java.lang.Class.getSimpleName(Class.java:1330)
    at riscv.PipelineData.name(PipelineData.scala:6)
    at riscv.Stage$$anonfun$value$1$$anonfun$apply$3.apply(Stage.scala:99)
    at riscv.Stage$$anonfun$value$1$$anonfun$apply$3.apply(Stage.scala:97)
    at spinal.core.Component.rework(Component.scala:346)
    at riscv.Stage$$anonfun$value$1.apply(Stage.scala:97)
    at riscv.Stage$$anonfun$value$1.apply(Stage.scala:97)
    at scala.collection.mutable.HashMap.getOrElseUpdate(HashMap.scala:79)
    at riscv.Stage.value(Stage.scala:95)
    at riscv.plugins.BranchTargetPredictorBase$$anonfun$setup$2$$anon$1.<init>(BranchTargetPredictorBase.scala:115)
    at riscv.plugins.BranchTargetPredictorBase$$anonfun$setup$2.apply(BranchTargetPredictorBase.scala:88)
    at riscv.plugins.BranchTargetPredictorBase$$anonfun$setup$2.apply(BranchTargetPredictorBase.scala:88)
    at riscv.Plugin$PlugComponent$$anonfun$plug$1.apply(Plugin.scala:21)
    at spinal.core.Component.rework(Component.scala:346)
    at riscv.Plugin$PlugComponent.plug(Plugin.scala:20)
    at riscv.plugins.BranchTargetPredictorBase.setup(BranchTargetPredictorBase.scala:88)
    at riscv.Pipeline$$anonfun$setupPlugins$1.apply(Pipeline.scala:40)
    at riscv.Pipeline$$anonfun$setupPlugins$1.apply(Pipeline.scala:40)
    at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
    at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
    at riscv.Pipeline$class.setupPlugins(Pipeline.scala:40)
    at riscv.createStaticPipeline$$anon$1.setupPlugins(Core.scala:16)
    at riscv.Pipeline$class.build(Pipeline.scala:57)
    at riscv.createStaticPipeline$$anon$1.build(Core.scala:16)
    at riscv.createStaticPipeline$.apply(Core.scala:66)
    at riscv.SoC$$anonfun$static$1.apply(Core.scala:75)
    at riscv.SoC$$anonfun$static$1.apply(Core.scala:75)
    at riscv.soc.SoC$$anon$2$$anon$3.<init>(SoC.scala:60)
    at riscv.soc.SoC$$anon$2.<init>(SoC.scala:59)
    at riscv.soc.SoC.<init>(SoC.scala:58)
    at riscv.SoC$.static(Core.scala:75)
    at riscv.Core$$anonfun$main$1.apply(Core.scala:85)
    at riscv.Core$$anonfun$main$1.apply(Core.scala:85)
    at spinal.core.internals.PhaseCreateComponent$$anonfun$impl$66.apply(Phase.scala:2414)
    at spinal.core.fiber.Engine$$anonfun$create$1.apply$mcV$sp(AsyncCtrl.scala:147)
    at spinal.core.fiber.AsyncThread$$anonfun$1.apply$mcV$sp(AsyncThread.scala:59)
    at spinal.core.fiber.EngineContext$$anonfun$newJvmThread$1.apply$mcV$sp(AsyncCtrl.scala:39)
    at spinal.sim.JvmThread.run(SimManager.scala:51)
martonbognar commented 1 year ago

Hi! I recommend you to give our README a read. I'm not too sure how to configure the run settings inside IDEA, but maybe based on the README you can figure it out (or just use the provided console commands).

The quickest way to test whether you have everything installed properly is to run make -C tests CORE=riscv.CoreExtMem from the console in the root directory of this repository (see here).

lycfly commented 1 year ago

I tried to run make -C sim CORE=riscv.CoreExtMem in the terminal under the root directory, but got the same error... By the way, the only thing I did was cloning the repo and running make -C sim CORE=riscv.CoreExtMem. If you have tested it, I think there may be some problem in my scala environment...

lycfly commented 1 year ago

I found the problem... My jdk version is too old (jdk1.8). It works when I change to jdk-17.

martonbognar commented 1 year ago

Great that you found the problem! I'll add a disclaimer to the repository that we need a higher version of JDK.