Я создал следующую конфигурацию в Configs. scala:
class APBConfig extends Config (new WithDebugAPB ++ new TinyConfig)
Я попытался создать его с помощью следующей команды:
/ rocket / rocket-chip / vsim $ make CONFIG = freechips.rocketchip.system.APBConfig
И получите следующую ошибку:
[error] java.lang.UnsupportedOperationException: empty.init
[error] ...
[error] at freechips.rocketchip.regmapper.RegMapper$.apply(RegMapper.scala:49)
[error] at freechips.rocketchip.amba.apb.APBRegisterNode.regmap(RegisterRouter.scala:32)
[error] at freechips.rocketchip.devices.debug.APBDebugRegisters$$anon$1.<init>(APB.scala:27)
[error] at freechips.rocketchip.devices.debug.APBDebugRegisters.module$lzycompute(APB.scala:26)
[error] at freechips.rocketchip.devices.debug.APBDebugRegisters.module(APB.scala:26)
[error] at freechips.rocketchip.devices.debug.APBDebugRegisters.module(APB.scala:18)
[error] at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$2(LazyModule.scala:280)
[error] at chisel3.Module$.do_apply(Module.scala:52)
[error] at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$1(LazyModule.scala:280)
[error] at scala.collection.immutable.List.flatMap(List.scala:338)
[error] at freechips.rocketchip.diplomacy.LazyModuleImpLike.instantiate(LazyModule.scala:278)
[error] at freechips.rocketchip.diplomacy.LazyModuleImpLike.instantiate$(LazyModule.scala:273)
[error] at freechips.rocketchip.diplomacy.LazyRawModuleImp.instantiate(LazyModule.scala:357)
[error] at freechips.rocketchip.diplomacy.LazyRawModuleImp.$anonfun$x$23$1(LazyModule.scala:370)
[error] at chisel3.withClockAndReset$.apply(MultiClock.scala:25)
[error] at freechips.rocketchip.diplomacy.LazyRawModuleImp.<init>(LazyModule.scala:370)
[error] at freechips.rocketchip.devices.debug.TLDebugModuleOuterAsync$$anon$3.<init>(Debug.scala:634)
[error] at freechips.rocketchip.devices.debug.TLDebugModuleOuterAsync.module$lzycompute(Debug.scala:634)
[error] at freechips.rocketchip.devices.debug.TLDebugModuleOuterAsync.module(Debug.scala:634)
[error] at freechips.rocketchip.devices.debug.TLDebugModuleOuterAsync.module(Debug.scala:598)
[error] at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$2(LazyModule.scala:280)
[error] at chisel3.Module$.do_apply(Module.scala:52)
[error] at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$1(LazyModule.scala:280)
[error] at scala.collection.immutable.List.flatMap(List.scala:338)
[error] at freechips.rocketchip.diplomacy.LazyModuleImpLike.instantiate(LazyModule.scala:278)
[error] at freechips.rocketchip.diplomacy.LazyModuleImpLike.instantiate$(LazyModule.scala:273)
[error] at freechips.rocketchip.diplomacy.LazyRawModuleImp.instantiate(LazyModule.scala:357)
[error] at freechips.rocketchip.diplomacy.LazyRawModuleImp.$anonfun$x$23$1(LazyModule.scala:370)
[error] at chisel3.withClockAndReset$.apply(MultiClock.scala:25)
[error] at freechips.rocketchip.diplomacy.LazyRawModuleImp.<init>(LazyModule.scala:370)
[error] at freechips.rocketchip.devices.debug.TLDebugModule$$anon$10.<init>(Debug.scala:1770)
[error] at freechips.rocketchip.devices.debug.TLDebugModule.module$lzycompute(Debug.scala:1770)
[error] at freechips.rocketchip.devices.debug.TLDebugModule.module(Debug.scala:1770)
[error] at freechips.rocketchip.devices.debug.TLDebugModule.module(Debug.scala:1745)
[error] at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$2(LazyModule.scala:280)
[error] at chisel3.Module$.do_apply(Module.scala:52)
[error] at freechips.rocketchip.diplomacy.LazyModuleImpLike.$anonfun$instantiate$1(LazyModule.scala:280)
[error] at scala.collection.immutable.List.flatMap(List.scala:338)
[error] at freechips.rocketchip.diplomacy.LazyModuleImpLike.instantiate(LazyModule.scala:278)
[error] at freechips.rocketchip.diplomacy.LazyModuleImpLike.instantiate$(LazyModule.scala:273)
[error] at freechips.rocketchip.diplomacy.LazyModuleImp.instantiate(LazyModule.scala:348)
[error] at freechips.rocketchip.diplomacy.LazyModuleImp.<init>(LazyModule.scala:350)
[error] at freechips.rocketchip.subsystem.BareSubsystemModuleImp.<init>(BaseSubsystem.scala:31)
[error] at freechips.rocketchip.subsystem.BaseSubsystemModuleImp.<init>(BaseSubsystem.scala:130)
[error] at freechips.rocketchip.subsystem.RocketSubsystemModuleImp.<init>(RocketSubsystem.scala:55)
[error] at freechips.rocketchip.system.ExampleRocketSystemModuleImp.<init>(ExampleRocketSystem.scala:27)
[error] at freechips.rocketchip.system.ExampleRocketSystem.module$lzycompute(ExampleRocketSystem.scala:24)
[error] at freechips.rocketchip.system.ExampleRocketSystem.module(ExampleRocketSystem.scala:24)
[error] at freechips.rocketchip.system.TestHarness.$anonfun$dut$1(TestHarness.scala:17)
[error] at chisel3.Module$.do_apply(Module.scala:52)
[error] at freechips.rocketchip.system.TestHarness.<init>(TestHarness.scala:17)
[error] at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[error] at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[error] at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
[error] at freechips.rocketchip.stage.phases.PreElaboration.$anonfun$transform$1(PreElaboration.scala:31)
[error] ... (Stack trace trimmed to user code only, rerun with --full-stacktrace if you wish to see the full stack trace)
Exception: sbt.TrapExitSecurityException thrown from the UncaughtExceptionHandler in thread "run-main-0"
[error] Nonzero exit code: 1
[error] (Compile / runMain) Nonzero exit code: 1
[error] Total time: 34 s, completed Aug 5, 2020, 1:58:55 PM
Для справки, используя WithJtagDTMSystem вместо WithDebugAPB работает.
Есть идеи, в чем может быть проблема?