XiangShan icon indicating copy to clipboard operation
XiangShan copied to clipboard

Compile Exception while using "make emu EMU_THREADS=8 MFC=1 CONFIG=KunminghuV2Config",

Open Jeremy-Jia opened this issue 9 months ago • 5 comments

Before start

PLEASE MAKE SURE you have done these:

  • [x] (Select what you have done like this)
  • [x] I have read the RISC-V ISA Manual and this is not a RISC-V ISA question.
  • [x] I have read the XiangShan Documents.
  • [x] I have searched the previous issues and did not find anything relevant.
  • [x] I have searched the previous discussions and did not find anything relevant.
  • [x] I have reviewed the commit messages from the relevant commit history.

Describe the question

A clear and concise description of your question.

Compile Exception while using "make emu EMU_THREADS=8 MFC=1 CONFIG=KunminghuV2Config", the error message is:

    Exception in thread "main" java.util.NoSuchElementException: head of empty list
    at scala.collection.immutable.Nil$.head(List.scala:662)
    at scala.collection.immutable.Nil$.head(List.scala:661)
    at top.BusPerfMonitorImp.<init>(BusPerfMonitor.scala:105)
    at top.BusPerfMonitor.$anonfun$module$1(BusPerfMonitor.scala:30)
    at chisel3.internal.plugin.package$.autoNameRecursively(package.scala:33)
    at top.BusPerfMonitor.module$lzycompute(BusPerfMonitor.scala:30)
    at top.BusPerfMonitor.module(BusPerfMonitor.scala:30)
    at top.BusPerfMonitor.module(BusPerfMonitor.scala:28)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$15(LazyModule.scala:335)
    at chisel3.Module$.evaluate(Module.scala:88)
    at chisel3.Module$.do_apply(Module.scala:35)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$14(LazyModule.scala:335)
    at chisel3.internal.plugin.package$.autoNameRecursively(package.scala:33)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$13(LazyModule.scala:335)
    at scala.Option.getOrElse(Option.scala:201)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$1(LazyModule.scala:333)
    at scala.collection.immutable.List.flatMap(List.scala:293)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.instantiate(LazyModule.scala:309)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.instantiate$(LazyModule.scala:306)
    at freechips.rocketchip.diplomacy.LazyModuleImp.instantiate(LazyModule.scala:396)
    at freechips.rocketchip.diplomacy.LazyModuleImp.$anonfun$x$22$1(LazyModule.scala:398)
    at chisel3.internal.plugin.package$.autoNameRecursivelyProduct(package.scala:48)
    at freechips.rocketchip.diplomacy.LazyModuleImp.<init>(LazyModule.scala:398)
    at xiangshan.L2Top$L2TopImp.<init>(L2Top.scala:147)
    at xiangshan.L2Top.$anonfun$module$1(L2Top.scala:244)
    at chisel3.internal.plugin.package$.autoNameRecursively(package.scala:33)
    at xiangshan.L2Top.module$lzycompute(L2Top.scala:244)
    at xiangshan.L2Top.module(L2Top.scala:244)
    at xiangshan.L2Top.module(L2Top.scala:56)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$15(LazyModule.scala:335)
    at chisel3.Module$.evaluate(Module.scala:88)
    at chisel3.Module$.do_apply(Module.scala:35)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$14(LazyModule.scala:335)
    at chisel3.internal.plugin.package$.autoNameRecursively(package.scala:33)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$13(LazyModule.scala:335)
    at scala.Option.getOrElse(Option.scala:201)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$1(LazyModule.scala:333)
    at scala.collection.immutable.List.flatMap(List.scala:293)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.instantiate(LazyModule.scala:309)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.instantiate$(LazyModule.scala:306)
    at freechips.rocketchip.diplomacy.LazyModuleImp.instantiate(LazyModule.scala:396)
    at freechips.rocketchip.diplomacy.LazyModuleImp.$anonfun$x$22$1(LazyModule.scala:398)
    at chisel3.internal.plugin.package$.autoNameRecursivelyProduct(package.scala:48)
    at freechips.rocketchip.diplomacy.LazyModuleImp.<init>(LazyModule.scala:398)
    at xiangshan.XSTile$XSTileImp.<init>(XSTile.scala:108)
    at xiangshan.XSTile.$anonfun$module$1(XSTile.scala:182)
    at chisel3.internal.plugin.package$.autoNameRecursively(package.scala:33)
    at xiangshan.XSTile.module$lzycompute(XSTile.scala:182)
    at xiangshan.XSTile.module(XSTile.scala:182)
    at xiangshan.XSTile.module(XSTile.scala:33)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$15(LazyModule.scala:335)
    at chisel3.Module$.evaluate(Module.scala:88)
    at chisel3.Module$.do_apply(Module.scala:35)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$14(LazyModule.scala:335)
    at chisel3.internal.plugin.package$.autoNameRecursively(package.scala:33)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$13(LazyModule.scala:335)
    at scala.Option.getOrElse(Option.scala:201)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$1(LazyModule.scala:333)
    at scala.collection.immutable.List.flatMap(List.scala:293)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.instantiate(LazyModule.scala:309)
    at freechips.rocketchip.diplomacy.LazyModuleImpLike.instantiate$(LazyModule.scala:306)
    at freechips.rocketchip.diplomacy.LazyRawModuleImp.instantiate(LazyModule.scala:405)
    at freechips.rocketchip.diplomacy.LazyRawModuleImp.$anonfun$x$23$2(LazyModule.scala:418)
    at chisel3.withClockAndReset$.apply(MultiClock.scala:35)
    at chisel3.withClockAndReset$.apply(MultiClock.scala:18)
    at freechips.rocketchip.diplomacy.LazyRawModuleImp.$anonfun$x$23$1(LazyModule.scala:418)
    at chisel3.internal.plugin.package$.autoNameRecursivelyProduct(package.scala:48)
    at freechips.rocketchip.diplomacy.LazyRawModuleImp.<init>(LazyModule.scala:417)
    at top.XSTop$XSTopImp.<init>(Top.scala:163)
    at top.XSTop.$anonfun$module$1(Top.scala:300)
    at chisel3.internal.plugin.package$.autoNameRecursively(package.scala:33)
    at top.XSTop.module$lzycompute(Top.scala:300)
    at top.XSTop.module(Top.scala:300)
    at top.SimTop.$anonfun$soc$2(SimTop.scala:32)
    at chisel3.Module$.evaluate(Module.scala:88)
    at chisel3.Module$.do_apply(Module.scala:35)
    at top.SimTop.$anonfun$soc$1(SimTop.scala:32)
    at chisel3.internal.plugin.package$.autoNameRecursively(package.scala:33)
    at top.SimTop.<init>(SimTop.scala:32)
    at top.SimTop$.$anonfun$new$22(SimTop.scala:110)
    at freechips.rocketchip.diplomacy.package$.DisableMonitors(package.scala:228)
    at top.SimTop$.$anonfun$new$21(SimTop.scala:110)
    at chisel3.Module$.evaluate(Module.scala:88)
    at chisel3.Module$.do_apply(Module.scala:35)
    at chisel3.stage.phases.Elaborate.$anonfun$transform$2(Elaborate.scala:48)
    at chisel3.internal.Builder$.$anonfun$buildImpl$1(Builder.scala:1023)
    at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
    at chisel3.internal.Builder$.buildImpl(Builder.scala:1017)
    at chisel3.internal.Builder$.$anonfun$build$1(Builder.scala:1008)
    at logger.Logger$.$anonfun$makeScope$4(Logger.scala:148)
    at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
    at logger.Logger$.makeScope(Logger.scala:146)
    at logger.Logger$.makeScope(Logger.scala:133)
    at chisel3.internal.Builder$.build(Builder.scala:1008)
    at chisel3.stage.phases.Elaborate.$anonfun$transform$1(Elaborate.scala:48)
    at scala.collection.immutable.List.flatMap(List.scala:293)
    at scala.collection.immutable.List.flatMap(List.scala:79)
    at chisel3.stage.phases.Elaborate.transform(Elaborate.scala:32)
    at chisel3.stage.phases.Elaborate.transform(Elaborate.scala:22)
    at firrtl.options.DependencyManager.$anonfun$transform$5(DependencyManager.scala:280)
    at firrtl.Utils$.time(Utils.scala:53)
    at firrtl.options.DependencyManager.$anonfun$transform$3(DependencyManager.scala:280)
    at scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:183)
    at scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:179)
    at scala.collection.immutable.List.foldLeft(List.scala:79)
    at firrtl.options.DependencyManager.transform(DependencyManager.scala:269)
    at firrtl.options.DependencyManager.transform$(DependencyManager.scala:255)
    at firrtl.options.PhaseManager.transform(DependencyManager.scala:443)
    at top.XiangShanStage.run(XiangShanStage.scala:68)
    at firrtl.options.Stage$$anon$1.transform(Stage.scala:42)
    at firrtl.options.Stage$$anon$1.transform(Stage.scala:42)
    at firrtl.options.Stage.$anonfun$transform$3(Stage.scala:45)
    at scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:183)
    at scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:179)
    at scala.collection.immutable.List.foldLeft(List.scala:79)
    at firrtl.options.Stage.$anonfun$transform$2(Stage.scala:45)
    at logger.Logger$.$anonfun$makeScope$4(Logger.scala:148)
    at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
    at logger.Logger$.makeScope(Logger.scala:146)
    at logger.Logger$.makeScope(Logger.scala:125)
    at firrtl.options.Stage.transform(Stage.scala:45)
    at firrtl.options.Stage.execute(Stage.scala:56)
    at top.Generator$.execute(Generator.scala:34)
    at top.SimTop$.delayedEndpoint$top$SimTop$1(SimTop.scala:111)
    at top.SimTop$delayedInit$body.apply(SimTop.scala:97)
    at scala.Function0.apply$mcV$sp(Function0.scala:42)
    at scala.Function0.apply$mcV$sp$(Function0.scala:42)
    at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
    at scala.App.$anonfun$main$1(App.scala:98)
    at scala.App.$anonfun$main$1$adapted(App.scala:98)
    at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:575)
    at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:573)
    at scala.collection.AbstractIterable.foreach(Iterable.scala:933)
    at scala.App.main(App.scala:98)
    at scala.App.main$(App.scala:96)
    at top.SimTop$.main(SimTop.scala:97)
    at top.SimTop.main(SimTop.scala)

1 targets failed xiangshan[chisel].test.runMain subprocess failed make: *** [Makefile:162: build/rtl/SimTop.v] Error 1

Environment

Operating System: Ubuntu 20.04

gcc version: gcc version 11.2.0 (Ubuntu 11.2.0-19ubuntu1)

mill version: Mill Build Tool version 0.11.1 Java version: 11.0.22, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64 Default locale: en, platform encoding: UTF-8 OS name: "Linux", version: 5.15.146.1-microsoft-standard-WSL2, arch: amd64

The commit log:

commit 5961467fb71810763d53d8d244fbcdfa2b81fa81 (HEAD -> master, origin/master, origin/HEAD) Author: Xiaokun-Pei [email protected] Date: Wed May 15 14:23:12 2024 +0800 HPTW, RVH: add the flush function (#2982)

Jeremy-Jia avatar May 15 '24 10:05 Jeremy-Jia